87 stdenv.mkDerivation rec {
88 pname = "appgate-sdp";
92 url = "https://bin.appgate-sdp.com/${lib.versions.majorMinor version}/client/appgate-sdp_${version}_amd64.deb";
93 sha256 = "sha256-0h6Mz3B7fADGL5tGbrKNYpVIAvRu7Xx0n9OvjOeVCds=";
96 # just patch interpreter
97 autoPatchelfIgnoreMissingDeps = true;
103 python3.pkgs.dbus-python
106 nativeBuildInputs = [
113 dpkg-deb -x $src $out
117 cp -r $out/usr/share $out/share
119 substituteInPlace $out/lib/systemd/system/appgate-dumb-resolver.service \
120 --replace "/opt/" "$out/opt/"
122 substituteInPlace $out/lib/systemd/system/appgatedriver.service \
123 --replace "/opt/" "$out/opt/" \
124 --replace "InaccessiblePaths=/mnt /srv /boot /media" "InaccessiblePaths=-/mnt -/srv -/boot -/media"
126 substituteInPlace $out/lib/systemd/system/appgate-resolver.service \
127 --replace "/usr/sbin/dnsmasq" "${dnsmasq}/bin/dnsmasq" \
128 --replace "/opt/" "$out/opt/"
130 substituteInPlace $out/opt/appgate/linux/nm.py \
131 --replace "/usr/sbin/dnsmasq" "${dnsmasq}/bin/dnsmasq"
133 substituteInPlace $out/opt/appgate/linux/set_dns \
134 --replace "/etc/appgate.conf" "$out/etc/appgate.conf"
136 wrapProgram $out/opt/appgate/service/createdump \
137 --set LD_LIBRARY_PATH "${lib.makeLibraryPath [ stdenv.cc.cc ]}"
139 wrapProgram $out/opt/appgate/appgate-driver \
140 --prefix PATH : ${lib.makeBinPath [ iproute2 networkmanager dnsmasq ]} \
141 --set LD_LIBRARY_PATH $out/opt/appgate/service
143 # make xdg-open overrideable at runtime
144 makeWrapper $out/opt/appgate/Appgate $out/bin/appgate \
145 --suffix PATH : ${lib.makeBinPath [ xdg-utils ]} \
146 --set LD_LIBRARY_PATH $out/opt/appgate:${lib.makeLibraryPath deps}
148 wrapProgram $out/opt/appgate/linux/set_dns --set PYTHONPATH $PYTHONPATH
152 description = "Appgate SDP (Software Defined Perimeter) desktop client";
153 homepage = "https://www.appgate.com/support/software-defined-perimeter-support";
154 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
155 license = licenses.unfree;
156 platforms = platforms.linux;
157 maintainers = with maintainers; [ ymatsiuk ];
158 mainProgram = "appgate";