unimath2024/flake.nix
2024-07-29 00:02:17 -05:00

44 lines
1,011 B
Nix

{
outputs = { self, nixpkgs, flake-utils }: flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
coq = pkgs.coq;
coqPackages = pkgs.mkCoqPackages coq;
unimath = pkgs.stdenv.mkDerivation {
name = "unimath";
src = pkgs.fetchFromGitHub {
owner = "unimath";
repo = "unimath";
rev = "v20240331";
sha256 = "sha256-HqAft5pFQbBHQfmvUZEqozVZjnGBlJ5Y8A983JQxQSs=";
};
buildInputs = with pkgs;[
coq
git
gnumake
ocamlPackages.camlp5
ocamlPackages.findlib
ocamlPackages.num
];
buildPhase = ''
echo $NIX_BUILD_CORES
make -j $NIX_BUILD_CORES
'';
};
in
{
packages = { inherit unimath; };
devShell = pkgs.mkShell {
packages = [
coq
coqPackages.vscoq-language-server
coqPackages.coq-lsp
];
};
});
}