Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: cc06f9c24954
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 430dfb8082fe
Choose a head ref
  • 2 commits
  • 2 files changed
  • 2 contributors

Commits on Jan 14, 2020

  1. Copy the full SHA
    0956fca View commit details

Commits on Jan 17, 2020

  1. Merge pull request #77631 from smaret/gildas-202001a

    gildas: 20191201_a -> 20200101_a
    veprbl authored Jan 17, 2020
    Copy the full SHA
    430dfb8 View commit details
Showing with 24 additions and 10 deletions.
  1. +12 −10 pkgs/applications/science/astronomy/gildas/default.nix
  2. +12 −0 pkgs/applications/science/astronomy/gildas/imager-py3.patch
22 changes: 12 additions & 10 deletions pkgs/applications/science/astronomy/gildas/default.nix
Original file line number Diff line number Diff line change
@@ -1,40 +1,42 @@
{ stdenv, fetchurl, gtk2-x11 , pkgconfig , python27 , gfortran , lesstif
, cfitsio , getopt , perl , groff , which, darwin
{ stdenv, fetchurl, gtk2-x11 , pkgconfig , python3 , gfortran , lesstif
, cfitsio , getopt , perl , groff , which, darwin, ncurses
}:

let
python27Env = python27.withPackages(ps: with ps; [ numpy ]);
python3Env = python3.withPackages(ps: with ps; [ numpy ]);
in

stdenv.mkDerivation rec {
srcVersion = "dec19a";
version = "20191201_a";
srcVersion = "jan20a";
version = "20200101_a";
pname = "gildas";

src = fetchurl {
# For each new release, the upstream developers of Gildas move the
# source code of the previous release to a different directory
urls = [ "http://www.iram.fr/~gildas/dist/gildas-src-${srcVersion}.tar.xz"
"http://www.iram.fr/~gildas/dist/archive/gildas/gildas-src-${srcVersion}.tar.xz" ];
sha256 = "0kwq5gzgzx5hkbabwvbrw2958pqz4m2s501k5cbllgxh4sqp86b1";
sha256 = "12n08pax7gwg2z121ix3ah5prq3yswqnf2yc8jgs4i9rgkpbsfzz";
};

enableParallelBuilding = true;
# Python scripts are not converted to Python 3 syntax when parallel
# building is turned on. Disable it until this is fixed upstream.
enableParallelBuilding = false;

nativeBuildInputs = [ pkgconfig groff perl getopt gfortran which ];

buildInputs = [ gtk2-x11 lesstif cfitsio python27Env ]
buildInputs = [ gtk2-x11 lesstif cfitsio python3Env ncurses ]
++ stdenv.lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ CoreFoundation ]);

patches = [ ./wrapper.patch ./clang.patch ./aarch64.patch ];
patches = [ ./wrapper.patch ./clang.patch ./aarch64.patch ./imager-py3.patch ];

NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang "-Wno-unused-command-line-argument";

NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin (with darwin.apple_sdk.frameworks; "-F${CoreFoundation}/Library/Frameworks");

configurePhase=''
substituteInPlace admin/wrapper.sh --replace '%%OUT%%' $out
substituteInPlace admin/wrapper.sh --replace '%%PYTHONHOME%%' ${python27Env}
substituteInPlace admin/wrapper.sh --replace '%%PYTHONHOME%%' ${python3Env}
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
12 changes: 12 additions & 0 deletions pkgs/applications/science/astronomy/gildas/imager-py3.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff -ruN gildas-src-jan20a.orig/contrib/imager/pro/define.ima gildas-src-jan20a/contrib/imager/pro/define.ima
--- gildas-src-jan20a.orig/contrib/imager/pro/define.ima 2020-01-01 02:15:16.000000000 +0100
+++ gildas-src-jan20a/contrib/imager/pro/define.ima 2020-01-14 11:18:46.000000000 +0100
@@ -9,7 +9,7 @@
!
! Patch for a Bug on Mac-OS/X where Python blocks if activated first
! from a script launched by a widget.
-python print "Starting Python"
+python print("Starting Python")
!
! INPUT, GO and UVT_CONVERT always defined by GreG
define command GO "@ p_go.ima" gag_pro:go_greg.hlp