about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorWeijia Wang <9713184+wegank@users.noreply.github.com>2023-10-21 14:56:00 +0200
committerGitHub <noreply@github.com>2023-10-21 14:56:00 +0200
commit9fc01a01a75d4a6e3b63d9d60451b332ffd35435 (patch)
tree4ac9370034070919c0b7e458e86322ca335f6d0d /pkgs
parentf701298d962a3fc3b3f6ab7843a3fd7cb7cbc5fc (diff)
parente414a727dfdd0336fbf7f2be6a4b5c5ebe112864 (diff)
Merge pull request #261441 from wegank/texmacs-bump
texmacs: 2.1 -> 2.1.2
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/editors/texmacs/default.nix42
-rw-r--r--pkgs/top-level/all-packages.nix1
2 files changed, 32 insertions, 11 deletions
diff --git a/pkgs/applications/editors/texmacs/default.nix b/pkgs/applications/editors/texmacs/default.nix
index 427d0aa3ace80..00372c1cab8b7 100644
--- a/pkgs/applications/editors/texmacs/default.nix
+++ b/pkgs/applications/editors/texmacs/default.nix
@@ -1,5 +1,5 @@
-{ lib, mkDerivation, callPackage, fetchurl,
-  guile_1_8, qtbase, xmodmap, which, freetype,
+{ lib, stdenv, callPackage, fetchurl,
+  guile_1_8, xmodmap, which, freetype,
   libjpeg,
   sqlite,
   tex ? null,
@@ -8,6 +8,11 @@
   python3 ? null,
   cmake,
   pkg-config,
+  wrapQtAppsHook,
+  xdg-utils,
+  qtbase,
+  qtsvg,
+  qtmacextras,
   ghostscriptX ? null,
   extraFonts ? false,
   chineseFonts ? false,
@@ -15,32 +20,49 @@
   koreanFonts ? false }:
 
 let
-  pname = "TeXmacs";
-  version = "2.1";
+  pname = "texmacs";
+  version = "2.1.2";
   common = callPackage ./common.nix {
     inherit tex extraFonts chineseFonts japaneseFonts koreanFonts;
   };
 in
-mkDerivation {
+stdenv.mkDerivation {
   inherit pname version;
 
   src = fetchurl {
     url = "https://www.texmacs.org/Download/ftp/tmftp/source/TeXmacs-${version}-src.tar.gz";
-    sha256 = "1gl6k1bwrk1y7hjyl4xvlqvmk5crl4jvsk8wrfp7ynbdin6n2i48";
+    hash = "sha256-Ds9gxOwMYSttEWrawgxLHGxHyMBvt8WmyPIwBP2g/CM=";
   };
 
-  nativeBuildInputs = [ cmake pkg-config ];
+  postPatch = common.postPatch + ''
+    substituteInPlace configure \
+      --replace "-mfpmath=sse -msse2" ""
+  '';
+
+  nativeBuildInputs = [
+    guile_1_8
+    pkg-config
+    wrapQtAppsHook
+    xdg-utils
+  ] ++ lib.optionals (!stdenv.isDarwin) [
+    cmake
+  ];
+
   buildInputs = [
     guile_1_8
     qtbase
+    qtsvg
     ghostscriptX
     freetype
     libjpeg
     sqlite
     git
     python3
+  ] ++ lib.optionals stdenv.isDarwin [
+    qtmacextras
   ];
-  NIX_LDFLAGS = "-lz";
+
+  env.NIX_LDFLAGS = "-lz";
 
   qtWrapperArgs = [
     "--suffix" "PATH" ":" (lib.makeBinPath [
@@ -58,10 +80,8 @@ mkDerivation {
     wrapQtApp $out/bin/texmacs
   '';
 
-  inherit (common) postPatch;
-
   meta = common.meta // {
     maintainers = [ lib.maintainers.roconnor ];
-    platforms = lib.platforms.gnu ++ lib.platforms.linux;  # arbitrary choice
+    platforms = lib.platforms.all;
   };
 }
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 625231f133651..6499a18b967c4 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -13836,6 +13836,7 @@ with pkgs;
   tewisay = callPackage ../tools/misc/tewisay { };
 
   texmacs = libsForQt5.callPackage ../applications/editors/texmacs {
+    stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv;
     tex = texlive.combined.scheme-small;
     extraFonts = true;
   };