From 8ae9e7ef103938f2f07353f7e9c813068f024253 Mon Sep 17 00:00:00 2001 From: Sebastien Maret Date: Fri, 6 Jul 2018 14:02:37 +0200 Subject: [PATCH] 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 4c8775330b7..f7c0e17e0ad 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 00000000000..c917b4674f1 --- /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 $@ \