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
|
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
|
|
|
|
}:
|
2023-02-02 18:25:31 +00:00
|
|
|
|
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";
|
2023-08-22 20:05:09 +00:00
|
|
|
version = "6.2.1";
|
2021-01-09 10:05:03 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2023-02-02 18:25:31 +00:00
|
|
|
url = "https://bin.appgate-sdp.com/${lib.versions.majorMinor version}/client/appgate-sdp_${version}_amd64.deb";
|
2023-08-22 20:05:09 +00:00
|
|
|
sha256 = "sha256-TjwVUBSBYo67lJyTXeee1bSaCnYLGE/MKSt+YEV+/Hw=";
|
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 \
|
2023-02-02 18:25:31 +00:00
|
|
|
--set LD_LIBRARY_PATH "${lib.makeLibraryPath [ stdenv.cc.cc ]}"
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
wrapProgram $out/opt/appgate/appgate-driver \
|
2023-02-02 18:25:31 +00:00
|
|
|
--prefix PATH : ${lib.makeBinPath [ iproute2 networkmanager dnsmasq ]} \
|
2021-06-28 23:13:55 +00:00
|
|
|
--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 \
|
2023-02-02 18:25:31 +00:00
|
|
|
--suffix PATH : ${lib.makeBinPath [ xdg-utils ]} \
|
|
|
|
--set LD_LIBRARY_PATH $out/opt/appgate:${lib.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 ];
|
|
|
|
};
|
|
|
|
}
|