diff options
author | Gabriel Ebner <gebner@gebner.org> | 2019-08-14 18:18:38 +0200 |
---|---|---|
committer | Gabriel Ebner <gebner@gebner.org> | 2019-08-14 19:09:40 +0200 |
commit | f91904a889cc967043dc4ec778aad288ae7934f9 (patch) | |
tree | 65de37338205259cacdb4c5a9a88508bf8cded78 /pkgs/applications/science/math/calculix | |
parent | a736d87393a93b0c29a943f92ce6ed4eb6f2ff73 (diff) | |
download | nixlib-f91904a889cc967043dc4ec778aad288ae7934f9.tar nixlib-f91904a889cc967043dc4ec778aad288ae7934f9.tar.gz nixlib-f91904a889cc967043dc4ec778aad288ae7934f9.tar.bz2 nixlib-f91904a889cc967043dc4ec778aad288ae7934f9.tar.lz nixlib-f91904a889cc967043dc4ec778aad288ae7934f9.tar.xz nixlib-f91904a889cc967043dc4ec778aad288ae7934f9.tar.zst nixlib-f91904a889cc967043dc4ec778aad288ae7934f9.zip |
calculix: init at 2.15
Diffstat (limited to 'pkgs/applications/science/math/calculix')
-rw-r--r-- | pkgs/applications/science/math/calculix/calculix.patch | 31 | ||||
-rw-r--r-- | pkgs/applications/science/math/calculix/default.nix | 39 |
2 files changed, 70 insertions, 0 deletions
diff --git a/pkgs/applications/science/math/calculix/calculix.patch b/pkgs/applications/science/math/calculix/calculix.patch new file mode 100644 index 000000000000..311421f2ef54 --- /dev/null +++ b/pkgs/applications/science/math/calculix/calculix.patch @@ -0,0 +1,31 @@ +diff --git a/ccx_2.15/src/Makefile b/ccx_2.15/src/Makefile +index 9cab2fc..6e977b8 100755 +--- a/ccx_2.15/src/Makefile ++++ b/ccx_2.15/src/Makefile +@@ -1,6 +1,6 @@ + + CFLAGS = -Wall -O3 -I ../../../SPOOLES.2.2 -DARCH="Linux" -DSPOOLES -DARPACK -DMATRIXSTORAGE -DNETWORKOUT +-FFLAGS = -Wall -O3 ++FFLAGS = -Wall -O3 + + CC=cc + FC=gfortran +@@ -18,15 +18,10 @@ OCCXF = $(SCCXF:.f=.o) + OCCXC = $(SCCXC:.c=.o) + OCCXMAIN = $(SCCXMAIN:.c=.o) + +-DIR=../../../SPOOLES.2.2 ++LIBS = -lpthread -lm -lc -lspooles -larpack -lopenblas + +-LIBS = \ +- $(DIR)/spooles.a \ +- ../../../ARPACK/libarpack_INTEL.a \ +- -lpthread -lm -lc +- +-ccx_2.15: $(OCCXMAIN) ccx_2.15.a $(LIBS) +- ./date.pl; $(CC) $(CFLAGS) -c ccx_2.15.c; $(FC) -Wall -O3 -o $@ $(OCCXMAIN) ccx_2.15.a $(LIBS) ++ccx_2.15: $(OCCXMAIN) ccx_2.15.a ++ $(CC) $(CFLAGS) -c ccx_2.15.c; $(FC) -Wall -O3 -o $@ $(OCCXMAIN) ccx_2.15.a $(LIBS) + + ccx_2.15.a: $(OCCXF) $(OCCXC) + ar vr $@ $? diff --git a/pkgs/applications/science/math/calculix/default.nix b/pkgs/applications/science/math/calculix/default.nix new file mode 100644 index 000000000000..24d5f99ec32a --- /dev/null +++ b/pkgs/applications/science/math/calculix/default.nix @@ -0,0 +1,39 @@ +{ stdenv, fetchurl, gfortran, arpack, spooles, openblas }: + +stdenv.mkDerivation rec { + pname = "calculix"; + version = "2.15"; + + src = fetchurl { + url = "http://www.dhondt.de/ccx_${version}.src.tar.bz2"; + sha256 = "0d4axfxgm3ag4p2vx9rjcky7c122k99a2nhv1jv53brm35rblzdw"; + }; + + nativeBuildInputs = [ gfortran ]; + + buildInputs = [ arpack spooles openblas ]; + + NIX_CFLAGS_COMPILE = [ + "-I${spooles}/include/spooles" + ]; + + patches = [ + ./calculix.patch + ]; + + postPatch = '' + cd ccx*/src + ''; + + installPhase = '' + install -Dm0755 ccx_${version} $out/bin/ccx + ''; + + meta = with stdenv.lib; { + homepage = "http://www.calculix.de/"; + description = "Three-dimensional structural finite element program"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ gebner ]; + platforms = platforms.unix; + }; +} |