forked from grahamc/hydra-prs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
shell.nix
48 lines (40 loc) · 1.14 KB
/
shell.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
let
pkgs = import <nixpkgs> {};
unstable = import (pkgs.stdenv.mkDerivation {
name = "nixpkgs";
src = pkgs.fetchFromGitHub {
owner = "NixOS";
repo = "nixpkgs";
rev = "e9109b1b979d8ce9385431b38d0f2eda693cbaf3";
sha256 = "06yjrzmlmgnxfr1xihazbk5n4jrkh1inwgwxyzgr9ggsx8fdd5qj";
};
phases = [ "unpackPhase" "patchPhase" "installPhase" ];
patches = [
(pkgs.fetchpatch {
name = "add-packet.patch";
url = https://github.com/NixOS/nixpkgs/commit/9d92df154905ff60aeef15ae5d8670a2a800f765.patch;
sha256 = "0vz029bpghk32abcwl7gi4ydrlvlf0ari0kzla74xaqm4g4ihdw2";
})
];
installPhase = ''
cp -r . $out
'';
}) {};
inherit (pkgs) stdenv;
in stdenv.mkDerivation rec {
name = "nixops-hydra-prs";
version = "0.1";
src = "./";
buildInputs = [
unstable.packet
pkgs.nixops
pkgs.jq
];
shellHook = ''
mod_root=$(pwd "${src}")
export SSL_CERT_FILE=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt
export NIXOS_EXTRA_MODULE_PATH=$mod_root/modules/default.nix
export NIXOPS_DEPLOYMENT="hydra-prs"
export HISTFILE=$(pwd)/.bash_hist
'';
}