From a8a1de00ea2d4349de5c284b6377140f37338af3 Mon Sep 17 00:00:00 2001 From: Tom Harley Date: Wed, 25 Nov 2020 14:42:24 +0000 Subject: Initial commit --- conjure/default.nix | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 conjure/default.nix (limited to 'conjure') diff --git a/conjure/default.nix b/conjure/default.nix new file mode 100644 index 0000000..aa88dbb --- /dev/null +++ b/conjure/default.nix @@ -0,0 +1,46 @@ +let + pkgs = import {}; + +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 {} + , minion ? pkgs.callPackage ../minion {} + , includeSolver ? true + }: + + stdenv.mkDerivation rec { + pname = "conjure"; + version = "2.3.0"; + + buildInputs = [ patchelf unzip makeWrapper ]; + libPath = lib.makeLibraryPath [ gmp ]; + binPath = if includeSolver + then lib.makeBinPath [ savilerow minion ] + else ""; + + src = fetchurl { + url = "https://github.com/conjure-cp/conjure/releases/download/v${version}/${pname}-v${version}-linux.zip"; + sha256 = "cffa971f45438e0c2655d3546d61dc314dfdf05e8daf31d280131d515fc41f0e"; + }; + + dontBuild = true; + + 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; + } -- cgit v1.2.1