diff options
author | Yann Herklotz <git@yannherklotz.com> | 2022-06-24 18:28:16 +0100 |
---|---|---|
committer | Yann Herklotz <git@yannherklotz.com> | 2022-06-24 18:28:16 +0100 |
commit | 7e5ab23030c7160f7fea631d457eeba84917e783 (patch) | |
tree | cb6ba5beb090025a73050e063b2227d10bb15644 | |
parent | daf1e49862cfd0fff4fea9736815e14f335ff2c8 (diff) | |
download | vericert-7e5ab23030c7160f7fea631d457eeba84917e783.tar.gz vericert-7e5ab23030c7160f7fea631d457eeba84917e783.zip |
Move nix config to flake
-rw-r--r-- | .envrc | 1 | ||||
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | default.nix | 22 | ||||
-rw-r--r-- | flake.lock | 26 | ||||
-rw-r--r-- | flake.nix | 33 | ||||
-rw-r--r-- | shell.nix | 8 |
6 files changed, 60 insertions, 31 deletions
@@ -0,0 +1 @@ +use flake @@ -79,7 +79,6 @@ obj_dir/ /*.v .direnv/ -.envrc creduce_bug_*/ diff --git a/default.nix b/default.nix deleted file mode 100644 index 341c8fc..0000000 --- a/default.nix +++ /dev/null @@ -1,22 +0,0 @@ -with import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/00197eff36bb8f7dd7f53a59f730e1fd8e11b1f4.tar.gz") {}; -let - ncoq = coq_8_14; - ncoqPackages = coqPackages_8_14; -in -stdenv.mkDerivation { - name = "vericert"; - src = ./.; - - buildInputs = [ ncoq dune_2 gcc - ncoq.ocaml ncoq.ocamlPackages.findlib ncoq.ocamlPackages.menhir - ncoq.ocamlPackages.ocamlgraph ncoq.ocamlPackages.merlin - ncoq.ocamlPackages.menhirLib - - ncoqPackages.serapi - python3 - python3Packages.alectryon - python3Packages.sphinx_rtd_theme - ]; - - enableParallelBuilding = true; -} diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..63ef7a4 --- /dev/null +++ b/flake.lock @@ -0,0 +1,26 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1656083042, + "narHash": "sha256-G6m/OAIcmoEWeS+DbU70aNv21QB3kZCtJuUo+33s5VY=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "dc0380bb215ce001fcfccf4609d902115f87ddf9", + "type": "github" + }, + "original": { + "owner": "nixos", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..563797f --- /dev/null +++ b/flake.nix @@ -0,0 +1,33 @@ +{ + description = "Vericert dependencies"; + + inputs = { nixpkgs.url = "github:nixos/nixpkgs"; }; + + outputs = { self, nixpkgs }: + let + pkgs = nixpkgs.legacyPackages.x86_64-linux; + ncoq = pkgs.coq_8_14; + ncoqPackages = pkgs.coqPackages_8_14; + in { + devShell.x86_64-linux = pkgs.mkShell { + buildInputs = with pkgs; + [ ncoq + dune_2 + gcc + ncoq.ocaml + ncoq.ocamlPackages.findlib + ncoq.ocamlPackages.menhir + ncoq.ocamlPackages.ocamlgraph + ncoq.ocamlPackages.menhirLib + + ncoq.ocamlPackages.ocp-indent + ncoq.ocamlPackages.utop + + ncoqPackages.serapi + python3 + python3Packages.alectryon + python3Packages.sphinx_rtd_theme + ]; + }; + }; +} diff --git a/shell.nix b/shell.nix deleted file mode 100644 index a80b1be..0000000 --- a/shell.nix +++ /dev/null @@ -1,8 +0,0 @@ -with import <nixpkgs> {}; - -mkShell { - buildInputs = (import ./.).buildInputs ++ [ ocamlPackages.ocp-indent - ocamlPackages.merlin ocamlPackages.utop - # (import ./.) - ]; -} |