Skip to content

Commit c6c9323

Browse files
committed
new nix config
1 parent ba49448 commit c6c9323

File tree

2 files changed

+18
-42
lines changed

2 files changed

+18
-42
lines changed

.nix/config.nix

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
format = "1.0.0";
3+
coq-attribute = "hierarchy-builder";
4+
namespace = ".";
5+
realpath = ".";
6+
select = "coq-8.13";
7+
inputs."coq-8.13".coqPackages = {
8+
coq.override.version = "8.13";
9+
};
10+
}

default.nix

Lines changed: 8 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,8 @@
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

Comments
 (0)