diff options
author | Matthew Justin Bauer <mjbauer95@gmail.com> | 2018-04-24 09:28:27 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-24 09:28:27 -0500 |
commit | 7ebb6212a2c395394aea4362f397a111e2679031 (patch) | |
tree | a9029320876a608bc4ae3f849cf8ffe42657a1b0 /pkgs/development | |
parent | e0956295a9bcda6c5dce880d76a667681927bf5d (diff) | |
parent | 28c023e2466b2fa65358a97a991f55e52d30818c (diff) | |
download | nixlib-7ebb6212a2c395394aea4362f397a111e2679031.tar nixlib-7ebb6212a2c395394aea4362f397a111e2679031.tar.gz nixlib-7ebb6212a2c395394aea4362f397a111e2679031.tar.bz2 nixlib-7ebb6212a2c395394aea4362f397a111e2679031.tar.lz nixlib-7ebb6212a2c395394aea4362f397a111e2679031.tar.xz nixlib-7ebb6212a2c395394aea4362f397a111e2679031.tar.zst nixlib-7ebb6212a2c395394aea4362f397a111e2679031.zip |
Merge pull request #38805 from timokau/zn_poly-init
zn_poly: init at 0.9
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/libraries/science/math/zn_poly/default.nix | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/pkgs/development/libraries/science/math/zn_poly/default.nix b/pkgs/development/libraries/science/math/zn_poly/default.nix new file mode 100644 index 000000000000..bc322d4c5341 --- /dev/null +++ b/pkgs/development/libraries/science/math/zn_poly/default.nix @@ -0,0 +1,50 @@ +{ stdenv +, fetchurl +, gmp +, python2 +}: + +stdenv.mkDerivation rec { + version = "0.9"; + pname = "zn_poly"; + name = "${pname}-${version}"; + + src = fetchurl { + url = "http://web.maths.unsw.edu.au/~davidharvey/code/zn_poly/releases/zn_poly-${version}.tar.gz"; + sha256 = "1kxl25av7i3v68k32hw5bayrfcvmahmqvs97mlh9g238gj4qb851"; + }; + + buildInputs = [ + gmp + ]; + + nativeBuildInputs = [ + python2 # needed by ./configure to create the makefile + ]; + + libname = "libzn_poly${stdenv.targetPlatform.extensions.sharedLibrary}"; + + # Tuning (either autotuning or with hand-written paramters) is possible + # but not implemented here. + # It seems buggy anyways (see homepage). + buildFlags = [ "all" libname ]; + + + # `make install` fails to install some header files and the lib file. + installPhase = '' + mkdir -p "$out/include/zn_poly" + mkdir -p "$out/lib" + cp "${libname}" "$out/lib" + cp include/*.h "$out/include/zn_poly" + ''; + + doCheck = true; + + meta = with stdenv.lib; { + homepage = http://web.maths.unsw.edu.au/~davidharvey/code/zn_poly/; + description = "Polynomial arithmetic over Z/nZ"; + license = with licenses; [ gpl3 ]; + maintainers = with maintainers; [ timokau ]; + platforms = platforms.linux; + }; +} |