-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshell.nix
62 lines (56 loc) · 2.06 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
{ nixpkgs ? import <nixpkgs> {}, compiler ? "default", doBenchmark ? false }:
let
inherit (nixpkgs) pkgs;
haskellPackages = if compiler == "default"
then pkgs.haskellPackages
else pkgs.haskell.packages.${compiler};
variant = if doBenchmark then pkgs.haskell.lib.doBenchmark else pkgs.lib.id;
scrappy = import ./default.nix;
drv = variant (haskellPackages.callPackage scrappy {});
nix-thunk = pkgs.fetchFromGitHub {
owner = "obsidiansystems";
repo = "nix-thunk";
rev = "8fe6f2de2579ea3f17df2127f6b9f49db1be189f";
sha256 = "14l2k6wipam33696v3dr3chysxhqcy0j7hxfr10c0bxd1pxv7s8b";
};
n = import nix-thunk {};
seleniumStandalone = n.thunkSource ./deps/seleniumExe;
# google-chrome =
# let
# pkgs = import (builtins.fetchGit {
# # Descriptive name to make the store path easier to identify
# name = "my-old-revision";
# url = "https://github.com/NixOS/nixpkgs/";
# ref = "refs/heads/nixpkgs-unstable";
# rev = "3c3b3ab88a34ff8026fc69cb78febb9ec9aedb16";
# }) {};
# in
# pkgs.google-chrome;
chromedriver =
let
pkgs = import (builtins.fetchGit {
# Descriptive name to make the store path easier to identify
name = "my-old-revision";
url = "https://github.com/NixOS/nixpkgs/";
ref = "refs/heads/nixpkgs-unstable";
rev = "4ab8a3de296914f3b631121e9ce3884f1d34e1e5";
}) {};
in
pkgs.chromedriver;
in
pkgs.mkShell {
buildInputs = [
pkgs.cabal-install
pkgs.selenium-server-standalone
pkgs.busybox
# to run fuser -k tcp/8020 when using `ob run` (for developing tests+app)
# but could use in general for more reliable process killing
];
inputsFrom = [ (if pkgs.lib.inNixShell then drv.env else drv) ];
shellHook = ''
export PATH=$PATH:${chromedriver}/bin
# export PATH=$PATH:${seleniumStandalone}/bin
export PATH=$PATH:${pkgs.selenium-server-standalone}/bin
${pkgs.jre8}/bin/java -jar ${seleniumStandalone}/selenium-server-*.jar &
'' ;
}