-
-
Notifications
You must be signed in to change notification settings - Fork 55
Expand file tree
/
Copy pathshell.nix
More file actions
50 lines (48 loc) · 1 KB
/
shell.nix
File metadata and controls
50 lines (48 loc) · 1 KB
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> {}
, extraPkgs ? []
}:
let
fixWrapper = pkgs.runCommand "fix-wrapper" {} ''
mkdir -p $out/bin
for i in ${pkgs.gcc.cc}/bin/*-gnu-gcc*; do
ln -s ${pkgs.gcc}/bin/gcc $out/bin/$(basename "$i")
done
for i in ${pkgs.gcc.cc}/bin/*-gnu-{g++,c++}*; do
ln -s ${pkgs.gcc}/bin/g++ $out/bin/$(basename "$i")
done
ln -sf ${pkgs.gcc.cc}/bin/{,*-gnu-}gcc-{ar,nm,ranlib} $out/bin
'';
fhs = pkgs.buildFHSEnv {
name = "openwrt-env";
targetPkgs = pkgs: with pkgs; [
binutils
file
fixWrapper
gcc
git
glibc.static
gnumake
ncurses
openssl
patch
perl
pkg-config
(python3.withPackages (ps: [ ps.setuptools ]))
rsync
subversion
swig
systemd
unzip
util-linux
wget
which
zlib
zlib.static
] ++ extraPkgs;
multiPkgs = null;
extraOutputsToInstall = [ "dev" ];
profile = ''
export hardeningDisable=all
'';
};
in fhs