diff options
| author | Théo Zimmermann | 2018-10-26 16:27:12 +0200 |
|---|---|---|
| committer | Théo Zimmermann | 2018-11-05 09:56:48 +0100 |
| commit | 15988583cfdff9efe952dafb9970453afdedef2f (patch) | |
| tree | 0fa515a9d0edabc4a706835addd52b622dd84d97 /default.nix | |
| parent | 782736024e75a67c7dd1cbb7801b217f72f79fe5 (diff) | |
[default.nix] Add coq-version, meta.platform and setupHook.
Closes #8227 by solving remaining differences.
Sets dontFilter in anticipation of NixOS/nixpkgs#49456.
Diffstat (limited to 'default.nix')
| -rw-r--r-- | default.nix | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/default.nix b/default.nix index 9a7afbe89e..c609ad8d29 100644 --- a/default.nix +++ b/default.nix @@ -33,6 +33,7 @@ , shell ? false # We don't use lib.inNixShell because that would also apply # when in a nix-shell of some package depending on this one. +, coq-version ? "8.10-git" }: with pkgs; @@ -101,7 +102,20 @@ stdenv.mkDerivation rec { installCheckTarget = [ "check" ]; - passthru = { inherit ocamlPackages; }; + passthru = { + inherit coq-version ocamlPackages; + dontFilter = true; # Useful to use mkCoqPackages from <nixpkgs> + }; + + setupHook = writeText "setupHook.sh" " + addCoqPath () { + if test -d \"$1/lib/coq/${coq-version}/user-contrib\"; then + export COQPATH=\"$COQPATH\${COQPATH:+:}$1/lib/coq/${coq-version}/user-contrib/\" + fi + } + + addEnvHooks \"$targetOffset\" addCoqPath + "; meta = { description = "Coq proof assistant"; @@ -113,6 +127,7 @@ stdenv.mkDerivation rec { ''; homepage = http://coq.inria.fr; license = licenses.lgpl21; + platforms = platforms.unix; }; } |
