diff options
author | Gabriel Ebner <gebner@gebner.org> | 2016-05-08 15:32:58 +0200 |
---|---|---|
committer | Gabriel Ebner <gebner@gebner.org> | 2016-05-08 15:32:58 +0200 |
commit | 516f331227d7879c157190f888ad644d8665172d (patch) | |
tree | b177a47b88085b3e067d44799ab6c353912a8a4d /pkgs/applications/science/logic/minisat | |
parent | 5569824729adcab6f195ff44c94272edbf61cef3 (diff) |
minisat: migrate from builderDefsPackage to mkDerivation
Diffstat (limited to 'pkgs/applications/science/logic/minisat')
-rw-r--r-- | pkgs/applications/science/logic/minisat/default.nix | 70 |
1 files changed, 21 insertions, 49 deletions
diff --git a/pkgs/applications/science/logic/minisat/default.nix b/pkgs/applications/science/logic/minisat/default.nix index e91ff67fc9cce..c821020b73810 100644 --- a/pkgs/applications/science/logic/minisat/default.nix +++ b/pkgs/applications/science/logic/minisat/default.nix @@ -1,56 +1,28 @@ -x@{builderDefsPackage - , zlib - , ...}: -builderDefsPackage -(a : -let - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ - []; +{ stdenv, fetchurl, zlib }: - buildInputs = map (n: builtins.getAttr n x) - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); - sourceInfo = rec { - baseName="minisat"; - version="2.2.0"; - name="${baseName}-${version}"; - url="http://minisat.se/downloads/${name}.tar.gz"; - hash="023qdnsb6i18yrrawlhckm47q8x0sl7chpvvw3gssfyw3j2pv5cj"; - }; -in -rec { - src = a.fetchurl { - url = sourceInfo.url; - sha256 = sourceInfo.hash; +stdenv.mkDerivation rec { + name = "minisat-${version}"; + version = "2.2.0"; + + src = fetchurl { + url = "http://minisat.se/downloads/${name}.tar.gz"; + sha256 = "023qdnsb6i18yrrawlhckm47q8x0sl7chpvvw3gssfyw3j2pv5cj"; }; - inherit (sourceInfo) name version; - inherit buildInputs; + buildInputs = [ zlib ]; - phaseNames = ["setVars" "doMake" "doDeploy"]; - goSrcDir = "cd simp"; - doDeploy = a.fullDepEntry ('' - mkdir -p "$out"/bin - cp minisat_static "$out/bin"/minisat - '') ["minInit" "defEnsureDir"]; - makeFlags = ["rs"]; - setVars = a.fullDepEntry ('' - export MROOT=$PWD/../ - '') ["doUnpack"]; + sourceRoot = "minisat/simp"; + makeFlags = [ "r" "MROOT=.." ]; + installPhase = '' + mkdir -p $out/bin + cp minisat_release $out/bin/minisat + ''; - meta = { - description = "A compact and readable SAT-solver"; - maintainers = with a.lib.maintainers; - [ - raskin - ]; - platforms = with a.lib.platforms; - linux; - license = a.stdenv.lib.licenses.mit; + meta = with stdenv.lib; { + description = "Compact and readable SAT solver"; + maintainers = with maintainers; [ gebner raskin ]; + platforms = platforms.unix; + license = licenses.mit; homepage = "http://minisat.se/"; }; - passthru = { - updateInfo = { - downloadPage = "http://minisat.se/MiniSat.html"; - }; - }; -}) x +} |