5e9e1146e1
GitOrigin-RevId: 18036c0be90f4e308ae3ebcab0e14aae0336fe42
62 lines
1.1 KiB
Nix
62 lines
1.1 KiB
Nix
{ autoPatchelfHook
|
|
, curl
|
|
, dpkg
|
|
, dbus
|
|
, fetchurl
|
|
, lib
|
|
, libnl
|
|
, udev
|
|
, cryptsetup
|
|
, stdenv
|
|
, nixosTests
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "twingate";
|
|
version = "1.0.83+88994";
|
|
|
|
src = fetchurl {
|
|
url = "https://binaries.twingate.com/client/linux/DEB/x86_64/${version}/twingate-amd64.deb";
|
|
hash = "sha256-rPYjGSrjSNSdjMZRP0Gd7a9lRC+I06oOvZZEUEJ6s5k=";
|
|
};
|
|
|
|
buildInputs = [
|
|
dbus
|
|
curl
|
|
libnl
|
|
udev
|
|
cryptsetup
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
dpkg
|
|
autoPatchelfHook
|
|
];
|
|
|
|
postPatch = ''
|
|
while read file; do
|
|
substituteInPlace "$file" \
|
|
--replace "/usr/bin" "$out/bin" \
|
|
--replace "/usr/sbin" "$out/bin"
|
|
done < <(find etc usr/lib usr/share -type f)
|
|
'';
|
|
|
|
installPhase = ''
|
|
mkdir $out
|
|
mv etc $out/
|
|
mv usr/bin $out/bin
|
|
mv usr/sbin/* $out/bin
|
|
mv usr/lib $out/lib
|
|
mv usr/share $out/share
|
|
'';
|
|
|
|
passthru.tests = { inherit (nixosTests) twingate; };
|
|
|
|
meta = with lib; {
|
|
description = "Twingate Client";
|
|
homepage = "https://twingate.com";
|
|
license = licenses.unfree;
|
|
maintainers = with maintainers; [ tonyshkurenko ];
|
|
platforms = [ "x86_64-linux" ];
|
|
};
|
|
}
|