gurobi: 11.0.3 -> 12.0.0
This commit is contained in:
parent
54b5b8b06b
commit
41cbe1fe27
@ -6,16 +6,29 @@
|
||||
python3,
|
||||
}:
|
||||
|
||||
let
|
||||
platform =
|
||||
{
|
||||
aarch64-linux = "armlinux64";
|
||||
x86_64-linux = "linux64";
|
||||
}
|
||||
.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gurobi";
|
||||
version = "11.0.3";
|
||||
version = "12.0.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://packages.gurobi.com/${lib.versions.majorMinor version}/gurobi${version}_linux64.tar.gz";
|
||||
hash = "sha256-gqLIZxwjS7qp3GTaIrGVGr9BxiBH/fdwBOZfJKkd/RM=";
|
||||
url = "https://packages.gurobi.com/${lib.versions.majorMinor version}/gurobi${version}_${platform}.tar.gz";
|
||||
hash =
|
||||
{
|
||||
aarch64-linux = "sha256-jhICy/CGahb6eMPkvg+jKIjskS+N3zM8KVYdBXlk74Y=";
|
||||
x86_64-linux = "sha256-or3Jwda/jrTlUaGErxzo17BDXqjn0ZoBfMfVP9Xv2hI=";
|
||||
}
|
||||
.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
||||
};
|
||||
|
||||
sourceRoot = "gurobi${builtins.replaceStrings [ "." ] [ "" ] version}/linux64";
|
||||
sourceRoot = "gurobi${builtins.replaceStrings [ "." ] [ "" ] version}/${platform}";
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoPatchelfHook
|
||||
@ -32,6 +45,8 @@ stdenv.mkDerivation rec {
|
||||
makeFlags = [ "--directory=src/build" ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin
|
||||
cp bin/* $out/bin/
|
||||
rm $out/bin/gurobi.sh
|
||||
@ -52,19 +67,24 @@ stdenv.mkDerivation rec {
|
||||
mkdir -p $out/share/java
|
||||
ln -s $out/lib/gurobi.jar $out/share/java/
|
||||
ln -s $out/lib/gurobi-javadoc.jar $out/share/java/
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru.libSuffix = lib.replaceStrings [ "." ] [ "" ] (lib.versions.majorMinor version);
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Optimization solver for mathematical programming";
|
||||
homepage = "https://www.gurobi.com";
|
||||
sourceProvenance = with sourceTypes; [
|
||||
sourceProvenance = with lib.sourceTypes; [
|
||||
binaryBytecode
|
||||
binaryNativeCode
|
||||
];
|
||||
license = licenses.unfree;
|
||||
platforms = [ "x86_64-linux" ];
|
||||
maintainers = with maintainers; [ wegank ];
|
||||
license = lib.licenses.unfree;
|
||||
platforms = [
|
||||
"aarch64-linux"
|
||||
"x86_64-linux"
|
||||
];
|
||||
maintainers = with lib.maintainers; [ wegank ];
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user