Skip to content

Commit

Permalink
twingate: init at 1.0.60
Browse files Browse the repository at this point in the history
  • Loading branch information
alexprivalov committed Nov 4, 2022
1 parent e739696 commit 3abe0af
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 0 deletions.
8 changes: 8 additions & 0 deletions nixos/doc/manual/from_md/release-notes/rl-2111.section.xml
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,14 @@
<link xlink:href="options.html#opt-services.prometheus.exporters.smartctl.enable">services.prometheus.exporters.smartctl</link>.
</para>
</listitem>
<listitem>
<para>
<link xlink:href="https://docs.twingate.com/docs/linux">twingate</link>,
a high performance, easy to use zero trust solution that
enables access to private resources from any device with
better security than a VPN.
</para>
</listitem>
</itemizedlist>
</section>
<section xml:id="sec-release-21.11-incompatibilities">
Expand Down
2 changes: 2 additions & 0 deletions nixos/doc/manual/release-notes/rl-2111.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ In addition to numerous new and upgraded packages, this release has the followin

- [smartctl_exporter](https://github.com/prometheus-community/smartctl_exporter), a Prometheus exporter for [S.M.A.R.T.](https://en.wikipedia.org/wiki/S.M.A.R.T.) data. Available as [services.prometheus.exporters.smartctl](options.html#opt-services.prometheus.exporters.smartctl.enable).

- [twingate](https://docs.twingate.com/docs/linux), a high performance, easy to use zero trust solution that enables access to private resources from any device with better security than a VPN.

## Backward Incompatibilities {#sec-release-21.11-incompatibilities}

- The NixOS VM test framework, `pkgs.nixosTest`/`make-test-python.nix` (`pkgs.testers.nixosTest` since 22.05), now requires detaching commands such as `succeed("foo &")` and `succeed("foo | xclip -i")` to close stdout.
Expand Down
51 changes: 51 additions & 0 deletions pkgs/applications/networking/twingate/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{ autoPatchelfHook
, curl
, dpkg
, dbus
, fetchurl
, lib
, libnl
, udev
, cryptsetup
, stdenv
}:

stdenv.mkDerivation rec {
pname = "twingate";
version = "1.0.60";

src = fetchurl {
url = "https://binaries.twingate.com/client/linux/DEB/${version}/twingate-amd64.deb";
sha256 = "b308c422af8a33ecd58e21a10a72c353351a189df67006e38d1ec029a93d5678";
};

buildInputs = [ dbus curl libnl udev cryptsetup ];
nativeBuildInputs = [ dpkg autoPatchelfHook ];

unpackCmd = "mkdir root ; dpkg-deb -x $curSrc root";

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
'';

meta = with lib; {
description = "Twingate Client";
homepage = "https://twingate.com";
license = licenses.unfree;
maintainers = with maintainers; [ tonyshkurenko ];
platforms = platforms.linux;
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25363,6 +25363,8 @@ with pkgs;

twa = callPackage ../tools/networking/twa { };

twingate = callPackage ../applications/networking/twingate { };

# Upstream U-Boots:
inherit (callPackage ../misc/uboot {})
buildUBoot
Expand Down

0 comments on commit 3abe0af

Please sign in to comment.