vscode-extensions.yoavbls.pretty-ts-errors: 0.5.4 -> 0.6.1 (#363464)
[NixPkgs.git] / pkgs / by-name / ap / appgate-sdp / package.nix
blob49f1e61dbed0f61c8fab133e438a922eac736278
2   alsa-lib,
3   at-spi2-atk,
4   at-spi2-core,
5   atk,
6   autoPatchelfHook,
7   cairo,
8   cups,
9   curl,
10   dbus,
11   dnsmasq,
12   dpkg,
13   expat,
14   fetchurl,
15   gdk-pixbuf,
16   glib,
17   gtk3,
18   icu,
19   iproute2,
20   krb5,
21   lib,
22   libdrm,
23   libsecret,
24   libuuid,
25   libxcb,
26   libxkbcommon,
27   lttng-ust,
28   makeWrapper,
29   libgbm,
30   networkmanager,
31   nspr,
32   nss,
33   openssl,
34   pango,
35   python3,
36   stdenv,
37   systemd,
38   xdg-utils,
39   xorg,
40   zlib,
43 let
44   deps = [
45     alsa-lib
46     at-spi2-atk
47     at-spi2-core
48     atk
49     cairo
50     cups
51     curl
52     dbus
53     expat
54     gdk-pixbuf
55     glib
56     gtk3
57     icu
58     krb5
59     libdrm
60     libsecret
61     libuuid
62     libxcb
63     libxkbcommon
64     lttng-ust
65     libgbm
66     nspr
67     nss
68     openssl
69     pango
70     stdenv.cc.cc
71     systemd
72     xorg.libX11
73     xorg.libXScrnSaver
74     xorg.libXcomposite
75     xorg.libXcursor
76     xorg.libXdamage
77     xorg.libXext
78     xorg.libXfixes
79     xorg.libXi
80     xorg.libXrandr
81     xorg.libXrender
82     xorg.libXtst
83     xorg.libxkbfile
84     xorg.libxshmfence
85     zlib
86   ];
88 stdenv.mkDerivation rec {
89   pname = "appgate-sdp";
90   version = "6.4.0";
92   src = fetchurl {
93     url = "https://bin.appgate-sdp.com/${lib.versions.majorMinor version}/client/appgate-sdp_${version}_amd64.deb";
94     sha256 = "sha256-0h6Mz3B7fADGL5tGbrKNYpVIAvRu7Xx0n9OvjOeVCds=";
95   };
97   # just patch interpreter
98   autoPatchelfIgnoreMissingDeps = true;
99   dontConfigure = true;
100   dontBuild = true;
102   buildInputs = [
103     python3
104     python3.pkgs.dbus-python
105   ];
107   nativeBuildInputs = [
108     autoPatchelfHook
109     makeWrapper
110     dpkg
111   ];
113   unpackPhase = ''
114     dpkg-deb -x $src $out
115   '';
117   installPhase = ''
118     cp -r $out/usr/share $out/share
120     substituteInPlace $out/lib/systemd/system/appgate-dumb-resolver.service \
121         --replace "/opt/" "$out/opt/"
123     substituteInPlace $out/lib/systemd/system/appgatedriver.service \
124         --replace "/opt/" "$out/opt/" \
125         --replace "InaccessiblePaths=/mnt /srv /boot /media" "InaccessiblePaths=-/mnt -/srv -/boot -/media"
127     substituteInPlace $out/lib/systemd/system/appgate-resolver.service \
128         --replace "/usr/sbin/dnsmasq" "${dnsmasq}/bin/dnsmasq" \
129         --replace "/opt/" "$out/opt/"
131     substituteInPlace $out/opt/appgate/linux/nm.py \
132         --replace "/usr/sbin/dnsmasq" "${dnsmasq}/bin/dnsmasq"
134     substituteInPlace $out/opt/appgate/linux/set_dns \
135         --replace "/etc/appgate.conf" "$out/etc/appgate.conf"
137     wrapProgram $out/opt/appgate/service/createdump \
138         --set LD_LIBRARY_PATH "${lib.makeLibraryPath [ stdenv.cc.cc ]}"
140     wrapProgram $out/opt/appgate/appgate-driver \
141         --prefix PATH : ${
142           lib.makeBinPath [
143             iproute2
144             networkmanager
145             dnsmasq
146           ]
147         } \
148         --set LD_LIBRARY_PATH $out/opt/appgate/service
150     # make xdg-open overrideable at runtime
151     makeWrapper $out/opt/appgate/Appgate $out/bin/appgate \
152         --suffix PATH : ${lib.makeBinPath [ xdg-utils ]} \
153         --set LD_LIBRARY_PATH $out/opt/appgate:${lib.makeLibraryPath deps}
155     wrapProgram $out/opt/appgate/linux/set_dns --set PYTHONPATH $PYTHONPATH
156   '';
158   meta = with lib; {
159     description = "Appgate SDP (Software Defined Perimeter) desktop client";
160     homepage = "https://www.appgate.com/support/software-defined-perimeter-support";
161     sourceProvenance = with sourceTypes; [ binaryNativeCode ];
162     license = licenses.unfree;
163     platforms = platforms.linux;
164     maintainers = with maintainers; [ ymatsiuk ];
165     mainProgram = "appgate";
166   };