aboutsummaryrefslogtreecommitdiff
path: root/conjure/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'conjure/default.nix')
-rw-r--r--conjure/default.nix77
1 files changed, 37 insertions, 40 deletions
diff --git a/conjure/default.nix b/conjure/default.nix
index 16628f2..6f21961 100644
--- a/conjure/default.nix
+++ b/conjure/default.nix
@@ -1,47 +1,44 @@
-let
- pkgs = import <nixpkgs> {};
+{ stdenv
+, patchelf
+, gmp
+, unzip
+, lib
+, fetchurl
+, makeWrapper
+, callPackage
-in
- { stdenv ? pkgs.stdenv
- , patchelf ? pkgs.patchelf
- , gmp ? pkgs.gmp
- , unzip ? pkgs.unzip
- , lib ? pkgs.lib
- , fetchurl ? pkgs.fetchurl
- , makeWrapper ? pkgs.makeWrapper
- , savilerow ? pkgs.callPackage ../savilerow {}
- , includeSolver ? true
- }:
+, savilerow
- (stdenv.mkDerivation rec {
- name = "conjure";
- version = "2.3.0";
+, includeSolver ? true
+}:
- buildInputs = [ unzip makeWrapper ];
- libPath = lib.makeLibraryPath [ gmp ];
- binPath = if includeSolver
- then lib.makeBinPath [ savilerow savilerow.minion ]
- else "";
+(stdenv.mkDerivation rec {
+ pname = "conjure";
+ version = "2.3.0";
- src = fetchurl {
- url = "https://github.com/conjure-cp/conjure/releases/download/v${version}/${name}-v${version}-linux.zip";
- sha256 = "cffa971f45438e0c2655d3546d61dc314dfdf05e8daf31d280131d515fc41f0e";
- };
+ buildInputs = [ unzip makeWrapper ];
+ libPath = lib.makeLibraryPath [ gmp ];
+ binPath = if includeSolver
+ then lib.makeBinPath [ savilerow savilerow.minion ]
+ else "";
- dontBuild = true;
+ src = fetchurl {
+ url = "https://github.com/conjure-cp/conjure/releases/download/v${version}/${pname}-v${version}-linux.zip";
+ sha256 = "cffa971f45438e0c2655d3546d61dc314dfdf05e8daf31d280131d515fc41f0e";
+ };
- installPhase = ''
- mkdir -p $out/bin
- cp ./conjure $out/bin/conjure
- patchelf \
- --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
- --set-rpath "${libPath}" \
- $out/bin/conjure
- wrapProgram $out/bin/conjure \
- --prefix PATH : ${binPath}
- '';
+ installPhase = ''
+ mkdir -p $out/bin
+ cp ./conjure $out/bin/conjure
+ patchelf \
+ --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
+ --set-rpath "${libPath}" \
+ $out/bin/conjure
+ wrapProgram $out/bin/conjure \
+ --prefix PATH : ${binPath}
+ '';
- dontStrip = true;
- }) // {
- containedSolvers = import ./solvers.nix {};
- }
+ dontStrip = true;
+}) // {
+ containedSolvers = callPackage ./solvers.nix {};
+}