From d46fde9eb19b14d236b6b7903f75880aa1c76ebc Mon Sep 17 00:00:00 2001 From: Sebastien Maret Date: Mon, 2 Jul 2018 17:16:25 +0200 Subject: [PATCH 1/6] gildas: 20180601_a -> 20180701_a --- .../applications/science/astronomy/gildas/default.nix | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/pkgs/applications/science/astronomy/gildas/default.nix b/pkgs/applications/science/astronomy/gildas/default.nix index bd4587bf2276..6ecfb834ae63 100644 --- a/pkgs/applications/science/astronomy/gildas/default.nix +++ b/pkgs/applications/science/astronomy/gildas/default.nix @@ -7,13 +7,13 @@ let in stdenv.mkDerivation rec { - srcVersion = "jun18a"; - version = "20180601_a"; + srcVersion = "jul18a"; + version = "20180701_a"; name = "gildas-${version}"; src = fetchurl { url = "http://www.iram.fr/~gildas/dist/gildas-src-${srcVersion}.tar.gz"; - sha256 = "0k4x0g69fphb1759cwcw6bbs8imwmq0qwj6zqixxk60skk4n4jvb"; + sha256 = "0kl3zf6b1kv8hgsfrarsnm2gnrdax3vi8f856249y4nxsa7lbv2i"; }; enableParallelBuilding = true; @@ -31,11 +31,6 @@ stdenv.mkDerivation rec { echo "gag_doc: $out/share/doc/" >> kernel/etc/gag.dico.lcl ''; - buildPhase='' - make depend - make - ''; - postInstall='' mkdir -p $out/bin cp -a ../gildas-exe-${srcVersion}/* $out From 72dc6fdf47726e92cfa04833eb6215208c88a14e Mon Sep 17 00:00:00 2001 From: Sebastien Maret Date: Fri, 6 Jul 2018 10:35:53 +0200 Subject: [PATCH 2/6] gildas: disable parallel building --- pkgs/applications/science/astronomy/gildas/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/science/astronomy/gildas/default.nix b/pkgs/applications/science/astronomy/gildas/default.nix index 6ecfb834ae63..4c8775330b7d 100644 --- a/pkgs/applications/science/astronomy/gildas/default.nix +++ b/pkgs/applications/science/astronomy/gildas/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { sha256 = "0kl3zf6b1kv8hgsfrarsnm2gnrdax3vi8f856249y4nxsa7lbv2i"; }; - enableParallelBuilding = true; + enableParallelBuilding = false; nativeBuildInputs = [ pkgconfig groff perl getopt gfortran which ]; From 8ae9e7ef103938f2f07353f7e9c813068f024253 Mon Sep 17 00:00:00 2001 From: Sebastien Maret Date: Fri, 6 Jul 2018 14:02:37 +0200 Subject: [PATCH 3/6] gildas: apply upstream fix and restore parallel building --- .../science/astronomy/gildas/default.nix | 4 ++-- .../science/astronomy/gildas/mod.patch | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 pkgs/applications/science/astronomy/gildas/mod.patch diff --git a/pkgs/applications/science/astronomy/gildas/default.nix b/pkgs/applications/science/astronomy/gildas/default.nix index 4c8775330b7d..f7c0e17e0ade 100644 --- a/pkgs/applications/science/astronomy/gildas/default.nix +++ b/pkgs/applications/science/astronomy/gildas/default.nix @@ -16,13 +16,13 @@ stdenv.mkDerivation rec { sha256 = "0kl3zf6b1kv8hgsfrarsnm2gnrdax3vi8f856249y4nxsa7lbv2i"; }; - enableParallelBuilding = false; + enableParallelBuilding = true; nativeBuildInputs = [ pkgconfig groff perl getopt gfortran which ]; buildInputs = [ gtk2-x11 lesstif cfitsio python27Env ]; - patches = [ ./wrapper.patch ./return-error-code.patch ./clang.patch ]; + patches = [ ./wrapper.patch ./return-error-code.patch ./clang.patch ./mod.patch ]; configurePhase='' substituteInPlace admin/wrapper.sh --replace '%%OUT%%' $out diff --git a/pkgs/applications/science/astronomy/gildas/mod.patch b/pkgs/applications/science/astronomy/gildas/mod.patch new file mode 100644 index 000000000000..c917b4674f13 --- /dev/null +++ b/pkgs/applications/science/astronomy/gildas/mod.patch @@ -0,0 +1,17 @@ +diff -ruN gildas-src-jul18a/admin/Makefile.build gildas-src-jul18a.mod/admin/Makefile.build +--- gildas-src-jul18a/admin/Makefile.build 2018-06-14 14:36:54.000000000 +0200 ++++ gildas-src-jul18a.mod/admin/Makefile.build 2018-07-06 13:31:46.000000000 +0200 +@@ -291,6 +291,13 @@ + win-$(LIB_IDENTITY)-und.def -o $@ $(FLDLIBS) $(LIB_DEPENDS) $(ADD_LIBS) $(SYS_LIBS)) + endif + ++# Dummy rules for modules just so that make consider the module a ++# valid dependency when first parsing the makefiles. This rule should ++# never be applied as the modules are a by-product of the compilation ++# of the object ++$(builddir)/%.mod: ++ echo "dummy" > /dev/null ++ + # Fortran executables + $(bindir)/% : $(builddir)/%.o | $(bindir) + $(FC) $(ALL_FLDFLAGS) $< $(OBJECTS) -o $@ \ From 9092083e9ed5698322f735ae3adf09cf49d0f960 Mon Sep 17 00:00:00 2001 From: Sebastien Maret Date: Sat, 21 Jul 2018 13:09:33 +0200 Subject: [PATCH 4/6] gildas: fix architecture detection for aarch64 --- .../science/astronomy/gildas/aarch64.patch | 12 ++++++++++++ .../science/astronomy/gildas/default.nix | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 pkgs/applications/science/astronomy/gildas/aarch64.patch diff --git a/pkgs/applications/science/astronomy/gildas/aarch64.patch b/pkgs/applications/science/astronomy/gildas/aarch64.patch new file mode 100644 index 000000000000..40696a03dec7 --- /dev/null +++ b/pkgs/applications/science/astronomy/gildas/aarch64.patch @@ -0,0 +1,12 @@ +diff -ruN gildas-src-jul18a/admin/define-system.sh gildas-src-jul18a.aarch64/admin/define-system.sh +--- gildas-src-jul18a/admin/define-system.sh 2018-06-12 15:22:32.000000000 +0200 ++++ gildas-src-jul18a.aarch64/admin/define-system.sh 2018-07-21 13:05:52.000000000 +0200 +@@ -174,7 +174,7 @@ + DEFAULT_CONFIG= # Default config is empty + case `uname` in + Linux) +- if [ `uname -m | grep -c "x86_64"` -ne 0 ]; then ++ if [ `uname -m | grep -c "64"` -ne 0 ]; then + GAG_MACHINE=x86_64 + else + GAG_MACHINE=pc diff --git a/pkgs/applications/science/astronomy/gildas/default.nix b/pkgs/applications/science/astronomy/gildas/default.nix index f7c0e17e0ade..e9b39a0103e5 100644 --- a/pkgs/applications/science/astronomy/gildas/default.nix +++ b/pkgs/applications/science/astronomy/gildas/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { buildInputs = [ gtk2-x11 lesstif cfitsio python27Env ]; - patches = [ ./wrapper.patch ./return-error-code.patch ./clang.patch ./mod.patch ]; + patches = [ ./wrapper.patch ./return-error-code.patch ./clang.patch ./mod.patch ./aarch64.patch ]; configurePhase='' substituteInPlace admin/wrapper.sh --replace '%%OUT%%' $out From 170426510ecc6ed5a667f99006ea8d603f86534d Mon Sep 17 00:00:00 2001 From: Sebastien Maret Date: Mon, 9 Jul 2018 19:23:22 +0200 Subject: [PATCH 5/6] gildas: patch perl interpreter path --- pkgs/applications/science/astronomy/gildas/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/applications/science/astronomy/gildas/default.nix b/pkgs/applications/science/astronomy/gildas/default.nix index e9b39a0103e5..4734e6e33168 100644 --- a/pkgs/applications/science/astronomy/gildas/default.nix +++ b/pkgs/applications/science/astronomy/gildas/default.nix @@ -27,6 +27,7 @@ stdenv.mkDerivation rec { configurePhase='' substituteInPlace admin/wrapper.sh --replace '%%OUT%%' $out substituteInPlace admin/wrapper.sh --replace '%%PYTHONHOME%%' ${python27Env} + substituteInPlace utilities/main/gag-makedepend.pl --replace '/usr/bin/perl' ${perl}/bin/perl source admin/gildas-env.sh -c gfortran -o openmp echo "gag_doc: $out/share/doc/" >> kernel/etc/gag.dico.lcl ''; From e3b42396c6e2c751bdbff13c62637c626c73c19f Mon Sep 17 00:00:00 2001 From: Sebastien Maret Date: Fri, 10 Aug 2018 10:13:31 +0200 Subject: [PATCH 6/6] gildas: update source url --- pkgs/applications/science/astronomy/gildas/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/science/astronomy/gildas/default.nix b/pkgs/applications/science/astronomy/gildas/default.nix index 4734e6e33168..7ede379fb499 100644 --- a/pkgs/applications/science/astronomy/gildas/default.nix +++ b/pkgs/applications/science/astronomy/gildas/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { name = "gildas-${version}"; src = fetchurl { - url = "http://www.iram.fr/~gildas/dist/gildas-src-${srcVersion}.tar.gz"; + url = "http://www.iram.fr/~gildas/dist/archive/gildas/gildas-src-${srcVersion}.tar.gz"; sha256 = "0kl3zf6b1kv8hgsfrarsnm2gnrdax3vi8f856249y4nxsa7lbv2i"; };