-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- documenting the config file - entries in ref.yml
- Loading branch information
1 parent
6d0eada
commit 2d149ea
Showing
6 changed files
with
396 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# This file was generated from meta.yml, please do not edit manually. | ||
# Follow the instructions on https://github.com/coq-community/templates to regenerate. | ||
# However, it not handled by mustache, but by a special eval command | ||
\"$(git ls-remote https://github.com/coq-community/coq-nix-toolbox refs/heads/master | cut -f1)\" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,36 @@ | ||
# This file was generated from `meta.yml`, please do not edit manually. | ||
# Follow the instructions on https://github.com/coq-community/templates to regenerate. | ||
|
||
{ pkgs ? (import <nixpkgs> {}), coq-version-or-url, shell ? false }: | ||
|
||
{{# nix-default}} | ||
{ config ? {}, withEmacs ? false, print-env ? false, do-nothing ? false, | ||
update-nixpkgs ? false, ci-matrix ? false, ci-job ? null, | ||
override ? {}, ocaml-override ? {}, global-override ? {}, | ||
ci ? (!isNull ci-job), inNixShell ? null | ||
}@args: | ||
let | ||
coq-version-parts = builtins.match "([0-9]+).([0-9]+)" coq-version-or-url; | ||
coqPackages = | ||
if coq-version-parts == null then | ||
pkgs.mkCoqPackages (import (fetchTarball coq-version-or-url) {}) | ||
else | ||
pkgs."coqPackages_${builtins.concatStringsSep "_" coq-version-parts}"; | ||
{{# src}} | ||
auto = {{src}}; | ||
{{/ src}} | ||
{{^ src}} | ||
auto = let p = ./nix/.coq-nix-toolbox.nix; in fetchGit { | ||
url = "{{url}}{{^ url}}https://github.com/{{owner}}{{^ owner}}coq-community{{/ owner}}/coq-nix-toolbox.git{{/ url}}"; | ||
ref = "{{ref}}{{^ ref}}master{{/ ref}}"; | ||
rev = import ./.nix/coq-nix-toolbox.nix; | ||
}; | ||
{{/ src}} | ||
in | ||
(import auto ({src = ./.;} // args)).{{attribute}}{{^ attribute}}nix-auto{{/ attribute}} | ||
{{/ nix-default}} | ||
{{^ nix-default}} | ||
{ config ? {}, withEmacs ? false, print-env ? false, do-nothing ? false, | ||
update-nixpkgs ? false, ci-matrix ? false, ci-job ? null, | ||
override ? {}, ocaml-override ? {}, global-override ? {}, | ||
ci ? (!isNull ci-job), inNixShell ? null | ||
}@args: | ||
let auto = fetchGit { | ||
url = "https://github.com/coq-community/coq-nix-toolbox.git"; | ||
ref = "master"; | ||
rev = import ./.nix/coq-nix-toolbox.nix; | ||
}; in | ||
(import auto ({src = ./.;} // args)).nix-auto | ||
{{/ nix-default}} | ||
|
||
with coqPackages; | ||
|
||
pkgs.stdenv.mkDerivation { | ||
name = "{{ shortname }}"; | ||
{{# plugin }} | ||
buildInputs = with coq.ocamlPackages; [ ocaml findlib ] | ||
++ pkgs.lib.optionals shell [ merlin ocp-indent ocp-index ]; | ||
|
||
{{/ plugin }} | ||
propagatedBuildInputs = [ | ||
coq | ||
{{# dependencies }} | ||
{{ nix }} | ||
{{/ dependencies }} | ||
]; | ||
|
||
src = if shell then null else ./.; | ||
|
||
installFlags = "COQMF_COQLIB=$(out)/lib/coq/${coq.coq-version}/"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# This file was generated from `meta.yml`, please do not edit manually. | ||
# Follow the instructions on https://github.com/coq-community/templates to regenerate. | ||
|
||
# *However*, you may copy paste it to `config.nix` | ||
# in the same subdirectory .nix and extend it as needed. | ||
# Note that this would completely deactivate this file. | ||
|
||
{ | ||
## DO NOT CHANGE THIS | ||
format = "1.0.0"; | ||
## unless you made an automated or manual update | ||
## to another supported format. | ||
## The attribute to build, either from nixpkgs | ||
## of from the overlays located in `.nix/coq-overlays` | ||
coq-attribute = "{{nix_name}}"; | ||
## If you want to select a different attribute | ||
## to serve as a basis for nix-shell edit this | ||
# coq-shell-attribute = "{{nix_name}}"; | ||
## Maybe the shortname of the library is different from | ||
## the name of the nixpkgs attribute, if so, set it here: | ||
{{^ shortname}}#{{/ shortname}}pname = "{{ shortname }}"; | ||
|
||
## Lists the dependencies, phrased in terms of nix attributes. | ||
## No need to list Coq, it is already included. | ||
## These dependencies will systematically be added to the currently | ||
## known dependencies, if any more than Coq. | ||
## /!\ Remove this field as soon as the package is available on nixpkgs. | ||
## /!\ Manual overlays in `.nix/coq-overlays` should be preferred then. | ||
{{^ nix-dependencies}}#{{/ nix-dependencies}}buildInputs = [ {{# nix-dependencies }}"{{.}}" {{/ nix-dependencies }}]; | ||
|
||
## Indicate the relative location of your _CoqProject | ||
## If not specified, it defaults to "_CoqProject" | ||
# coqproject = "_CoqProject"; | ||
|
||
## select an entry to build in the following `tasks` set | ||
## defaults to "default" | ||
select = "default"; | ||
|
||
## write one `tasks.name` attribute set per | ||
## alternative configuration, the can be used to | ||
## compute several ci jobs as well | ||
tasks.default = { | ||
## You can override Coq and other Coq coqPackages | ||
## through the following attribute | ||
# coqPackages.coq.override.version = "8.11"; | ||
## In some cases, light overrides are not available/enough | ||
## in which case you can use either | ||
# coqPackages.<coq-pkg>.overrideAttrs = o: <overrides>; | ||
## or a "long" overlay to put in `.nix/coq-overlays | ||
## you may use `nix-shell --run fetchOverlay <coq-pkg>` | ||
## to automatically retrieve the one from nixpkgs | ||
## if it exists and is correctly named/located | ||
## You can override Coq and other Coq coqPackages | ||
## throught the following attribute | ||
## If <ocaml-pkg> does not support lights overrides, | ||
## you may use `overrideAttrs` or long overlays | ||
## located in `.nix/ocaml-overlays` | ||
## (there is no automation for this one) | ||
# ocamlPackages.<ocaml-pkg>.override.version = "x.xx"; | ||
## You can also override packages from the nixpkgs toplevel | ||
# <nix-pkg>.override.overrideAttrs = o: <overrides>; | ||
## Or put an overlay in `.nix/overlays` | ||
## you may mark a package as a CI job as follows | ||
# coqPackages.<another-pkg>.ci.job = "test"; | ||
## It can then be built throught | ||
## nix-build --argstr ci "default" --arg ci-job "test"; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.