-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathshell.nix
More file actions
50 lines (49 loc) · 945 Bytes
/
Copy pathshell.nix
File metadata and controls
50 lines (49 loc) · 945 Bytes
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
{ pkgs ? import <nixpkgs> {},
run ? "zsh"
}: let
fhs = pkgs.buildFHSUserEnv {
name = "ps2dev";
targetPkgs = pkgs: (with pkgs; [
autoconf
gnumake
clang
clang-tools
gcc
wget
git
patch
texinfo
bash
file
bison
flex
gettext
gsl
gnum4
gmp.dev
gmp.out
mpfr.out
mpfr.dev
libmpc
cmake
zlib.dev
zlib.out
]);
runScript = run;
};
in pkgs.stdenv.mkDerivation {
name = "ps2dev-shell";
nativeBuildInputs = [ fhs ];
hardeningDisable = [ "format" ];
shellHook = ''
# or whatever you want
export PS2DEV=$HOME/ps2
mkdir -p $PS2DEV
chown -R $USER: $PS2DEV
# setup login env
export PS2SDK=$PS2DEV/ps2sdk
export PATH=$PATH:$PS2DEV/bin:$PS2DEV/ee/bin:$PS2DEV/iop/bin:$PS2DEV/dvp/bin:$PS2SDK/bin
export CMAKE_INSTALL_PREFIX=$PS2DEV/bin
exec ps2dev
'';
}