diff options
Diffstat (limited to 'pkgs/development/coq-modules/coq-haskell/default.nix')
-rw-r--r-- | pkgs/development/coq-modules/coq-haskell/default.nix | 61 |
1 files changed, 11 insertions, 50 deletions
diff --git a/pkgs/development/coq-modules/coq-haskell/default.nix b/pkgs/development/coq-modules/coq-haskell/default.nix index 7c86a7d55f34..7caf754ae50a 100644 --- a/pkgs/development/coq-modules/coq-haskell/default.nix +++ b/pkgs/development/coq-modules/coq-haskell/default.nix @@ -1,60 +1,21 @@ -{ stdenv, fetchgit, coq, ssreflect }: +{ lib, mkCoqDerivation, coq, ssreflect, version ? null }: -let params = - { - "8.5" = { - version = "20171215"; - rev = "e2cf8b270c2efa3b56fab1ef6acc376c2c3de968"; - sha256 = "09dq1vvshhlhgjccrhqgbhnq2hrys15xryfszqq11rzpgvl2zgdv"; - }; +with lib; mkCoqDerivation { - "8.6" = { - version = "20171215"; - rev = "e2cf8b270c2efa3b56fab1ef6acc376c2c3de968"; - sha256 = "09dq1vvshhlhgjccrhqgbhnq2hrys15xryfszqq11rzpgvl2zgdv"; - }; + pname = "coq-haskell"; + owner = "jwiegley"; + inherit version; + defaultVersion = if versions.range "8.5" "8.8" coq.coq-version then "20171215" else null; + release."20171215".rev = "e2cf8b270c2efa3b56fab1ef6acc376c2c3de968"; + release."20171215".sha256 = "09dq1vvshhlhgjccrhqgbhnq2hrys15xryfszqq11rzpgvl2zgdv"; - "8.7" = { - version = "20171215"; - rev = "e2cf8b270c2efa3b56fab1ef6acc376c2c3de968"; - sha256 = "09dq1vvshhlhgjccrhqgbhnq2hrys15xryfszqq11rzpgvl2zgdv"; - }; - - "8.8" = { - version = "20171215"; - rev = "e2cf8b270c2efa3b56fab1ef6acc376c2c3de968"; - sha256 = "09dq1vvshhlhgjccrhqgbhnq2hrys15xryfszqq11rzpgvl2zgdv"; - }; - }; - param = params.${coq.coq-version}; -in - -stdenv.mkDerivation { - - name = "coq${coq.coq-version}-coq-haskell-${param.version}"; - - src = fetchgit { - url = "git://github.com/jwiegley/coq-haskell.git"; - inherit (param) rev sha256; - }; - - buildInputs = with coq.ocamlPackages; [ ocaml camlp5 findlib ]; + mlPlugin = true; + extraInstallFlags = [ "-f Makefile.coq" ]; propagatedBuildInputs = [ coq ssreflect ]; - enableParallelBuilding = false; - installPhase = '' - make -f Makefile.coq COQLIB=$out/lib/coq/${coq.coq-version}/ install - ''; - - meta = with stdenv.lib; { - homepage = "https://github.com/jwiegley/coq-haskell"; + meta = { description = "A library for formalizing Haskell types and functions in Coq"; maintainers = with maintainers; [ jwiegley ]; - platforms = coq.meta.platforms; - }; - - passthru = { - compatibleCoqVersions = v: builtins.hasAttr v params; }; } |