diff options
Diffstat (limited to 'pkgs/applications/science')
-rw-r--r-- | pkgs/applications/science/chemistry/jmol/default.nix | 44 | ||||
-rw-r--r-- | pkgs/applications/science/math/palp/default.nix | 67 | ||||
-rw-r--r-- | pkgs/applications/science/math/pynac/default.nix | 47 |
3 files changed, 158 insertions, 0 deletions
diff --git a/pkgs/applications/science/chemistry/jmol/default.nix b/pkgs/applications/science/chemistry/jmol/default.nix new file mode 100644 index 000000000000..c85e1143d103 --- /dev/null +++ b/pkgs/applications/science/chemistry/jmol/default.nix @@ -0,0 +1,44 @@ +{ stdenv +, fetchurl +, unzip +, jre +}: + +stdenv.mkDerivation rec { + version = "${baseVersion}.${patchVersion}"; + baseVersion = "14.29"; + patchVersion = "12"; + pname = "jmol"; + name = "${pname}-${version}"; + + src = fetchurl { + url = "mirror://sourceforge/jmol/Jmol/Version%20${baseVersion}/Jmol%20${version}/Jmol-${version}-binary.tar.gz"; + sha256 = "1ndq9am75janshrnk26334z1nmyh3k4bp20napvf2zv0lfp8k3bv"; + }; + + buildInputs = [ + jre + ]; + + installPhase = '' + mkdir -p "$out/share/jmol" + mkdir -p "$out/bin" + + ${unzip}/bin/unzip jsmol.zip -d "$out/share/" + + sed -i -e 's|command=java|command=${jre}/bin/java|' jmol.sh + cp *.jar jmol.sh "$out/share/jmol" + ln -s $out/share/jmol/jmol.sh "$out/bin/jmol" + ''; + + enableParallelBuilding = true; + + meta = with stdenv.lib; { + description = "A Java 3D viewer for chemical structures"; + homepage = https://sourceforge.net/projects/jmol; + license = licenses.lgpl2; + platforms = platforms.all; + maintainers = with maintainers; [ timokau ]; + }; +} + diff --git a/pkgs/applications/science/math/palp/default.nix b/pkgs/applications/science/math/palp/default.nix new file mode 100644 index 000000000000..3484c369db3b --- /dev/null +++ b/pkgs/applications/science/math/palp/default.nix @@ -0,0 +1,67 @@ +{ stdenv +, fetchurl +, dimensions ? 6 # works for <= dimensions dimensions, but is only optimized for that exact value +, doSymlink ? true # symlink the executables to the default location (without dimension postfix) +}: + +stdenv.mkDerivation rec { + version = "2.1"; + dim = toString dimensions; + name = "palp-${dim}d-${version}"; + + src = fetchurl { + url = "http://hep.itp.tuwien.ac.at/~kreuzer/CY/palp/palp-${version}.tar.gz"; + sha256 = "1s7s2lc5f0ig1yy7ygsh3sddm3sbq4mxwybqsj8lp9wjdxs7qfrs"; + }; + + hardeningDisable = [ "format" ]; + + preBuild = '' + echo Building PALP optimized for ${dim} dimensions + sed -i "s/^#define[^a-zA-Z]*POLY_Dmax.*/#define POLY_Dmax ${dim}/" Global.h + ''; + + installPhase = '' + mkdir -p "$out/bin" + for file in poly class cws nef mori; do + cp -p $file.x "$out/bin/$file-${dim}d.x" + done + '' + stdenv.lib.optionalString doSymlink '' + cd "$out/bin" + for file in poly class cws nef mori; do + ln -sf $file-6d.x $file.x + done + ''; + + meta = with stdenv.lib; { + description = "A Package for Analyzing Lattice Polytopes"; + longDescription = '' + A Package for Analyzing Lattice Polytopes (PALP) is a set of C + programs for calculations with lattice polytopes and applications to + toric geometry. + + It contains routines for vertex and facet enumeration, computation of + incidences and symmetries, as well as completion of the set of lattice + points in the convex hull of a given set of points. In addition, there + are procedures specialised to reflexive polytopes such as the + enumeration of reflexive subpolytopes, and applications to toric + geometry and string theory, like the computation of Hodge data and + fibration structures for toric Calabi-Yau varieties. The package is + well tested and optimised in speed as it was used for time consuming + tasks such as the classification of reflexive polyhedra in 4 + dimensions and the creation and manipulation of very large lists of + 5-dimensional polyhedra. + + While originally intended for low-dimensional applications, the + algorithms work in any dimension and our key routine for vertex and + facet enumeration compares well with existing packages. + ''; + homepage = http://hep.itp.tuwien.ac.at/~kreuzer/CY/CYpalp.html; + # Just a link on the website pointing to gpl -- now gplv3. When the last + # version was released that pointed to gplv2 however, so thats probably + # the right license. + license = licenses.gpl2; + maintainers = with maintainers; [ timokau ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/applications/science/math/pynac/default.nix b/pkgs/applications/science/math/pynac/default.nix new file mode 100644 index 000000000000..fd566abd9a9a --- /dev/null +++ b/pkgs/applications/science/math/pynac/default.nix @@ -0,0 +1,47 @@ +{ stdenv +, fetchFromGitHub +, autoreconfHook +, pkgconfig +, flint +, gmp +, python2 +, singular +}: + +stdenv.mkDerivation rec { + version = "0.7.19"; + name = "pynac-${version}"; + + src = fetchFromGitHub { + owner = "pynac"; + repo = "pynac"; + rev = "pynac-${version}"; + sha256 = "132bibvapm245c5xy29j3xmjs0pawvw7lv05374m8vv1m39127d3"; + }; + + buildInputs = [ + flint + gmp + singular + singular + python2 + ]; + + nativeBuildInputs = [ + autoreconfHook + pkgconfig + ]; + + meta = with stdenv.lib; { + description = "Python is Not a CAS -- modified version of Ginac"; + longDescription = '' + Pynac -- "Python is Not a CAS" is a modified version of Ginac that + replaces the depency of GiNaC on CLN by a dependency instead of Python. + It is a lite version of GiNaC as well, not implementing all the features + of the full GiNaC, and it is *only* meant to be used as a Python library. + ''; + homepage = http://pynac.org; + maintainers = with maintainers; [ timokau ]; + platforms = platforms.linux; + }; +} |