2021-06-28 23:13:55 +00:00
|
|
|
{ alsa-lib
|
2021-01-09 10:05:03 +00:00
|
|
|
, at-spi2-atk
|
|
|
|
, at-spi2-core
|
|
|
|
, atk
|
2021-06-28 23:13:55 +00:00
|
|
|
, autoPatchelfHook
|
2021-01-09 10:05:03 +00:00
|
|
|
, cairo
|
|
|
|
, cups
|
|
|
|
, curl
|
|
|
|
, dbus
|
|
|
|
, dnsmasq
|
|
|
|
, dpkg
|
|
|
|
, expat
|
|
|
|
, fetchurl
|
|
|
|
, gdk-pixbuf
|
|
|
|
, glib
|
|
|
|
, gtk3
|
|
|
|
, icu
|
2021-04-05 15:23:46 +00:00
|
|
|
, iproute2
|
2021-01-09 10:05:03 +00:00
|
|
|
, krb5
|
|
|
|
, lib
|
2021-02-05 17:12:51 +00:00
|
|
|
, libdrm
|
2021-01-09 10:05:03 +00:00
|
|
|
, libsecret
|
|
|
|
, libuuid
|
|
|
|
, libxcb
|
2021-06-28 23:13:55 +00:00
|
|
|
, libxkbcommon
|
2021-01-09 10:05:03 +00:00
|
|
|
, lttng-ust
|
|
|
|
, makeWrapper
|
2021-06-28 23:13:55 +00:00
|
|
|
, mesa
|
2021-01-09 10:05:03 +00:00
|
|
|
, networkmanager
|
|
|
|
, nspr
|
|
|
|
, nss
|
|
|
|
, openssl
|
|
|
|
, pango
|
|
|
|
, procps
|
2021-09-18 10:52:07 +00:00
|
|
|
, python3
|
2021-01-09 10:05:03 +00:00
|
|
|
, stdenv
|
|
|
|
, systemd
|
2021-04-08 16:26:57 +00:00
|
|
|
, xdg-utils
|
2021-06-28 23:13:55 +00:00
|
|
|
, xorg
|
2021-01-09 10:05:03 +00:00
|
|
|
, zlib
|
|
|
|
}:
|
2021-01-17 00:15:33 +00:00
|
|
|
with lib;
|
2021-01-09 10:05:03 +00:00
|
|
|
let
|
|
|
|
deps = [
|
2021-06-28 23:13:55 +00:00
|
|
|
alsa-lib
|
2021-01-09 10:05:03 +00:00
|
|
|
at-spi2-atk
|
|
|
|
at-spi2-core
|
|
|
|
atk
|
|
|
|
cairo
|
|
|
|
cups
|
|
|
|
curl
|
|
|
|
dbus
|
|
|
|
expat
|
|
|
|
gdk-pixbuf
|
|
|
|
glib
|
|
|
|
gtk3
|
|
|
|
icu
|
|
|
|
krb5
|
2021-02-05 17:12:51 +00:00
|
|
|
libdrm
|
2021-01-09 10:05:03 +00:00
|
|
|
libsecret
|
|
|
|
libuuid
|
|
|
|
libxcb
|
2021-06-28 23:13:55 +00:00
|
|
|
libxkbcommon
|
2021-01-09 10:05:03 +00:00
|
|
|
lttng-ust
|
2021-06-28 23:13:55 +00:00
|
|
|
mesa
|
2021-01-09 10:05:03 +00:00
|
|
|
nspr
|
|
|
|
nss
|
|
|
|
openssl
|
|
|
|
pango
|
|
|
|
stdenv.cc.cc
|
|
|
|
systemd
|
2021-06-28 23:13:55 +00:00
|
|
|
xorg.libX11
|
|
|
|
xorg.libXScrnSaver
|
|
|
|
xorg.libXcomposite
|
|
|
|
xorg.libXcursor
|
|
|
|
xorg.libXdamage
|
|
|
|
xorg.libXext
|
|
|
|
xorg.libXfixes
|
|
|
|
xorg.libXi
|
|
|
|
xorg.libXrandr
|
|
|
|
xorg.libXrender
|
|
|
|
xorg.libXtst
|
|
|
|
xorg.libxkbfile
|
|
|
|
xorg.libxshmfence
|
2021-01-09 10:05:03 +00:00
|
|
|
zlib
|
|
|
|
];
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "appgate-sdp";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "6.0.1";
|
2021-01-09 10:05:03 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-06-28 23:13:55 +00:00
|
|
|
url = "https://bin.appgate-sdp.com/${versions.majorMinor version}/client/appgate-sdp_${version}_amd64.deb";
|
2022-08-12 12:06:08 +00:00
|
|
|
sha256 = "sha256-dVVOUdGJDmStS1ZXqPOFpeWhLgimv4lHBS/OOEDrtM0=";
|
2021-01-09 10:05:03 +00:00
|
|
|
};
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
# just patch interpreter
|
|
|
|
autoPatchelfIgnoreMissingDeps = true;
|
2021-01-09 10:05:03 +00:00
|
|
|
dontConfigure = true;
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
buildInputs = [
|
2021-09-18 10:52:07 +00:00
|
|
|
python3
|
|
|
|
python3.pkgs.dbus-python
|
2021-01-09 10:05:03 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2021-06-28 23:13:55 +00:00
|
|
|
autoPatchelfHook
|
2021-01-09 10:05:03 +00:00
|
|
|
makeWrapper
|
|
|
|
dpkg
|
|
|
|
];
|
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
dpkg-deb -x $src $out
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
cp -r $out/usr/share $out/share
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
substituteInPlace $out/lib/systemd/system/appgate-dumb-resolver.service \
|
|
|
|
--replace "/opt/" "$out/opt/"
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
substituteInPlace $out/lib/systemd/system/appgatedriver.service \
|
2021-06-28 23:13:55 +00:00
|
|
|
--replace "/opt/" "$out/opt/" \
|
2021-02-05 17:12:51 +00:00
|
|
|
--replace "InaccessiblePaths=/mnt /srv /boot /media" "InaccessiblePaths=-/mnt -/srv -/boot -/media"
|
|
|
|
|
|
|
|
substituteInPlace $out/lib/systemd/system/appgate-resolver.service \
|
2021-06-28 23:13:55 +00:00
|
|
|
--replace "/usr/sbin/dnsmasq" "${dnsmasq}/bin/dnsmasq" \
|
|
|
|
--replace "/opt/" "$out/opt/"
|
|
|
|
|
|
|
|
substituteInPlace $out/opt/appgate/linux/nm.py \
|
2021-02-05 17:12:51 +00:00
|
|
|
--replace "/usr/sbin/dnsmasq" "${dnsmasq}/bin/dnsmasq"
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
substituteInPlace $out/opt/appgate/linux/set_dns \
|
|
|
|
--replace "/etc/appgate.conf" "$out/etc/appgate.conf"
|
2021-01-09 10:05:03 +00:00
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
wrapProgram $out/opt/appgate/service/createdump \
|
|
|
|
--set LD_LIBRARY_PATH "${makeLibraryPath [ stdenv.cc.cc ]}"
|
|
|
|
|
|
|
|
wrapProgram $out/opt/appgate/appgate-driver \
|
|
|
|
--prefix PATH : ${makeBinPath [ iproute2 networkmanager dnsmasq ]} \
|
|
|
|
--set LD_LIBRARY_PATH $out/opt/appgate/service
|
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
# make xdg-open overrideable at runtime
|
2021-06-28 23:13:55 +00:00
|
|
|
makeWrapper $out/opt/appgate/Appgate $out/bin/appgate \
|
2022-08-21 13:32:41 +00:00
|
|
|
--suffix PATH : ${makeBinPath [ xdg-utils ]} \
|
2021-06-28 23:13:55 +00:00
|
|
|
--set LD_LIBRARY_PATH $out/opt/appgate:${makeLibraryPath deps}
|
2021-01-09 10:05:03 +00:00
|
|
|
|
|
|
|
wrapProgram $out/opt/appgate/linux/set_dns --set PYTHONPATH $PYTHONPATH
|
|
|
|
'';
|
2021-06-28 23:13:55 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2021-01-09 10:05:03 +00:00
|
|
|
description = "Appgate SDP (Software Defined Perimeter) desktop client";
|
2021-02-22 21:28:39 +00:00
|
|
|
homepage = "https://www.appgate.com/support/software-defined-perimeter-support";
|
2022-06-26 10:26:21 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
2021-01-09 10:05:03 +00:00
|
|
|
license = licenses.unfree;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ ymatsiuk ];
|
|
|
|
};
|
|
|
|
}
|