diff options
author | Fritz Otlinghaus <fritz.otlinghaus@stuvus.uni-stuttgart.de> | 2018-04-27 15:26:08 +0200 |
---|---|---|
committer | Fritz Otlinghaus <fritz.otlinghaus@stuvus.uni-stuttgart.de> | 2018-05-17 14:46:31 +0200 |
commit | 9668a66948cf16dde38629e0f48770058f791f0b (patch) | |
tree | ac5e518791fb1348e7f1f8c48a3d7d90b95d2dea /pkgs/tools/misc | |
parent | 42581b23f295d8850dfec63872873e1dd96ff849 (diff) | |
download | nixlib-9668a66948cf16dde38629e0f48770058f791f0b.tar nixlib-9668a66948cf16dde38629e0f48770058f791f0b.tar.gz nixlib-9668a66948cf16dde38629e0f48770058f791f0b.tar.bz2 nixlib-9668a66948cf16dde38629e0f48770058f791f0b.tar.lz nixlib-9668a66948cf16dde38629e0f48770058f791f0b.tar.xz nixlib-9668a66948cf16dde38629e0f48770058f791f0b.tar.zst nixlib-9668a66948cf16dde38629e0f48770058f791f0b.zip |
gams: init at 25.02
Diffstat (limited to 'pkgs/tools/misc')
-rw-r--r-- | pkgs/tools/misc/gams/default.nix | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/pkgs/tools/misc/gams/default.nix b/pkgs/tools/misc/gams/default.nix new file mode 100644 index 000000000000..613fdc0f4555 --- /dev/null +++ b/pkgs/tools/misc/gams/default.nix @@ -0,0 +1,50 @@ +{ stdenv, fetchurl, unzip, lib, file, licenseFile, optgamsFile}: + +assert licenseFile != null; + +stdenv.mkDerivation rec { + version = "25.0.2"; + name = "gams-${version}"; + src = fetchurl { + url = "https://d37drm4t2jghv5.cloudfront.net/distributions/${version}/linux/linux_x64_64_sfx.exe"; + sha256 = "4f95389579f33ff7c2586838a2c19021aa0746279555cbb51aa6e0efd09bd297"; + }; + unpackCmd = "unzip $src"; + buildInputs = [ unzip file ]; + dontBuild = true; + + installPhase = '' + mkdir -p "$out/bin" "$out/share/gams" + cp -a * "$out/share/gams" + + cp ${licenseFile} $out/share/gamslice.txt + '' + stdenv.lib.optionalString (optgamsFile != null) '' + cp ${optgamsFile} $out/share/optgams.def + ln -s $out/share/gams/optgams.def $out/bin/optgams.def + ''; + + postFixup = '' + for f in $out/share/gams/*; do + if [[ -x $f ]] && [[ -f $f ]] && [[ ! $f =~ .*\.so$ ]]; then + if patchelf \ + --set-rpath "$out/share/gams" \ + --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $f; then + ln -s $f $out/bin/$(basename $f) + fi + fi + done + ''; + + meta = with stdenv.lib;{ + description = "General Algebraic Modeling System"; + longDescription = '' + The General Algebraic Modeling System is a high-level modeling system for mathematical optimization. + GAMS is designed for modeling and solving linear, nonlinear, and mixed-integer optimization problems. + ''; + homepage = https://www.gams.com/; + license = licenses.unfree; + maintainers = [ maintainers.Scriptkiddi ]; + platforms = platforms.linux; + }; +} + |