25 stdenvNoCC.mkDerivation (finalAttrs: {
26 pname = "github-desktop";
33 url = "https://github.com/shiftkey/desktop/releases/download/release-${finalAttrs.version}-linux${rcversion}/GitHubDesktop-linux-amd64-${finalAttrs.version}-linux${rcversion}.deb";
34 hash = "sha256-qY5rCvOgf1/Z00XZ6yAn6zKdUZ+6l4PCthPU44XLKhc=";
37 url = "https://github.com/shiftkey/desktop/releases/download/release-${finalAttrs.version}-linux${rcversion}/GitHubDesktop-linux-arm64-${finalAttrs.version}-linux${rcversion}.deb";
38 hash = "sha256-VbPjTz4xYGaVO3uOG6lQNQrVEmx3+H/+y8+r0O55aUg=";
42 fetchurl urls."${stdenvNoCC.hostPlatform.system}" or (throw "Unsupported system: ${stdenvNoCC.hostPlatform.system}");
46 # override doesn't preserve splicing https://github.com/NixOS/nixpkgs/issues/132651
47 # Has to use `makeShellWrapper` from `buildPackages` even though `makeShellWrapper` from the inputs is spliced because `propagatedBuildInputs` would pick the wrong one because of a different offset.
48 (buildPackages.wrapGAppsHook3.override { makeWrapper = buildPackages.makeShellWrapper; })
69 mkdir -p $TMP/github-desktop $out/{opt,bin}
70 cp $src $TMP/github-desktop.deb
71 ar vx github-desktop.deb
72 tar --no-overwrite-dir -xvf data.tar.xz -C $TMP/github-desktop/
78 cp -R $TMP/github-desktop/usr/share $out/
79 cp -R $TMP/github-desktop/usr/lib/github-desktop/* $out/opt/
80 ln -sf $out/opt/github-desktop $out/bin/github-desktop
86 --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform=wayland}}"
87 --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libglvnd ]}
91 runtimeDependencies = [
96 description = "GUI for managing Git and GitHub";
97 homepage = "https://desktop.github.com/";
98 license = lib.licenses.mit;
99 mainProgram = "github-desktop";
100 maintainers = with lib.maintainers; [ dan4ik605743 ];
101 platforms = lib.platforms.linux;
102 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];