git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #39603 from Scriptkiddi/master

gams: init at 25.02

commitbe4b3e89e5a7f7ac1bdb88404768764cdeacc270 authorJörg Thalheim <Mic92@users.noreply.github.com> dateWed 23 May 2018, 09:26 (9 years ago) parent4aa04d19668a66
3 files changed+60
maintainers/maintainer-list.nix+5 pkgs/tools/misc/gams/default.nix+50 pkgs/top-level/all-packages.nix+5
maintainers/maintainer-list.nix+5
@@ -140,6 +140,11 @@
140140 github = "roosemberth";
141141 name = "Roosembert (Roosemberth) Palacios";
142142 };
143+ Scriptkiddi = {
144+ email = "nixos@scriptkiddi.de";
145+ github = "scriptkiddi";
146+ name = "Fritz Otlinghaus";
147+ };
143148 SShrike = {
144149 email = "severen@shrike.me";
145150 github = "severen";
pkgs/tools/misc/gams/default.nixnew file+50
@@ -0,0 +1,50 @@
1+{ stdenv, fetchurl, unzip, lib, file, licenseFile, optgamsFile}:
2+
3+assert licenseFile != null;
4+
5+stdenv.mkDerivation rec {
6+ version = "25.0.2";
7+ name = "gams-${version}";
8+ src = fetchurl {
9+ url = "https://d37drm4t2jghv5.cloudfront.net/distributions/${version}/linux/linux_x64_64_sfx.exe";
10+ sha256 = "4f95389579f33ff7c2586838a2c19021aa0746279555cbb51aa6e0efd09bd297";
11+ };
12+ unpackCmd = "unzip $src";
13+ buildInputs = [ unzip file ];
14+ dontBuild = true;
15+
16+ installPhase = ''
17+ mkdir -p "$out/bin" "$out/share/gams"
18+ cp -a * "$out/share/gams"
19+
20+ cp ${licenseFile} $out/share/gamslice.txt
21+ '' + stdenv.lib.optionalString (optgamsFile != null) ''
22+ cp ${optgamsFile} $out/share/optgams.def
23+ ln -s $out/share/gams/optgams.def $out/bin/optgams.def
24+ '';
25+
26+ postFixup = ''
27+ for f in $out/share/gams/*; do
28+ if [[ -x $f ]] && [[ -f $f ]] && [[ ! $f =~ .*\.so$ ]]; then
29+ if patchelf \
30+ --set-rpath "$out/share/gams" \
31+ --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $f; then
32+ ln -s $f $out/bin/$(basename $f)
33+ fi
34+ fi
35+ done
36+ '';
37+
38+ meta = with stdenv.lib;{
39+ description = "General Algebraic Modeling System";
40+ longDescription = ''
41+ The General Algebraic Modeling System is a high-level modeling system for mathematical optimization.
42+ GAMS is designed for modeling and solving linear, nonlinear, and mixed-integer optimization problems.
43+ '';
44+ homepage = https://www.gams.com/;
45+ license = licenses.unfree;
46+ maintainers = [ maintainers.Scriptkiddi ];
47+ platforms = platforms.linux;
48+ };
49+}
50+
pkgs/top-level/all-packages.nix+5
@@ -646,6 +646,11 @@ with pkgs;
646646
647647 genymotion = callPackage ../development/mobile/genymotion { };
648648
649+ gams = callPackage ../tools/misc/gams {
650+ licenseFile = config.gams.licenseFile or null;
651+ optgamsFile = config.gams.optgamsFile or null;
652+ };
653+
649654 git-fire = callPackage ../tools/misc/git-fire { };
650655
651656 gitless = callPackage ../applications/version-management/gitless/default.nix { };