-
Notifications
You must be signed in to change notification settings - Fork 0
/
miwutong.nix
42 lines (30 loc) · 1.34 KB
/
miwutong.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
with import <nixpkgs> {};
mkShell rec {
name = "patchCppTools";
buildInputs = [
autoPatchelfHook
libselinux
fontconfig
electron
systemd
gtk3 webkitgtk gdk-pixbuf
cairo pango libpulseaudio glib alsaLib libdrm mesa
nss expat dbus nspr atk cups utillinux at_spi2_atk at-spi2-core
xorg.libSM
xorg.libX11 xorg.libICE xorg.libXrender xorg.libXext xorg.libXtst xorg.libXt xorg.libXtst
xorg.libXi xorg.libXinerama xorg.libXcursor xorg.libXrandr xorg.libXcomposite xorg.libXfixes xorg.libXdamage xorg.libxcb xorg.libXScrnSaver
gnome2.gnome_vfs gnome2.GConf
];
ld = lib.makeLibraryPath ([
stdenv.cc.cc.lib fontconfig.lib # zlib
] ++ buildInputs );
shellHook = ''
interp="$(cat $NIX_CC/nix-support/dynamic-linker)"
rpath=${ld}
export QT_DEBUG_PLUGINS=1
export XDG_DATA_DIRS=$XDG_DATA_DIRS:"${gtk3}/share/gsettings-schemas/${gtk3.name}" # also right
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"/home/prehonor/Public/Program/baidulibs":"/home/prehonor/Public/Program/baidunetdisk":${ld}
# export LD_PRELOAD="/home/prehonor/Public/Program/baidunetdisk/libbrowserengine.so:/home/prehonor/Public/Program/baidunetdisk/libkernel.so":$LD_PRELOAD
# find . -type f -perm -0100 -exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" {} \;
'';
}