nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchurl,
5 gfortran,
6 mpi,
7}:
8
9stdenv.mkDerivation {
10 version = "1.10";
11 pname = "DL_POLY_Classic";
12
13 src = fetchurl {
14 url = "https://ccpforge.cse.rl.ac.uk/gf/download/frsrelease/574/8924/dl_class_1.10.tar.gz";
15 sha256 = "1r76zvln3bwycxlmqday0sqzv5j260y7mdh66as2aqny6jzd5ld7";
16 };
17
18 nativeBuildInputs = [ gfortran ];
19
20 buildInputs = [ mpi ];
21
22 configurePhase = ''
23 runHook preConfigure
24
25 cd source
26 cp -v ../build/MakePAR Makefile
27
28 runHook postConfigure
29 '';
30
31 # https://gitlab.com/DL_POLY_Classic/dl_poly/-/blob/master/README
32 env.NIX_CFLAGS_COMPILE = "-fallow-argument-mismatch";
33
34 buildPhase = ''
35 make dlpoly
36 '';
37
38 installPhase = ''
39 mkdir -p $out/bin
40 cp -v ../execute/DLPOLY.X $out/bin
41 '';
42
43 meta = with lib; {
44 homepage = "https://www.ccp5.ac.uk/DL_POLY_C";
45 description = "DL_POLY Classic is a general purpose molecular dynamics simulation package";
46 mainProgram = "DLPOLY.X";
47 license = licenses.bsdOriginal;
48 platforms = platforms.unix;
49 maintainers = [ maintainers.costrouc ];
50 };
51}