-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.nix
36 lines (33 loc) · 1.11 KB
/
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
35
36
{ auron ? { outPath = ./.; revCount = 0; shortRev = "abcdef"; rev = "HEAD"; }
, officialRelease ? false
}:
let
pkgs = import <nixpkgs> {};
version = builtins.readFile ./VERSION +
(pkgs.lib.optionalString (!officialRelease)
"-r${toString auron.revCount}-g${auron.shortRev}");
jobs = rec {
shell = pkgs.stdenv.mkDerivation rec {
name = "auron-env-${version}";
inherit version;
src = ./.;
buildInputs = with pkgs;
[ php python27 arcanist nixops nix git
python27Packages.pyflakes python27Packages.pep8
];
shellHook = ''
export NIXOPS_STATE=$HOME/.haskell-org.deployments.nixops
export NIXOPS_DEPLOYMENT=vbox
if [[ -z `nixops list | grep ec2` ]]; then
nixops create src/network.nix src/deploy/ec2.nix -d ec2
fi
if [[ -z `nixops list | grep vbox` ]]; then
nixops create src/network.nix src/deploy/vbox.nix -d vbox
fi
if [[ -z `nixops list | grep rackspace` ]]; then
nixops create src/network.nix src/deploy/rackspace.nix -d rackspace
fi
'';
};
};
in jobs