forked from jasmin-lang/jasmin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcoqword.nix
More file actions
49 lines (39 loc) · 1.18 KB
/
coqword.nix
File metadata and controls
49 lines (39 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{ stdenv, lib, fetchFromGitHub, coqPackages, ocaml, dune_2 }:
let inherit (coqPackages) coq; in
let mathcomp =
(if coqPackages ? mathcomp_
then coqPackages.mathcomp_ "1.12.0"
else coqPackages.mathcomp.override { version = "1.12.0"; }
).algebra
; in
let rev = "e39e96d51aa96f386222fd1b38776f2117f325c5"; in
stdenv.mkDerivation rec {
version = "1.0-git-${builtins.substring 0 8 rev}";
name = "coq${coq.coq-version}-coqword-${version}";
src = fetchFromGitHub {
owner = "jasmin-lang";
repo = "coqword";
inherit rev;
sha256 = "sha256:0703m97rnivcbc7vvbd9rl2dxs6l8n52cbykynw61c6w9rhxspcg";
};
buildInputs = [ coq ocaml dune_2 ];
propagatedBuildInputs = [ mathcomp ];
buildPhase = ''
runHook preBuild
dune build -p coq-mathcomp-word
runHook postBuild
'';
installPhase = ''
runHook preInstall
dune install --prefix=$out
mkdir -p $out/lib/coq/${coq.coq-version}/
mv $out/lib/coq/user-contrib $out/lib/coq/${coq.coq-version}/
runHook postInstall
'';
meta = {
description = "Yet Another Coq Library on Machine Words";
license = lib.licenses.cecill-b;
inherit (src.meta) homepage;
inherit (coq.meta) platforms;
};
}