From 080355c23d29be51c3ca468fd529083d89a54651 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sat, 11 Nov 2023 20:36:11 +0300 Subject: [PATCH] pkgs/headscale-ui: init at 2023.01.30-beta-1 --- pkgs/default.nix | 1 + pkgs/headscale-ui/default.nix | 36 +++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/headscale-ui/default.nix diff --git a/pkgs/default.nix b/pkgs/default.nix index 06609dd..d179a0a 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -36,6 +36,7 @@ # need manual intervention with each update cloneit = callPackage ./cloneit {}; reposilite-bin = callPackage ./reposilite-bin {}; + headscale-ui = callPackage ./headscale-ui {}; # patched packages foot-transparent = foot.overrideAttrs (prev: { diff --git a/pkgs/headscale-ui/default.nix b/pkgs/headscale-ui/default.nix new file mode 100644 index 0000000..9c130b5 --- /dev/null +++ b/pkgs/headscale-ui/default.nix @@ -0,0 +1,36 @@ +{ + stdenv, + fetchurl, + unzip, + lib, +}: +stdenv.mkDerivation rec { + pname = "headscale-ui"; + version = "2023.01.30-beta-1"; + + src = fetchurl { + url = "https://github.com/gurucomputing/${pname}/releases/download/${version}/headscale-ui.zip"; + sha256 = "sha256-6SUgtSTFvJWNdsWz6AiOfUM9p33+8EhDwyqHX7O2+NQ="; + }; + + buildInputs = [unzip]; + + dontStrip = true; + + unpackPhase = '' + runHook preUnpack + unzip $src + runHook postUnpack + ''; + + installPhase = '' + mkdir -p $out/share/ + cp -r web/ $out/share/ + ''; + + meta = { + description = "A web frontend for the headscale Tailscale-compatible coordination server"; + homepage = "https://github.com/gurucomputing/headscale-ui"; + license = [lib.licenses.bsd3]; + }; +}