-
Notifications
You must be signed in to change notification settings - Fork 14
/
masterpdfeditor.nix
40 lines (37 loc) · 1.01 KB
/
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
35
36
37
38
39
40
{
pkgs ? import <nixpkgs> { },
}:
let
inherit (pkgs) lib stdenv qt5;
in
# run with
# $ nix-shell ./masterpdfeditor.nix
pkgs.mkShell {
NIX_LD_LIBRARY_PATH = lib.makeLibraryPath [
pkgs.nss
pkgs.sane-backends
pkgs.nspr
pkgs.zlib
pkgs.libglvnd
qt5.qtbase
qt5.qtsvg
qt5.qtdeclarative
qt5.qtwayland
pkgs.pkcs11helper
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 ${pkgs.masterpdfeditor.src}
fi
echo '$ ./master-pdf-editor/masterpdfeditor5'
./master-pdf-editor/masterpdfeditor5
'';
}