nixpkgs/pkgs/by-name/ca/calculix/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

46 lines
1022 B
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, gfortran, arpack, spooles, blas, lapack }:
2019-08-14 16:18:38 +00:00
assert (blas.isILP64 == lapack.isILP64 &&
blas.isILP64 == arpack.isILP64 &&
!blas.isILP64);
2019-08-14 16:18:38 +00:00
stdenv.mkDerivation rec {
pname = "calculix";
2022-04-25 10:56:36 +00:00
version = "2.19";
2019-08-14 16:18:38 +00:00
src = fetchurl {
url = "http://www.dhondt.de/ccx_${version}.src.tar.bz2";
2022-04-25 10:56:36 +00:00
sha256 = "01vdy9sns58hkm39z6d0r5y7gzqf5z493d18jin9krqib1l6jnn7";
2019-08-14 16:18:38 +00:00
};
nativeBuildInputs = [ gfortran ];
buildInputs = [ arpack spooles blas lapack ];
2019-08-14 16:18:38 +00:00
env.NIX_CFLAGS_COMPILE = toString [
2022-04-25 10:51:12 +00:00
"-I${spooles}/include/spooles"
"-std=legacy"
];
2019-08-14 16:18:38 +00:00
patches = [
./calculix.patch
];
postPatch = ''
cd ccx*/src
'';
installPhase = ''
install -Dm0755 ccx_${version} $out/bin/ccx
'';
meta = with lib; {
2019-08-14 16:18:38 +00:00
homepage = "http://www.calculix.de/";
description = "Three-dimensional structural finite element program";
mainProgram = "ccx";
2019-08-14 16:18:38 +00:00
license = licenses.gpl2Plus;
maintainers = with maintainers; [ gebner ];
platforms = platforms.unix;
};
}