about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorConnor Baker <connor.baker@tweag.io>2024-03-12 22:20:43 -0400
committerGitHub <noreply@github.com>2024-03-12 22:20:43 -0400
commit2dd8b30c330af5f09b7dcb924940ae0f5188e692 (patch)
tree6f47b1ea83ee9fa211a615bb4e135bce71b72f75 /pkgs
parent811ec16c8a27c252815e2e33ad24315afdf08f31 (diff)
parentca4d07071f13ad02907087ca932446222258b7a3 (diff)
Merge pull request #295386 from silky/noon/add-highs
add the 'HiGHS' solver for linear programs
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/by-name/hi/highs/package.nix41
1 files changed, 41 insertions, 0 deletions
diff --git a/pkgs/by-name/hi/highs/package.nix b/pkgs/by-name/hi/highs/package.nix
new file mode 100644
index 0000000000000..4023d3e52afb3
--- /dev/null
+++ b/pkgs/by-name/hi/highs/package.nix
@@ -0,0 +1,41 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, clang
+, cmake
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "highs";
+  version = "1.7.0";
+
+  src = fetchFromGitHub {
+    owner = "ERGO-Code";
+    repo = "HiGHS";
+    rev = "v${finalAttrs.version}";
+    sha256 = "sha256-2dYKXckZ+npj1rA2mmBRuRcGI1YNcaiITSMjE2/TA2g=";
+  };
+
+  strictDeps = true;
+
+  outputs = [ "out" ];
+
+  doInstallCheck = true;
+
+  installCheckPhase = ''
+    "$out/bin/highs" --version
+  '';
+
+  nativeBuildInputs = [ clang cmake ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "https://github.com/ERGO-Code/HiGHS";
+    description = "Linear optimization software";
+    license = licenses.mit;
+    platforms = platforms.all;
+    mainProgram = "highs";
+    maintainers = with maintainers; [ silky ];
+  };
+})