summary refs log tree commit diff
path: root/pkgs/applications/science
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2021-05-16 18:32:44 +0000
committerGitHub <noreply@github.com>2021-05-16 18:32:44 +0000
commit6cdac75d25fece285055894095d54120e817e8be (patch)
tree865bb91677137f48425726ba448c10b785787894 /pkgs/applications/science
parent21541fc97cd154c2c9b396334f451e008c36aa09 (diff)
parent8c6d8191436912231312b7b12f0cefc3fc7fb18a (diff)
Merge staging-next into staging
Diffstat (limited to 'pkgs/applications/science')
-rw-r--r--pkgs/applications/science/biology/bowtie2/default.nix4
-rw-r--r--pkgs/applications/science/electronics/pulseview/default.nix11
-rw-r--r--pkgs/applications/science/machine-learning/labelimg/default.nix2
-rw-r--r--pkgs/applications/science/math/eukleides/default.nix57
-rw-r--r--pkgs/applications/science/math/eukleides/use-CC.patch11
5 files changed, 68 insertions, 17 deletions
diff --git a/pkgs/applications/science/biology/bowtie2/default.nix b/pkgs/applications/science/biology/bowtie2/default.nix
index 715f5bb8bfa68..4f5872de07dd9 100644
--- a/pkgs/applications/science/biology/bowtie2/default.nix
+++ b/pkgs/applications/science/biology/bowtie2/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   pname = "bowtie2";
-  version = "2.4.2";
+  version = "2.4.3";
 
   src = fetchFromGitHub {
     owner = "BenLangmead";
     repo = pname;
     rev = "v${version}";
-    sha256 = "11apzq7l1lk3yxw97g9dfr0gwnvfh58x6apifcblgd66gbip3y1y";
+    sha256 = "sha256-uEKTB8935YY6lpXv2tJBQ1hrRk63vALLQb6SUXsVyhQ=";
   };
 
   nativeBuildInputs = [ cmake ];
diff --git a/pkgs/applications/science/electronics/pulseview/default.nix b/pkgs/applications/science/electronics/pulseview/default.nix
index 00c830fcd3370..e9496ce60c229 100644
--- a/pkgs/applications/science/electronics/pulseview/default.nix
+++ b/pkgs/applications/science/electronics/pulseview/default.nix
@@ -1,4 +1,4 @@
-{ mkDerivation, lib, fetchurl, pkg-config, cmake, glib, boost, libsigrok
+{ mkDerivation, lib, fetchurl, fetchpatch, pkg-config, cmake, glib, boost, libsigrok
 , libsigrokdecode, libserialport, libzip, udev, libusb1, libftdi1, glibmm
 , pcre, librevisa, python3, qtbase, qtsvg
 }:
@@ -20,6 +20,15 @@ mkDerivation rec {
     qtbase qtsvg
   ];
 
+  patches = [
+    # Allow building with glib 2.68
+    # PR at https://github.com/sigrokproject/pulseview/pull/39
+    (fetchpatch {
+      url = "https://github.com/sigrokproject/pulseview/commit/fb89dd11f2a4a08b73c498869789e38677181a8d.patch";
+      sha256 = "07ifsis9jlc0jjp2d11f7hvw9kaxcbk0a57h2m4xsv1d7vzl9yfh";
+    })
+  ];
+
   meta = with lib; {
     description = "Qt-based LA/scope/MSO GUI for sigrok (a signal analysis software suite)";
     homepage = "https://sigrok.org/";
diff --git a/pkgs/applications/science/machine-learning/labelimg/default.nix b/pkgs/applications/science/machine-learning/labelimg/default.nix
index 50d0aa6f9d1d5..620ccfb084efe 100644
--- a/pkgs/applications/science/machine-learning/labelimg/default.nix
+++ b/pkgs/applications/science/machine-learning/labelimg/default.nix
@@ -15,7 +15,7 @@
     propagatedBuildInputs = with python3Packages; [
       pyqt5
       lxml
-      sip
+      sip_4
     ];
     preBuild = ''
       make qt5py3
diff --git a/pkgs/applications/science/math/eukleides/default.nix b/pkgs/applications/science/math/eukleides/default.nix
index 5f7fe58465d00..b5a9fc3fa86db 100644
--- a/pkgs/applications/science/math/eukleides/default.nix
+++ b/pkgs/applications/science/math/eukleides/default.nix
@@ -1,26 +1,57 @@
-{ lib, stdenv, fetchurl, bison, flex, texinfo, readline, texLive }:
+{ lib, stdenv, fetchurl, bison, flex, makeWrapper, texinfo, readline, texLive }:
 
-let
-  name    = "eukleides";
+lib.fix (eukleides: stdenv.mkDerivation rec {
+  pname = "eukleides";
   version = "1.5.4";
-in
-stdenv.mkDerivation {
-  name = "${name}-${version}";
 
   src = fetchurl {
-    url = "http://www.eukleides.org/files/${name}-${version}.tar.bz2";
+    url = "http://www.eukleides.org/files/${pname}-${version}.tar.bz2";
     sha256 = "0s8cyh75hdj89v6kpm3z24i48yzpkr8qf0cwxbs9ijxj1i38ki0q";
   };
 
-  buildInputs = [bison flex texinfo readline texLive];
+  # use $CC instead of hardcoded gcc
+  patches = [ ./use-CC.patch ];
 
-  preConfigure = "sed -i 's/ginstall-info/install-info/g' doc/Makefile";
-  installPhase = "mkdir -p $out/bin ; make PREFIX=$out install";
+  nativeBuildInputs = [ bison flex texinfo makeWrapper ];
+
+  buildInputs = [ readline texLive ];
+
+  preConfigure = ''
+    substituteInPlace Makefile \
+      --replace mktexlsr true
+
+    substituteInPlace doc/Makefile \
+      --replace ginstall-info install-info
+
+    substituteInPlace Config \
+      --replace '/usr/local' "$out" \
+      --replace '$(SHARE_DIR)/texmf' "$tex"
+  '';
+
+  preInstall = ''
+    mkdir -p $out/bin
+  '';
+
+  postInstall = ''
+    wrapProgram $out/bin/euktoeps \
+      --set-default TEXINPUTS : \
+      --prefix TEXINPUTS : "$tex/tex/latex/eukleides" \
+      --prefix PATH : "${texLive}/bin"
+    wrapProgram $out/bin/euktopdf \
+      --set-default TEXINPUTS : \
+      --prefix TEXINPUTS : "$tex/tex/latex/eukleides" \
+      --prefix PATH : "${texLive}/bin"
+  '';
+
+  outputs = [ "out" "doc" "tex" ];
+
+  passthru.tlType = "run";
+  passthru.pkgs = [ eukleides.tex ];
 
   meta = {
     description = "Geometry Drawing Language";
     homepage = "http://www.eukleides.org/";
-    license = lib.licenses.gpl2;
+    license = lib.licenses.gpl3Plus;
 
     longDescription = ''
       Eukleides is a computer language devoted to elementary plane
@@ -31,7 +62,7 @@ stdenv.mkDerivation {
       circles and conics.
     '';
 
-    platforms = lib.platforms.linux;
+    platforms = lib.platforms.unix;
     maintainers = [ lib.maintainers.peti ];
   };
-}
+})
diff --git a/pkgs/applications/science/math/eukleides/use-CC.patch b/pkgs/applications/science/math/eukleides/use-CC.patch
new file mode 100644
index 0000000000000..08bd71ec9dc59
--- /dev/null
+++ b/pkgs/applications/science/math/eukleides/use-CC.patch
@@ -0,0 +1,11 @@
+--- a/build/Makefile
++++ b/build/Makefile
+@@ -11,7 +11,7 @@ LEX = flex
+ LFLAGS = -8
+ YACC = bison
+ YFLAGS = -d
+-CC = gcc
++CC ?= gcc
+ IFLAGS = -I$(COMMON_DIR) -I$(MAIN_DIR) -I$(BUILD_DIR) 
+ ifneq ($(strip $(LOCALES)),)
+ MOFLAGS = -DMO_DIR=\"$(MO_DIR)\"