overlay/pulse-secure/default.nix

122 lines
2.2 KiB
Nix
Raw Normal View History

2023-10-04 21:08:14 +00:00
{ lib
, stdenv
, buildFHSEnv
# Required for handling RPM package
, fetchurl
, rpmextract
# Runtime dependencies
, gcc
, openssl
, gtk4
, gtk3
, gtkmm3
, libsoup
, cairomm
, webkitgtk
, libbsd
, libuuid
, glib
, atkmm
, glibmm
, pangomm
, pango
, at-spi2-atk
, cairo
, libsigcxx
, gdk-pixbuf
, procps
, logger
}:
let
pname = "pulse-secure";
version = "22.3r1.0-b18209";
meta = with lib; {
description = "Ivanti Pulse-Secure VPN client";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
platforms = [ "x86_64-linux" ];
};
pulse-secure = stdenv.mkDerivation {
inherit pname version meta;
src = fetchurl {
#url = "https://dl.sva.de/pulsesecure/linux/ps-pulse-linux-${version}-64bit-installer.rpm";
url = "https://gml.noaa.gov/aftp/pub/cornwall/VPN%20Client/old/ps-pulse-linux-${version}-64bit-installer.rpm";
hash = "sha256-COKhB7+W1ridXF86O3309b5u1FgxukAfGYMf16Ie4Rs=";
};
unpackPhase = ''
${rpmextract}/bin/rpmextract $src
'';
installPhase = ''
runHook preInstall
mkdir -p $out
# executables
cp -rv ./opt/pulsesecure/bin $out/bin
# libs
cp -rv ./opt/pulsesecure/lib/dispatch/ $out/lib/
cp -rv ./opt/pulsesecure/lib/JUNS/ $out/lib/
cp -rv ./opt/pulsesecure/lib/dsOpenSSL/ $out/lib/
ls -la $out
ls -la $out/lib
# documentation
cp -rv ./usr/share/man $out/
# Desktop file
mkdir -p $out/share/applications
cp -v ./opt/pulsesecure/resource/pulse.desktop $out/share/applications/
cp -rv ./opt/pulsesecure/resource $out/
# DBUS
mkdir -p $out/share/dbus-1/system.d
cp ./opt/pulsesecure/lib/JUNS/net.psecure.pulse.conf $out/share/dbus-1/system.d/net.psecure.pulse.conf
runHook postInstall
'';
};
in
buildFHSEnv {
inherit meta;
name = pname;
targetPkgs = pkgs: [
pulse-secure
];
multiPkgs = pkgs: [
gcc
openssl
gtk3
gtkmm3
gtk4
libsoup
cairomm
webkitgtk
libbsd
libuuid
glib
atkmm
glibmm
pangomm
pango
at-spi2-atk
cairo
libsigcxx
gdk-pixbuf
];
runScript = "pulseUI";
}