Skip to content

Commit

Permalink
adding nix configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
CohenCyril committed May 7, 2021
1 parent 5c36d0c commit 69993aa
Show file tree
Hide file tree
Showing 5 changed files with 115 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .nix/config.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
## 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`
attribute = "algebra-tactics";

## If you want to select a different attribute
## to serve as a basis for nix-shell edit this
# shell-attribute = "{{nix_name}}";

## Maybe the shortname of the library is different from
## the name of the nixpkgs attribute, if so, set it here:
# 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.
# buildInputs = [ ];

## Indicate the relative location of your _CoqProject
## If not specified, it defaults to "_CoqProject"
# coqproject = "_CoqProject";

## select an entry to build in the following `bundles` set
## defaults to "default"
default-bundle = "8.13";

## write one `bundles.name` attribute set per
## alternative configuration, the can be used to
## compute several ci jobs as well
bundles = {
"8.13" = {
coqPackages.coq.override.version = "8.13";
};
};

## Cachix caches to use in CI
## Below we list some standard ones
cachix.coq = {};
cachix.math-comp = {};
cachix.coq-community = {};

## If you have write access to one of these caches you can
## provide the auth token or signing key through a secret
## variable on GitHub. Then, you should give the variable
## name here. For instance, coq-community projects can use
## the following line instead of the one above:
# cachix.coq-community.authToken = "CACHIX_AUTH_TOKEN";

## Or if you have a signing key for a given Cachix cache:
# cachix.my-cache.signingKey = "CACHIX_SIGNING_KEY"

## Note that here, CACHIX_AUTH_TOKEN and CACHIX_SIGNING_KEY
## are the names of secret variables. They are set in
## GitHub's web interface.
}
1 change: 1 addition & 0 deletions .nix/coq-nix-toolbox.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"6bfe83b1a07fede9a0e6a7f60df554323051f8d2"
16 changes: 16 additions & 0 deletions .nix/coq-overlays/algebra-tactics/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{ lib, mkCoqDerivation, coq, mathcomp-algebra,
coq-elpi, mathcomp-zify, version ? null }:

with lib; mkCoqDerivation rec {
pname = "algebra-tactics";
owner = "math-comp";
inherit version;
defaultVersion = null;

propagatedBuildInputs = [ mathcomp-algebra coq-elpi mathcomp-zify ];

meta = {
description = "A Library for algebra tactics";
maintainers = with maintainers; [ cohencyril ];
};
}
22 changes: 22 additions & 0 deletions .nix/coq-overlays/mathcomp-zify/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{ lib, mkCoqDerivation, coq, mathcomp-algebra, version ? null }:

with lib; mkCoqDerivation rec {
pname = "mathcomp-zify";
repo = "mczify";
owner = "math-comp";
inherit version;

defaultVersion = with versions;
switch [ coq.coq-version mathcomp-algebra.version ] [
{ cases = [ (isEq "8.13") (isEq "1.12") ]; out = "1.0.0+1.12+8.13"; }
] null;

release."1.0.0+1.12+8.13".sha256 = "1j533vx6lacr89bj1bf15l1a0s7rvrx4l00wyjv99aczkfbz6h6k";

propagatedBuildInputs = [ mathcomp-algebra ];

meta = {
description = "Micromega tactics for Mathematical Components";
maintainers = with maintainers; [ cohencyril ];
};
}
13 changes: 13 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{ config ? {}, withEmacs ? false, print-env ? false, do-nothing ? false,
update-nixpkgs ? false, ci-matrix ? false,
override ? {}, ocaml-override ? {}, global-override ? {},
bundle ? null, job ? null, inNixShell ? null, src ? ./.,
}@args:
let auto = fetchGit {
url = "https://github.com/coq-community/coq-nix-toolbox.git";
ref = "master";
# putting a ref here is strongly advised
rev = import .nix/coq-nix-toolbox.nix;
};
in
import auto ({inherit src;} // args)

0 comments on commit 69993aa

Please sign in to comment.