-
Notifications
You must be signed in to change notification settings - Fork 3
/
release.nix
34 lines (33 loc) · 923 Bytes
/
release.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
{ pkgs ? import <nixpkgs> {}
, src ? {
outPath = ./.;
revCount = 0;
shortRev = "0000000";
gitTag = "master";
}
}:
let
lib = pkgs.lib;
in {
platformDoc = lib.hydraJob (
pkgs.stdenv.mkDerivation {
name = "platform-doc";
src = (import src.outPath {
inherit pkgs;
inherit (src) revCount shortRev gitTag;
});
builder = pkgs.stdenv.shell;
PATH = with pkgs; lib.makeBinPath [ coreutils gnutar gzip ];
args = [ "-ec" ''
mkdir -p $out/nix-support
cd $src
tar cf $out/platform-doc.tar --mode +w -C en .
tar uf $out/platform-doc.tar --mode +w de
gzip $out/platform-doc.tar
echo "file tarball $out/platform-doc.tar.gz" >> $out/nix-support/hydra-build-products
cp $src/en/objects.inv $out
echo "file inventory $out/objects.inv" >> $out/nix-support/hydra-build-products
''];
}
);
}