-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
release.nix
29 lines (29 loc) · 1001 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
{ nixopsVbox ? { outPath = ./.; revCount = 0; shortRev = "abcdef"; rev = "HEAD"; }
, nixpkgs ? <nixpkgs>
, officialRelease ? false
}:
let
pkgs = import nixpkgs {};
version = "1.7" + (if officialRelease then "" else "pre${toString nixopsVbox.revCount}_${nixopsVbox.shortRev}");
in
rec {
build = pkgs.lib.genAttrs [ "x86_64-linux" "i686-linux" "x86_64-darwin" ] (system:
with import nixpkgs { inherit system; };
python2Packages.buildPythonApplication rec {
name = "nixops-vbox";
src = ./.;
prePatch = ''
for i in setup.py; do
substituteInPlace $i --subst-var-by version ${version}
done
'';
buildInputs = [ python2Packages.nose python2Packages.coverage ];
doCheck = true;
postInstall = ''
mkdir -p $out/share/nix/nixops-vbox
cp -av nix/* $out/share/nix/nixops-vbox
'';
meta.description = "NixOps VirtualBox backend for ${stdenv.system}";
}
);
}