nixpkgs/pkgs/applications/networking/appgate-sdp/default.nix

159 lines
3.2 KiB
Nix
Raw Normal View History

{ alsa-lib
2021-01-05 08:52:55 +00:00
, at-spi2-atk
, at-spi2-core
, atk
, autoPatchelfHook
2021-01-05 08:52:55 +00:00
, cairo
, cups
, curl
, dbus
, dnsmasq
, dpkg
, expat
, fetchurl
, gdk-pixbuf
, glib
, gtk3
, icu
2021-03-14 16:05:16 +00:00
, iproute2
2021-01-05 08:52:55 +00:00
, krb5
, lib
2021-01-11 10:51:00 +00:00
, libdrm
2021-01-05 08:52:55 +00:00
, libsecret
, libuuid
, libxcb
, libxkbcommon
2021-01-05 08:52:55 +00:00
, lttng-ust
, makeWrapper
, mesa
2021-01-05 08:52:55 +00:00
, networkmanager
, nspr
, nss
, openssl
, pango
, procps
, python3
2021-01-05 08:52:55 +00:00
, stdenv
, systemd
2021-04-06 17:52:18 +01:00
, xdg-utils
, xorg
2021-01-05 08:52:55 +00:00
, zlib
}:
2021-01-15 13:21:58 +00:00
with lib;
2021-01-05 08:52:55 +00:00
let
deps = [
alsa-lib
2021-01-05 08:52:55 +00:00
at-spi2-atk
at-spi2-core
atk
cairo
cups
curl
dbus
expat
gdk-pixbuf
glib
gtk3
icu
krb5
2021-01-11 10:51:00 +00:00
libdrm
2021-01-05 08:52:55 +00:00
libsecret
libuuid
libxcb
libxkbcommon
2021-01-05 08:52:55 +00:00
lttng-ust
mesa
2021-01-05 08:52:55 +00:00
nspr
nss
openssl
pango
stdenv.cc.cc
systemd
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-05 08:52:55 +00:00
zlib
];
in
stdenv.mkDerivation rec {
pname = "appgate-sdp";
2022-01-12 09:49:47 +00:00
version = "5.5.2";
2021-01-05 08:52:55 +00:00
src = fetchurl {
url = "https://bin.appgate-sdp.com/${versions.majorMinor version}/client/appgate-sdp_${version}_amd64.deb";
2022-01-12 09:49:47 +00:00
sha256 = "sha256-8K7RqkxpyRsQ3QHGIfTchLaZ7/+k0hbiJdl7uc++vYs=";
2021-01-05 08:52:55 +00:00
};
# just patch interpreter
autoPatchelfIgnoreMissingDeps = true;
2021-01-05 08:52:55 +00:00
dontConfigure = true;
dontBuild = true;
buildInputs = [
python3
python3.pkgs.dbus-python
2021-01-05 08:52:55 +00:00
];
nativeBuildInputs = [
autoPatchelfHook
2021-01-05 08:52:55 +00:00
makeWrapper
dpkg
];
unpackPhase = ''
dpkg-deb -x $src $out
'';
installPhase = ''
cp -r $out/usr/share $out/share
substituteInPlace $out/lib/systemd/system/appgate-dumb-resolver.service \
--replace "/opt/" "$out/opt/"
2021-01-11 10:51:00 +00:00
substituteInPlace $out/lib/systemd/system/appgatedriver.service \
--replace "/opt/" "$out/opt/" \
2021-01-11 10:51:00 +00:00
--replace "InaccessiblePaths=/mnt /srv /boot /media" "InaccessiblePaths=-/mnt -/srv -/boot -/media"
substituteInPlace $out/lib/systemd/system/appgate-resolver.service \
--replace "/usr/sbin/dnsmasq" "${dnsmasq}/bin/dnsmasq" \
--replace "/opt/" "$out/opt/"
substituteInPlace $out/opt/appgate/linux/nm.py \
2021-01-11 10:51:00 +00:00
--replace "/usr/sbin/dnsmasq" "${dnsmasq}/bin/dnsmasq"
substituteInPlace $out/opt/appgate/linux/set_dns \
--replace "/etc/appgate.conf" "$out/etc/appgate.conf"
2021-01-05 08:52: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
makeWrapper $out/opt/appgate/Appgate $out/bin/appgate \
--prefix PATH : ${makeBinPath [ xdg-utils ]} \
--set LD_LIBRARY_PATH $out/opt/appgate:${makeLibraryPath deps}
2021-01-05 08:52:55 +00:00
wrapProgram $out/opt/appgate/linux/set_dns --set PYTHONPATH $PYTHONPATH
'';
meta = with lib; {
2021-01-05 08:52:55 +00:00
description = "Appgate SDP (Software Defined Perimeter) desktop client";
2021-02-21 15:19:02 +00:00
homepage = "https://www.appgate.com/support/software-defined-perimeter-support";
2021-01-05 08:52:55 +00:00
license = licenses.unfree;
platforms = platforms.linux;
maintainers = with maintainers; [ ymatsiuk ];
};
}