-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdefault.nix
35 lines (32 loc) · 1.22 KB
/
default.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
argsOuter@{...}:
let
# specifying args defaults in this slightly non-standard way to allow us to include the default values in `args`
args = rec {
pkgs = import <nixpkgs> {};
localOverridesPath = ./local.nix;
} // argsOuter;
in (with args; {
digitalMarketplaceFunctionalTestsEnv = (
(pkgs.bundlerEnv {
name = "digitalmarketplace-functional-tests-bundler-env";
ruby = pkgs.ruby;
gemfile = ./Gemfile;
lockfile = ./Gemfile.lock;
gemset = ./gemset.nix;
}).env.overrideAttrs (oldAttrs: oldAttrs // rec {
name = "digitalmarketplace-functional-tests-env";
shortName = "dm-func-tst";
buildInputs = [
pkgs.bundix
pkgs.libxml2
pkgs.phantomjs2
((import ./aws-auth.nix) (with pkgs; { inherit stdenv fetchFromGitHub makeWrapper jq awscli openssl; }))
];
# if we don't have this, we get unicode troubles in a --pure nix-shell
LANG="en_GB.UTF-8";
shellHook = ''
export PS1="\[\e[0;36m\](nix-shell\[\e[0m\]:\[\e[0;36m\]${shortName})\[\e[0;32m\]\u@\h\[\e[0m\]:\[\e[0m\]\[\e[0;36m\]\w\[\e[0m\]\$ "
'';
})
).overrideAttrs (if builtins.pathExists localOverridesPath then (import localOverridesPath args) else (x: x));
})