-
Notifications
You must be signed in to change notification settings - Fork 3
/
package.nix
56 lines (49 loc) · 1.2 KB
/
package.nix
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
50
51
52
53
54
55
56
{ stdenvNoCC
, lib
, runCommand
, callPackage
, nix-gitignore
, buildCargoCrates
, asciidoctor
}:
let
pname = "mew";
src = nix-gitignore.gitignoreSource [ "/.git" ] ./.;
crates = buildCargoCrates {
name = pname;
inherit src;
};
mew = (crates.mew.build.override {
runTests = true;
}
).overrideAttrs
(_: { inherit src; });
doc-html = stdenvNoCC.mkDerivation {
name = "${pname}-doc-html";
inherit src;
nativeBuildInputs = [ asciidoctor ];
postPatch = ''patchShebangs tools'';
buildPhase = ''tools/build-doc $out'';
installPhase = ''true'';
};
in
stdenvNoCC.mkDerivation {
# TODO: version
name = pname;
inherit src;
passthru = { inherit doc-html; };
installPhase = ''
# crate contains bin/mew.d...
install -Dt $out/bin -m 555 ${mew}/bin/${pname}
doc=$out/share/doc/${pname}
install -Dt $doc/adoc -m 444 *.adoc doc/*.adoc doc/meta/*.{png,gif,jpg}
cp -R ${doc-html} $doc/html
'';
meta = {
homepage = "https://mew.build/";
description = "a next‐generation free software build system";
license = with lib.licenses; [ asl20 mit ];
platforms = lib.platforms.all;
maintainers = with lib.maintainers; [ emily ];
};
}