Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
80 lines
1.6 KiB
Nix
80 lines
1.6 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
autoreconfHook,
|
|
makeWrapper,
|
|
fftw,
|
|
lapack,
|
|
openblas,
|
|
runCommandLocal,
|
|
raspa,
|
|
raspa-data,
|
|
}:
|
|
stdenv.mkDerivation rec {
|
|
pname = "raspa";
|
|
version = "2.0.47";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "iRASPA";
|
|
repo = "RASPA2";
|
|
rev = "v${version}";
|
|
hash = "sha256-i8Y+pejiOuyPNJto+/0CmRoAnMljCrnDFx8qDh4I/68=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
autoreconfHook
|
|
makeWrapper
|
|
];
|
|
|
|
buildInputs = [
|
|
fftw
|
|
lapack
|
|
openblas
|
|
];
|
|
|
|
# Prepare for the Python binding packaging.
|
|
strictDeps = true;
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
preAutoreconf = ''
|
|
mkdir "m4"
|
|
'';
|
|
|
|
postAutoreconf = ''
|
|
automake --add-missing
|
|
autoconf
|
|
'';
|
|
|
|
doCheck = true;
|
|
|
|
# Wrap with RASPA_DIR
|
|
# so that users can run $out/bin/simulate directly
|
|
# without the need of a `run` script.
|
|
postInstall = ''
|
|
wrapProgram "$out/bin/simulate" \
|
|
--set RASPA_DIR "$out"
|
|
'';
|
|
|
|
passthru.tests.run-an-example = runCommandLocal "raspa-test-run-an-example" { } ''
|
|
set -eu -o pipefail
|
|
exampleDir="${raspa-data}/share/raspa/examples/Basic/1_MC_Methane_in_Box"
|
|
exampleDirWritable="$(basename "$exampleDir")"
|
|
cp -rT "$exampleDir" "./$exampleDirWritable"
|
|
chmod u+rw -R "$exampleDirWritable"
|
|
cd "$exampleDirWritable"
|
|
${raspa}/bin/simulate
|
|
touch "$out"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "General purpose classical molecular simulation package";
|
|
homepage = "https://iraspa.org/raspa/";
|
|
license = licenses.mit;
|
|
platforms = platforms.all;
|
|
maintainers = with maintainers; [ ShamrockLee ];
|
|
mainProgram = "simulate";
|
|
};
|
|
}
|