88 stdenv.mkDerivation rec {
89 pname = "appgate-sdp";
93 url = "https://bin.appgate-sdp.com/${lib.versions.majorMinor version}/client/appgate-sdp_${version}_amd64.deb";
94 sha256 = "sha256-0h6Mz3B7fADGL5tGbrKNYpVIAvRu7Xx0n9OvjOeVCds=";
97 # just patch interpreter
98 autoPatchelfIgnoreMissingDeps = true;
104 python3.pkgs.dbus-python
107 nativeBuildInputs = [
114 dpkg-deb -x $src $out
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 \
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
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";