-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathshell.nix
57 lines (51 loc) · 1.22 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
{ pkgs ? import ./pkgs.nix {} }:
with pkgs;
let
utils = callPackage ./utils.nix {};
in
pkgs.mkShell {
nativeBuildInputs = [
nodejs
nodePackages.node2nix
# electron
electron
nodePackages."@electron-forge/cli"
# debian builds
dpkg
fakeroot
# rpm builds
rpm
# exe builds
wineWowPackages.full
mono
# zip builds
zip
# github releases
gitAndTools.gh
];
# prevent electron download from electron in package.json
ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
# use the electron builds from here
electron_zip_dir = utils.electronZipDir;
shellHook = ''
echo 'Entering Polykey'
set -o allexport
. ./.env
set +o allexport
set -v
export PATH="$(pwd)/dist/bin:$(npm bin):$PATH"
# electron and @electron-forge/cli are both installed in package.json
# this ensures that in nix-shell we are using the nix packaged versions
export PATH="${lib.makeBinPath
[
electron
nodePackages."@electron-forge/cli"
]
}:$PATH"
npm install
mkdir --parents "$(pwd)/tmp"
# force 022 when using fakeroot
umask 022
set +v
'';
}