summary refs log tree commit diff
diff options
context:
space:
mode:
authorSébastien Maret <sebastien.maret@univ-grenoble-alpes.fr>2022-10-19 22:12:52 +0200
committerSébastien Maret <sebastien.maret@univ-grenoble-alpes.fr>2022-10-19 22:12:52 +0200
commit35370b7fefb5bf88afea5e307751142b277b0a1c (patch)
tree59a171cc0222d84b5a35ff46536e348e0f58a020
parentd2cfe468f81b5380a24a4de4f66c57d94ee9ca0e (diff)
downloadnixpkgs-35370b7fefb5bf88afea5e307751142b277b0a1c.tar
nixpkgs-35370b7fefb5bf88afea5e307751142b277b0a1c.tar.gz
nixpkgs-35370b7fefb5bf88afea5e307751142b277b0a1c.tar.bz2
nixpkgs-35370b7fefb5bf88afea5e307751142b277b0a1c.tar.lz
nixpkgs-35370b7fefb5bf88afea5e307751142b277b0a1c.tar.xz
nixpkgs-35370b7fefb5bf88afea5e307751142b277b0a1c.tar.zst
nixpkgs-35370b7fefb5bf88afea5e307751142b277b0a1c.zip
gildas: restore Python support
-rw-r--r--pkgs/applications/science/astronomy/gildas/default.nix4
-rw-r--r--pkgs/applications/science/astronomy/gildas/python-ldflags.patch13
2 files changed, 15 insertions, 2 deletions
diff --git a/pkgs/applications/science/astronomy/gildas/default.nix b/pkgs/applications/science/astronomy/gildas/default.nix
index 0a98c1b7a03..703416f074a 100644
--- a/pkgs/applications/science/astronomy/gildas/default.nix
+++ b/pkgs/applications/science/astronomy/gildas/default.nix
@@ -3,7 +3,7 @@
 }:
 
 let
-  python3Env = python3.withPackages(ps: with ps; [ numpy ]);
+  python3Env = python3.withPackages(ps: with ps; [ numpy setuptools ]);
 in
 
 stdenv.mkDerivation rec {
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
   buildInputs = [ gtk2-x11 lesstif cfitsio python3Env ncurses ]
     ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ CoreFoundation ]);
 
-  patches = [ ./wrapper.patch ./clang.patch ./aarch64.patch ];
+  patches = [ ./wrapper.patch ./clang.patch ./aarch64.patch ./python-ldflags.patch ];
 
   NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-unused-command-line-argument";
 
diff --git a/pkgs/applications/science/astronomy/gildas/python-ldflags.patch b/pkgs/applications/science/astronomy/gildas/python-ldflags.patch
new file mode 100644
index 00000000000..3bbcb9f36e9
--- /dev/null
+++ b/pkgs/applications/science/astronomy/gildas/python-ldflags.patch
@@ -0,0 +1,13 @@
+diff -ruN gildas-src-oct22b/admin/python-config-ldflags.py gildas-src-oct22b.patched/admin/python-config-ldflags.py
+--- gildas-src-oct22b/admin/python-config-ldflags.py	2022-10-03 14:16:33.000000000 +0200
++++ gildas-src-oct22b.patched/admin/python-config-ldflags.py	2022-10-19 22:03:53.000000000 +0200
+@@ -32,7 +32,7 @@
+   libs.insert(0, '-L' + getvar('LIBDIR'))
+ 
+ # Framework (specific for Mac)
+-if not getvar('PYTHONFRAMEWORK'):
+-    libs.extend(getvar('LINKFORSHARED').split())
++#if not getvar('PYTHONFRAMEWORK'):
++#    libs.extend(getvar('LINKFORSHARED').split())
+ 
+ print(' '.join(libs))