nixpkgs/pkgs/applications/science/chemistry/octopus/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00

63 lines
1.4 KiB
Nix

{ lib, stdenv, fetchFromGitLab, symlinkJoin, gfortran, perl, procps
, libyaml, libxc, fftw, blas, lapack, gsl, netcdf, arpack, autoreconfHook
, python3
}:
assert (!blas.isILP64) && (!lapack.isILP64);
stdenv.mkDerivation rec {
pname = "octopus";
version = "10.3";
src = fetchFromGitLab {
owner = "octopus-code";
repo = "octopus";
rev = version;
sha256 = "1axr3j53mi30gm3f645ga5jkhxbc7rbx432w2k2lgg6g9dv3fcs4";
};
nativeBuildInputs = [ perl procps autoreconfHook ];
buildInputs = [
libyaml
gfortran
libxc
blas
lapack
gsl
fftw
netcdf
arpack
(python3.withPackages (ps: [ ps.pyyaml ]))
];
configureFlags = [
"--with-yaml-prefix=${libyaml}"
"--with-blas=-lblas"
"--with-lapack=-llapack"
"--with-fftw-prefix=${fftw.dev}"
"--with-gsl-prefix=${gsl}"
"--with-libxc-prefix=${libxc}"
];
doCheck = false;
checkTarget = "check-short";
postPatch = ''
patchShebangs ./
'';
postConfigure = ''
patchShebangs testsuite/oct-run_testsuite.sh
'';
enableParallelBuilding = true;
meta = with lib; {
description = "Real-space time dependent density-functional theory code";
homepage = "https://octopus-code.org";
maintainers = with maintainers; [ markuskowa ];
license = with licenses; [ gpl2Only asl20 lgpl3Plus bsd3 ];
platforms = [ "x86_64-linux" ];
};
}