|
1 | | -{withEmacs ? false, |
2 | | - nixpkgs ? (fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/4aa5466cbc741097218a1c494a7b832a17d1967d.tar.gz), |
3 | | - coq-version ? "8.12", |
4 | | - print-env ? false |
5 | | -}: |
6 | | -with import nixpkgs { |
7 | | - overlays = [ (super: self: { |
8 | | - coqPackages = { "8.12" = super.coqPackages_8_12; }."${coq-version}".overrideScope' (self: super: { |
9 | | - coq = super.coq.override { |
10 | | - ocamlPackages = super.coq.ocamlPackages.overrideScope' (self: super: { |
11 | | - elpi = super.elpi.overrideAttrs (old: { |
12 | | - name = "elpi-1.12.0"; |
13 | | - src = fetchTarball https://github.com/LPCIC/elpi/archive/v1.12.0.tar.gz; |
14 | | - }); |
15 | | - }); |
16 | | - }; |
17 | | - # Coq package override example: |
18 | | - coq-elpi = super.coq-elpi.overrideAttrs (old: { |
19 | | - name = "coq8.12-elpi-1.8.0"; |
20 | | - src = fetchTarball https://github.com/LPCIC/coq-elpi/archive/v1.8.0.tar.gz; |
21 | | - }); |
22 | | - }); |
23 | | - coq = self.coqPackages.coq; |
24 | | - })]; |
25 | | -}; |
26 | | -let pgEmacs = emacsWithPackages (epkgs: with epkgs.melpaStablePackages; [proof-general]); in |
27 | | -coqPackages.hierarchy-builder.overrideAttrs (old: { |
28 | | - name = "coq${coq.coq-version}-hierarchy-builder-dev"; |
29 | | - src = ./.; |
30 | | - buildInputs = old.buildInputs ++ |
31 | | - (if lib.trivial.inNixShell then lib.optional withEmacs pgEmacs |
32 | | - else []); |
33 | | -} |
34 | | -// (if lib.trivial.inNixShell then { |
35 | | - shellHook = '' |
36 | | - nixEnv (){ |
37 | | - echo "Here is your work environement:" |
38 | | - for x in $buildInputs $propagatedBuildInputs; do printf " "; echo $x | cut -d "-" -f "2-"; done |
39 | | - echo "you can pass option '--argstr coq-version \"x.y\"' to nix-shell to change coq versions" |
40 | | - } |
41 | | - '' + lib.optionalString print-env "nixEnv"; |
42 | | -} else {})) |
| 1 | +# This file was generated from `meta.yml`, please do not edit manually. |
| 2 | +# Follow the instructions on https://github.com/coq-community/templates to regenerate. |
| 3 | +{ config ? {}, withEmacs ? false, print-env ? false, do-nothing ? false, |
| 4 | + update-nixpkgs ? false, ci ? false, ci-step ? null, inNixShell ? null |
| 5 | +}@args: |
| 6 | +let src = fetchGit "https://github.com/coq-community/nix-toolbox.git"; in |
| 7 | +(import "${src}/auto-config.nix" ./. args).nix-auto |
| 8 | + |
0 commit comments