forked from mirrors/nixpkgs
commit
e714f85b2f
22
pkgs/applications/science/astronomy/gildas/clang.patch
Normal file
22
pkgs/applications/science/astronomy/gildas/clang.patch
Normal file
|
@ -0,0 +1,22 @@
|
|||
diff -ruN gildas-src-jun18a/admin/define-system.sh gildas-src-jun18a.clang/admin/define-system.sh
|
||||
--- gildas-src-jun18a/admin/define-system.sh 2018-03-12 11:07:57.000000000 +0100
|
||||
+++ gildas-src-jun18a.clang/admin/define-system.sh 2018-06-12 14:56:14.000000000 +0200
|
||||
@@ -218,13 +218,13 @@
|
||||
else
|
||||
GAG_MACHINE=pc
|
||||
fi
|
||||
- if which gcc > /dev/null 2>&1; then
|
||||
- DEFAULT_CCOMPILER=gcc
|
||||
+ if which clang > /dev/null 2>&1; then
|
||||
+ DEFAULT_CCOMPILER=clang
|
||||
fi
|
||||
- if which g++ > /dev/null 2>&1; then
|
||||
- DEFAULT_CXXCOMPILER=g++
|
||||
- elif which clang++ > /dev/null 2>&1; then
|
||||
+ if which clang++ > /dev/null 2>&1; then
|
||||
DEFAULT_CXXCOMPILER=clang++
|
||||
+ elif which g++ > /dev/null 2>&1; then
|
||||
+ DEFAULT_CXXCOMPILER=g++
|
||||
fi
|
||||
if which ifort > /dev/null 2>&1; then
|
||||
DEFAULT_FCOMPILER=ifort
|
68
pkgs/applications/science/astronomy/gildas/default.nix
Normal file
68
pkgs/applications/science/astronomy/gildas/default.nix
Normal file
|
@ -0,0 +1,68 @@
|
|||
{ stdenv, fetchurl, gtk2-x11 , pkgconfig , python27 , gfortran , lesstif
|
||||
, cfitsio , getopt , perl , groff , which
|
||||
}:
|
||||
|
||||
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 ];
|
||||
|
||||
patches = [ ./wrapper.patch ./return-error-code.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
|
||||
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
|
||||
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;
|
||||
};
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
diff --new-file -r -u gildas-src-dec17a.orig/admin/gildas-env.sh gildas-src-dec17a/admin/gildas-env.sh
|
||||
--- gildas-src-dec17a.orig/admin/gildas-env.sh 2017-10-24 11:39:18.000000000 +0200
|
||||
+++ gildas-src-dec17a/admin/gildas-env.sh 2017-12-01 11:17:32.051953670 +0100
|
||||
@@ -1010,6 +1010,9 @@
|
||||
gagenv_message "$gagenv_errors error(s) and $gagenv_warnings warning(s) detected"
|
||||
if [ $gagenv_errors -ne 0 ]; then
|
||||
gagenv_message "GILDAS will not compile"
|
||||
+ gagenv_clean
|
||||
+ echo
|
||||
+ \return 1
|
||||
elif [ $gagenv_warnings -ne 0 ]; then
|
||||
gagenv_message "GILDAS will compile with some optional features disabled"
|
||||
else
|
19
pkgs/applications/science/astronomy/gildas/wrapper.patch
Normal file
19
pkgs/applications/science/astronomy/gildas/wrapper.patch
Normal file
|
@ -0,0 +1,19 @@
|
|||
diff --new-file -r -u gildas-src-feb17d.orig/admin/wrapper.sh gildas-src-feb17d/admin/wrapper.sh
|
||||
--- gildas-src-feb17d.orig/admin/wrapper.sh 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ gildas-src-feb17d/admin/wrapper.sh 2017-05-18 21:00:01.660778782 +0200
|
||||
@@ -0,0 +1,15 @@
|
||||
+#!/bin/sh -e
|
||||
+
|
||||
+export GAG_ROOT_DIR="%%OUT%%"
|
||||
+export GAG_PATH="${GAG_ROOT_DIR}/etc"
|
||||
+export GAG_EXEC_SYSTEM="libexec"
|
||||
+export PYTHONHOME="%%PYTHONHOME%%"
|
||||
+if [ -z "\$PYTHONPATH" ]; then
|
||||
+ PYTHONPATH="${GAG_ROOT_DIR}/${GAG_EXEC_SYSTEM}/python"
|
||||
+else
|
||||
+ PYTHONPATH="${GAG_ROOT_DIR}/${GAG_EXEC_SYSTEM}/python:${PYTHONPATH}"
|
||||
+fi
|
||||
+export PYTHONPATH
|
||||
+export LD_LIBRARY_PATH=${GAG_ROOT_DIR}/${GAG_EXEC_SYSTEM}/lib/
|
||||
+me=`basename $0`
|
||||
+exec ${GAG_ROOT_DIR}/${GAG_EXEC_SYSTEM}/bin/${me} ${*}
|
|
@ -20727,6 +20727,8 @@ with pkgs;
|
|||
|
||||
fityk = callPackage ../applications/science/misc/fityk { };
|
||||
|
||||
gildas = callPackage ../applications/science/astronomy/gildas { };
|
||||
|
||||
gplates = callPackage ../applications/science/misc/gplates {
|
||||
boost = boost160;
|
||||
cgal = cgal.override { boost = boost160; };
|
||||
|
|
Loading…
Reference in a new issue