mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-13 01:03:25 +00:00
eb04659fc2
This was achieved using the following command: sd 'wrapGAppsHook\b' wrapGAppsHook3 (rg -l 'wrapGAppsHook\b') And then manually reverted the following changes: - alias in top-level.nix - function name in wrap-gapps-hook.sh - comment in postFixup of at-spi2-core - comment in gtk4 - comment in preFixup of 1password-gui/linux.nix - comment in postFixup of qgis/unwrapped-ltr.nix and qgis/unwrapped.nix - comment in postFixup of telegram-desktop - comment in postFixup of fwupd - buildCommand of mongodb-compass - postFixup of xflux-gui - comment in a patch in kdePackages.kde-gtk-config and plasma5Packages.kde-gtk-config - description of programs.sway.wrapperFeatures.gtk NixOS option (manual rebuild)
102 lines
2.4 KiB
Nix
102 lines
2.4 KiB
Nix
{ stdenvNoCC
|
|
, lib
|
|
, fetchurl
|
|
, autoPatchelfHook
|
|
, wrapGAppsHook3
|
|
, makeWrapper
|
|
, gnome
|
|
, libsecret
|
|
, git
|
|
, curl
|
|
, nss
|
|
, nspr
|
|
, xorg
|
|
, libdrm
|
|
, alsa-lib
|
|
, cups
|
|
, mesa
|
|
, systemd
|
|
, openssl
|
|
}:
|
|
|
|
let
|
|
rcversion = "2";
|
|
in
|
|
stdenvNoCC.mkDerivation (finalAttrs: {
|
|
pname = "github-desktop";
|
|
version = "3.3.12";
|
|
|
|
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
|
|
(wrapGAppsHook3.override { inherit makeWrapper; })
|
|
];
|
|
|
|
buildInputs = [
|
|
gnome.gnome-keyring
|
|
xorg.libXdamage
|
|
xorg.libX11
|
|
libsecret
|
|
git
|
|
curl
|
|
nss
|
|
nspr
|
|
libdrm
|
|
alsa-lib
|
|
cups
|
|
mesa
|
|
openssl
|
|
];
|
|
|
|
unpackPhase = ''
|
|
runHook preUnpack
|
|
mkdir -p $TMP/github-desktop $out/{opt,bin}
|
|
cp $src $TMP/github-desktop.deb
|
|
ar vx github-desktop.deb
|
|
tar --no-overwrite-dir -xvf data.tar.xz -C $TMP/github-desktop/
|
|
runHook postUnpack
|
|
'';
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
cp -R $TMP/github-desktop/usr/share $out/
|
|
cp -R $TMP/github-desktop/usr/lib/github-desktop/* $out/opt/
|
|
ln -sf $out/opt/github-desktop $out/bin/github-desktop
|
|
runHook postInstall
|
|
'';
|
|
|
|
preFixup = ''
|
|
gappsWrapperArgs+=(
|
|
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform=wayland}}"
|
|
)
|
|
'';
|
|
|
|
runtimeDependencies = [
|
|
(lib.getLib systemd)
|
|
];
|
|
|
|
meta = {
|
|
description = "GUI for managing Git and GitHub.";
|
|
homepage = "https://desktop.github.com/";
|
|
license = lib.licenses.mit;
|
|
mainProgram = "github-desktop";
|
|
maintainers = with lib.maintainers; [ dan4ik605743 ];
|
|
platforms = lib.platforms.linux;
|
|
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
|
};
|
|
})
|