From 731678dab4f29d87bb7b1d8f8ca5cb0422759fae Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Mon, 1 Apr 2024 13:32:34 +0200 Subject: [PATCH] github-desktop: 3.3.10 -> 3.3.12 Now support `aarch64` and `x86_64` archs --- pkgs/by-name/gi/github-desktop/package.nix | 23 +++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/pkgs/by-name/gi/github-desktop/package.nix b/pkgs/by-name/gi/github-desktop/package.nix index b5799ae66607..7ada2ddb663b 100644 --- a/pkgs/by-name/gi/github-desktop/package.nix +++ b/pkgs/by-name/gi/github-desktop/package.nix @@ -20,17 +20,26 @@ }: let - rcversion = "1"; - arch = "amd64"; + rcversion = "2"; in stdenvNoCC.mkDerivation (finalAttrs: { pname = "github-desktop"; - version = "3.3.10"; + version = "3.3.12"; - src = fetchurl { - url = "https://github.com/shiftkey/desktop/releases/download/release-${finalAttrs.version}-linux${rcversion}/GitHubDesktop-linux-${arch}-${finalAttrs.version}-linux${rcversion}.deb"; - hash = "sha256-zzq6p/DAQmgSw4KAUYqtrQKkIPksLzkUQjGzwO26WgQ="; - }; + src = + let + urls = { + "x86_64-linux" = { + url = "https://github.com/shiftkey/desktop/releases/download/release-${finalAttrs.version}-linux${rcversion}/GitHubDesktop-linux-amd64-${finalAttrs.version}-linux${rcversion}.deb"; + hash = "sha256-iflKD7NPuZvhxviNW8xmtCOYgdRz1rXiG42ycWCjXiY="; + }; + "aarch64-linux" = { + url = "https://github.com/shiftkey/desktop/releases/download/release-${finalAttrs.version}-linux${rcversion}/GitHubDesktop-linux-arm64-${finalAttrs.version}-linux${rcversion}.deb"; + hash = "sha256-C9eCvuf/TwXQiYjZ88xSiyaqi8+cppmrLiSYTyQCkmg="; + }; + }; + in + fetchurl urls."${stdenvNoCC.hostPlatform.system}" or (throw "Unsupported system: ${stdenvNoCC.hostPlatform.system}"); nativeBuildInputs = [ autoPatchelfHook