uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
51
pkgs/tools/misc/gams/default.nix
Normal file
51
pkgs/tools/misc/gams/default.nix
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{ lib, stdenv, fetchurl, unzip, file, licenseFile ? null, optgamsFile ? null}:
|
||||
|
||||
assert licenseFile != null;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "25.0.2";
|
||||
pname = "gams";
|
||||
src = fetchurl {
|
||||
url = "https://d37drm4t2jghv5.cloudfront.net/distributions/${version}/linux/linux_x64_64_sfx.exe";
|
||||
sha256 = "4f95389579f33ff7c2586838a2c19021aa0746279555cbb51aa6e0efd09bd297";
|
||||
};
|
||||
unpackCmd = "unzip $src";
|
||||
nativeBuildInputs = [ unzip ];
|
||||
buildInputs = [ file ];
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p "$out/bin" "$out/share/gams"
|
||||
cp -a * "$out/share/gams"
|
||||
|
||||
cp ${licenseFile} $out/share/gams/gamslice.txt
|
||||
'' + lib.optionalString (optgamsFile != null) ''
|
||||
cp ${optgamsFile} $out/share/gams/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 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;
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue