nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 51 lines 1.1 kB view raw
1{ 2 lib, 3 stdenvNoCC, 4 fetchurl, 5 xar, 6 cpio, 7 pbzx, 8}: 9 10stdenvNoCC.mkDerivation (finalAttrs: { 11 pname = "tailscale-gui"; 12 version = "1.92.3"; 13 14 src = fetchurl { 15 url = "https://pkgs.tailscale.com/stable/Tailscale-${finalAttrs.version}-macos.pkg"; 16 hash = "sha256-K5tJHyFhqnxV4KHzr7YOHRoH33vk+dq+EVWyUo88nuI="; 17 }; 18 19 dontUnpack = true; 20 21 nativeBuildInputs = [ 22 xar 23 cpio 24 pbzx 25 ]; 26 27 installPhase = '' 28 runHook preInstall 29 xar -xf $src 30 cd Distribution.pkg 31 pbzx -n Payload | cpio -i 32 33 mkdir -p $out/Applications/Tailscale.app 34 mkdir -p $out/bin 35 36 cp -R Contents $out/Applications/Tailscale.app/ 37 ln -s "$out/Applications/Tailscale.app/Contents/MacOS/Tailscale" "$out/bin/tailscale" 38 39 runHook postInstall 40 ''; 41 42 meta = { 43 description = "Tailscale GUI client for macOS"; 44 homepage = "https://tailscale.com"; 45 changelog = "https://tailscale.com/changelog#client"; 46 license = lib.licenses.unfree; 47 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; 48 maintainers = with lib.maintainers; [ anish ]; 49 platforms = lib.platforms.darwin; 50 }; 51})