summary refs log tree commit diff
path: root/pkgs/applications/science/astronomy/gildas/default.nix
diff options
context:
space:
mode:
authorSebastien Maret <sebastien.maret@univ-grenoble-alpes.fr>2018-05-31 14:00:33 +0200
committerSebastien Maret <sebastien.maret@univ-grenoble-alpes.fr>2018-06-26 11:09:45 +0200
commit8603f343a326b954f7a61ec8f07322f0f8712cf6 (patch)
tree207f4bff357d3c8fcaa16be39a404fa3a4a77e15 /pkgs/applications/science/astronomy/gildas/default.nix
parent1b3111e4361fdc337390448b22b4271437e7efc6 (diff)
downloadnixpkgs-8603f343a326b954f7a61ec8f07322f0f8712cf6.tar
nixpkgs-8603f343a326b954f7a61ec8f07322f0f8712cf6.tar.gz
nixpkgs-8603f343a326b954f7a61ec8f07322f0f8712cf6.tar.bz2
nixpkgs-8603f343a326b954f7a61ec8f07322f0f8712cf6.tar.lz
nixpkgs-8603f343a326b954f7a61ec8f07322f0f8712cf6.tar.xz
nixpkgs-8603f343a326b954f7a61ec8f07322f0f8712cf6.tar.zst
nixpkgs-8603f343a326b954f7a61ec8f07322f0f8712cf6.zip
gildas: init at 201806_a
Diffstat (limited to 'pkgs/applications/science/astronomy/gildas/default.nix')
-rw-r--r--pkgs/applications/science/astronomy/gildas/default.nix68
1 files changed, 68 insertions, 0 deletions
diff --git a/pkgs/applications/science/astronomy/gildas/default.nix b/pkgs/applications/science/astronomy/gildas/default.nix
new file mode 100644
index 00000000000..bd7288f2e9c
--- /dev/null
+++ b/pkgs/applications/science/astronomy/gildas/default.nix
@@ -0,0 +1,68 @@
+{ stdenv, fetchurl, gtk2-x11 , pkgconfig , python27 , gfortran , lesstif
+, cfitsio , getopt , perl , groff , which , openblas
+}:
+
+let
+  python27Env = python27.withPackages(ps: with ps; [ numpy ]);
+in
+
+stdenv.mkDerivation rec {
+  srcVersion = "jun18a";
+  version = "20180601_a";
+  name = "gildas-${version}";
+
+  src = fetchurl {
+    url = "http://www.iram.fr/~gildas/dist/gildas-src-${srcVersion}.tar.gz";
+    sha256 = "0k4x0g69fphb1759cwcw6bbs8imwmq0qwj6zqixxk60skk4n4jvb";
+  };
+
+  enableParallelBuilding = true;
+
+  nativeBuildInputs = [ pkgconfig groff perl getopt gfortran which ];
+
+  buildInputs = [ gtk2-x11 lesstif cfitsio python27Env openblas ];
+
+  patches = [ ./wrapper.patch ./return-error-code.patch ./openblas.patch ./clang.patch ];
+
+  configurePhase=''
+    substituteInPlace admin/wrapper.sh --replace '%%OUT%%' $out
+    substituteInPlace admin/wrapper.sh --replace '%%PYTHONHOME%%' ${python27Env}
+    source admin/gildas-env.sh -c gfortran -o openmp -s ${openblas}/lib
+    echo "gag_doc:        $out/share/doc/" >> kernel/etc/gag.dico.lcl
+  '';
+
+  buildPhase=''
+    make depend
+    make install
+  '';
+
+  installPhase=''
+    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;
+  };
+
+}