mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-12 16:53:21 +00:00
f9fdf2d402
with structuredAttrs lists will be bash arrays which cannot be exported which will be a issue with some patches and some wrappers like cc-wrapper this makes it clearer that NIX_CFLAGS_COMPILE must be a string as lists in env cause a eval failure
45 lines
997 B
Nix
45 lines
997 B
Nix
{ lib, stdenv, fetchurl, gfortran, arpack, spooles, blas, lapack }:
|
|
|
|
assert (blas.isILP64 == lapack.isILP64 &&
|
|
blas.isILP64 == arpack.isILP64 &&
|
|
!blas.isILP64);
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "calculix";
|
|
version = "2.19";
|
|
|
|
src = fetchurl {
|
|
url = "http://www.dhondt.de/ccx_${version}.src.tar.bz2";
|
|
sha256 = "01vdy9sns58hkm39z6d0r5y7gzqf5z493d18jin9krqib1l6jnn7";
|
|
};
|
|
|
|
nativeBuildInputs = [ gfortran ];
|
|
|
|
buildInputs = [ arpack spooles blas lapack ];
|
|
|
|
env.NIX_CFLAGS_COMPILE = toString [
|
|
"-I${spooles}/include/spooles"
|
|
"-std=legacy"
|
|
];
|
|
|
|
patches = [
|
|
./calculix.patch
|
|
];
|
|
|
|
postPatch = ''
|
|
cd ccx*/src
|
|
'';
|
|
|
|
installPhase = ''
|
|
install -Dm0755 ccx_${version} $out/bin/ccx
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "http://www.calculix.de/";
|
|
description = "Three-dimensional structural finite element program";
|
|
license = licenses.gpl2Plus;
|
|
maintainers = with maintainers; [ gebner ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|