-
Notifications
You must be signed in to change notification settings - Fork 13
/
masterpdfeditor.nix
34 lines (31 loc) · 982 Bytes
/
masterpdfeditor.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
with import <nixpkgs> {};
# run with
# $ nix-shell ./masterpdfeditor.nix
mkShell {
NIX_LD_LIBRARY_PATH = lib.makeLibraryPath [
nss
sane-backends
nspr
zlib
libglvnd
qt5.qtbase
qt5.qtsvg
qt5.qtdeclarative
qt5.qtwayland
stdenv.cc.cc
];
NIX_LD = builtins.readFile "${stdenv.cc}/nix-support/dynamic-linker";
QT_PLUGIN_PATH = "${qt5.qtbase}/${qt5.qtbase.qtPluginPrefix}:${qt5.qtwayland.bin}/${qt5.qtbase.qtPluginPrefix}";
QML2_IMPORT_PATH = "${qt5.qtdeclarative.bin}/${qt5.qtbase.qtQmlPrefix}:${qt5.qtwayland.bin}/${qt5.qtbase.qtQmlPrefix}";
shellHook = ''
if [ ! -d master-pdf-editor ]; then
echo "unpack master-pdf-editor..."
mkdir master-pdf-editor
tar -C master-pdf-editor \
--strip-components 1 \
-xf ${masterpdfeditor.src}
fi
echo '$ ./master-pdf-editor/masterpdfeditor5'
./master-pdf-editor/masterpdfeditor5
'';
}