Skip to content

Instantly share code, notes, and snippets.

@NickCao
Created August 5, 2022 07:57
Show Gist options
  • Save NickCao/69cd94e7f3786b7ca93387728c3e36f6 to your computer and use it in GitHub Desktop.
Save NickCao/69cd94e7f3786b7ca93387728c3e36f6 to your computer and use it in GitHub Desktop.
casacore
{ lib
, stdenv
, fetchFromGitHub
, cmake
, gfortran
, flex
, bison
, readline
, blas
, fftw
, fftwFloat
, cfitsio
, wcslib
, boost
, gsl
, python3
, hdf5
, mpi
, sofa
}:
stdenv.mkDerivation rec {
pname = "casacore";
version = "3.5.0";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "v${version}";
hash = "sha256-VDz0IqPrACEEALYn0oPlcrTz5FbJhNeUrQGZwagGh38=";
};
strictDeps = true;
nativeBuildInputs = [
cmake
gfortran
flex
bison
];
buildInputs = [
readline
blas
fftw
fftwFloat
cfitsio
wcslib
(boost.override { enablePython = true; python = python3; })
gsl
python3
python3.pkgs.numpy
hdf5
mpi
sofa
];
cmakeFlags = [
# "-DUSE_ADIOS2=ON"
"-DUSE_HDF5=ON"
"-DUSE_OPENMP=ON"
"-DUSE_MPI=ON"
];
}
{ lib
, stdenv
, fetchurl
, gfortran
}:
stdenv.mkDerivation {
pname = "sofa";
version = "2021-05-12";
src = fetchurl {
url = "http://www.iausofa.org/2021_0512_F/sofa_f-20210512.tar.gz";
hash = "sha256-hInhxvyRAOG3uOzjI7CPWGrf32vs0UkKVMOjtS3BEWk=";
};
sourceRoot = "sofa/20210512/f77/src";
doCheck = true;
checkTarget = "test";
postPatch = ''
substituteInPlace makefile \
--replace 'INSTALL_DIR = $(HOME)' 'INSTALL_DIR = $(out)'
'';
nativeBuildInputs = [ gfortran ];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment