nixpkgs-suyu/pkgs/applications/science/astronomy/gildas/default.nix

65 lines
2.2 KiB
Nix
Raw Normal View History

2018-05-31 14:00:33 +02:00
{ stdenv, fetchurl, gtk2-x11 , pkgconfig , python27 , gfortran , lesstif
, cfitsio , getopt , perl , groff , which
2018-05-31 14:00:33 +02:00
}:
let
python27Env = python27.withPackages(ps: with ps; [ numpy ]);
in
stdenv.mkDerivation rec {
2018-07-02 17:16:25 +02:00
srcVersion = "jul18a";
version = "20180701_a";
2018-05-31 14:00:33 +02:00
name = "gildas-${version}";
src = fetchurl {
2018-08-10 10:13:31 +02:00
url = "http://www.iram.fr/~gildas/dist/archive/gildas/gildas-src-${srcVersion}.tar.gz";
2018-07-02 17:16:25 +02:00
sha256 = "0kl3zf6b1kv8hgsfrarsnm2gnrdax3vi8f856249y4nxsa7lbv2i";
2018-05-31 14:00:33 +02:00
};
enableParallelBuilding = true;
2018-05-31 14:00:33 +02:00
nativeBuildInputs = [ pkgconfig groff perl getopt gfortran which ];
buildInputs = [ gtk2-x11 lesstif cfitsio python27Env ];
2018-05-31 14:00:33 +02:00
patches = [ ./wrapper.patch ./return-error-code.patch ./clang.patch ./mod.patch ./aarch64.patch ];
2018-05-31 14:00:33 +02:00
configurePhase=''
substituteInPlace admin/wrapper.sh --replace '%%OUT%%' $out
substituteInPlace admin/wrapper.sh --replace '%%PYTHONHOME%%' ${python27Env}
2018-07-09 19:23:22 +02:00
substituteInPlace utilities/main/gag-makedepend.pl --replace '/usr/bin/perl' ${perl}/bin/perl
source admin/gildas-env.sh -c gfortran -o openmp
2018-05-31 14:00:33 +02:00
echo "gag_doc: $out/share/doc/" >> kernel/etc/gag.dico.lcl
'';
2018-06-14 09:31:51 +02:00
postInstall=''
2018-05-31 14:00:33 +02:00
mkdir -p $out/bin
cp -a ../gildas-exe-${srcVersion}/* $out
mv $out/$GAG_EXEC_SYSTEM $out/libexec
cp admin/wrapper.sh $out/bin/gildas-wrapper.sh
chmod 755 $out/bin/gildas-wrapper.sh
for i in $out/libexec/bin/* ; do
ln -s $out/bin/gildas-wrapper.sh $out/bin/$(basename "$i")
done
'';
meta = {
description = "Radioastronomy data analysis software";
longDescription = ''
GILDAS is a collection of state-of-the-art software
oriented toward (sub-)millimeter radioastronomical
applications (either single-dish or interferometer).
It is daily used to reduce all data acquired with the
IRAM 30M telescope and Plateau de Bure Interferometer
PDBI (except VLBI observations). GILDAS is easily
extensible. GILDAS is written in Fortran-90, with a
few parts in C/C++ (mainly keyboard interaction,
plotting, widgets).'';
homepage = http://www.iram.fr/IRAMFR/GILDAS/gildas.html;
license = stdenv.lib.licenses.free;
maintainers = [ stdenv.lib.maintainers.bzizou stdenv.lib.maintainers.smaret ];
platforms = stdenv.lib.platforms.all;
};
}