From 3ee9b99200bcbdb4e3fa43203ce16a0d7deaf9c9 Mon Sep 17 00:00:00 2001 From: Danil <6057430gu@gmail.com> Date: Thu, 22 Jul 2021 16:59:36 +0700 Subject: [PATCH] github-desktop: init at 2.9.0 (#130774) --- .../github-desktop/default.nix | 73 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 75 insertions(+) create mode 100644 pkgs/applications/version-management/github-desktop/default.nix diff --git a/pkgs/applications/version-management/github-desktop/default.nix b/pkgs/applications/version-management/github-desktop/default.nix new file mode 100644 index 00000000000..650ec73619a --- /dev/null +++ b/pkgs/applications/version-management/github-desktop/default.nix @@ -0,0 +1,73 @@ +{ stdenv +, lib +, fetchurl +, autoPatchelfHook +, wrapGAppsHook +, gnome +, libsecret +, git +, curl +, nss +, nspr +, xorg +, libdrm +, alsa-lib +, cups +, mesa +, systemd +}: + +stdenv.mkDerivation rec { + pname = "github-desktop"; + version = "2.9.0"; + + src = fetchurl { + url = "https://github.com/shiftkey/desktop/releases/download/release-${version}-linux4/GitHubDesktop-linux-${version}-linux4.deb"; + sha256 = "sha256-kyzvvzSCfo6uaTA0Z1yqAUjr4A5p3OuIpaVQv64WW7M"; + }; + + nativeBuildInputs = [ + autoPatchelfHook + wrapGAppsHook + ]; + + buildInputs = [ + gnome.gnome-keyring + xorg.libXdamage + xorg.libX11 + libsecret + git + curl + nss + nspr + libdrm + alsa-lib + cups + mesa + ]; + + unpackPhase = '' + mkdir -p $TMP/${pname} $out/{opt,bin} + cp $src $TMP/${pname}.deb + ar vx ${pname}.deb + tar --no-overwrite-dir -xvf data.tar.xz -C $TMP/${pname}/ + ''; + + installPhase = '' + cp -R $TMP/${pname}/usr/share $out/ + cp -R $TMP/${pname}/usr/lib/${pname}/* $out/opt/ + ln -sf $out/opt/${pname} $out/bin/${pname} + ''; + + runtimeDependencies = [ + (lib.getLib systemd) + ]; + + meta = with lib; { + description = "GUI for managing Git and GitHub."; + homepage = "https://desktop.github.com/"; + license = licenses.mit; + maintainers = with maintainers; [ dan4ik605743 ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c76aeba5fcc..c15ef4e4414 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1562,6 +1562,8 @@ in github-commenter = callPackage ../development/tools/github-commenter { }; + github-desktop = callPackage ../applications/version-management/github-desktop { }; + github-to-sqlite = with python3Packages; toPythonApplication github-to-sqlite; gitless = callPackage ../applications/version-management/gitless { python = python3; };