diff options
Diffstat (limited to 'pkgs/applications/version-management/gitkraken/default.nix')
-rw-r--r-- | pkgs/applications/version-management/gitkraken/default.nix | 140 |
1 files changed, 106 insertions, 34 deletions
diff --git a/pkgs/applications/version-management/gitkraken/default.nix b/pkgs/applications/version-management/gitkraken/default.nix index 70bd9ab46c4f6..e6dec35a4a5d4 100644 --- a/pkgs/applications/version-management/gitkraken/default.nix +++ b/pkgs/applications/version-management/gitkraken/default.nix @@ -1,56 +1,112 @@ -{ lib, stdenv, libXcomposite, libgnome-keyring, makeWrapper, udev, curlWithGnuTls, alsa-lib -, libXfixes, atk, gtk3, libXrender, pango, adwaita-icon-theme, cairo, freetype, fontconfig -, libX11, libXi, libxcb, libXext, libXcursor, glib, libXScrnSaver, libxkbfile, libXtst -, nss, nspr, cups, fetchzip, expat, gdk-pixbuf, libXdamage, libXrandr, dbus -, makeDesktopItem, openssl, wrapGAppsHook3, makeShellWrapper, at-spi2-atk, at-spi2-core, libuuid -, e2fsprogs, krb5, libdrm, mesa, unzip, copyDesktopItems, libxshmfence, libxkbcommon, git -, libGL, zlib, cacert +{ + lib, + stdenv, + libXcomposite, + libgnome-keyring, + makeWrapper, + udev, + curlWithGnuTls, + alsa-lib, + libXfixes, + atk, + gtk3, + libXrender, + pango, + adwaita-icon-theme, + cairo, + freetype, + fontconfig, + libX11, + libXi, + libxcb, + libXext, + libXcursor, + glib, + libXScrnSaver, + libxkbfile, + libXtst, + nss, + nspr, + cups, + fetchzip, + expat, + gdk-pixbuf, + libXdamage, + libXrandr, + dbus, + makeDesktopItem, + openssl, + wrapGAppsHook3, + buildPackages, + at-spi2-atk, + at-spi2-core, + libuuid, + e2fsprogs, + krb5, + libdrm, + mesa, + unzip, + copyDesktopItems, + libxshmfence, + libxkbcommon, + git, + libGL, + zlib, + cacert, }: -with lib; - let pname = "gitkraken"; - version = "10.0.2"; + version = "10.4.0"; throwSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}"; srcs = { x86_64-linux = fetchzip { url = "https://release.axocdn.com/linux/GitKraken-v${version}.tar.gz"; - hash = "sha256-vqB+2W4c9ObmC5IfBy8oZQToURh4GYms6mzQeZeKJZU="; + hash = "sha256-JGWDOAkJEnhvUyQOFsmoeW9Izj0IuHNpYGlYAMiWPj0="; }; x86_64-darwin = fetchzip { url = "https://release.axocdn.com/darwin/GitKraken-v${version}.zip"; - hash = "sha256-60WB5P8rwnUFOhe9BW1sPyweuvwcXswoUUBo6V1VCxQ="; + hash = "sha256-yCDE6QJMgU2Mgr/kUDnbKwQ3MpgVcdjAK7fnTAjSL54="; }; aarch64-darwin = fetchzip { url = "https://release.axocdn.com/darwin-arm64/GitKraken-v${version}.zip"; - hash = "sha256-XL5GWs+jhuUEiPlHQZ6MIfvDjhislBTCg+KssnB4s6g="; + hash = "sha256-nh+tO++QvPx9jyZuxNrH7rHFXZqVnu5jyiki3oWdw7E="; }; }; src = srcs.${stdenv.hostPlatform.system} or throwSystem; - meta = { + meta = with lib; { homepage = "https://www.gitkraken.com/git-client"; description = "Simplifying Git for any OS"; sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; license = licenses.unfree; platforms = builtins.attrNames srcs; - maintainers = with maintainers; [ xnwdd evanjs arkivm nicolas-goudry ]; + maintainers = with maintainers; [ + xnwdd + evanjs + arkivm + nicolas-goudry + ]; mainProgram = "gitkraken"; }; linux = stdenv.mkDerivation rec { - inherit pname version src meta; + inherit + pname + version + src + meta + ; dontBuild = true; dontConfigure = true; - libPath = makeLibraryPath [ + libPath = lib.makeLibraryPath [ stdenv.cc.cc.lib curlWithGnuTls udev @@ -96,18 +152,28 @@ let zlib ]; - desktopItems = [ (makeDesktopItem { - name = "GitKraken Desktop"; - exec = "gitkraken"; - icon = "gitkraken"; - desktopName = "GitKraken Desktop"; - genericName = "Git Client"; - categories = [ "Development" ]; - comment = "Unleash your repo"; - }) ]; + desktopItems = [ + (makeDesktopItem { + name = "GitKraken Desktop"; + exec = "gitkraken"; + icon = "gitkraken"; + desktopName = "GitKraken Desktop"; + genericName = "Git Client"; + categories = [ "Development" ]; + comment = "Unleash your repo"; + }) + ]; - nativeBuildInputs = [ copyDesktopItems (wrapGAppsHook3.override { makeWrapper = makeShellWrapper; }) ]; - buildInputs = [ gtk3 adwaita-icon-theme ]; + nativeBuildInputs = [ + copyDesktopItems + # override doesn't preserve splicing https://github.com/NixOS/nixpkgs/issues/132651 + # 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. + (buildPackages.wrapGAppsHook3.override { makeWrapper = buildPackages.makeShellWrapper; }) + ]; + buildInputs = [ + gtk3 + adwaita-icon-theme + ]; # avoid double-wrapping dontWrapGApps = true; @@ -159,9 +225,17 @@ let }; darwin = stdenv.mkDerivation { - inherit pname version src meta; - - nativeBuildInputs = [ unzip makeWrapper ]; + inherit + pname + version + src + meta + ; + + nativeBuildInputs = [ + unzip + makeWrapper + ]; installPhase = '' runHook preInstall @@ -177,6 +251,4 @@ let dontFixup = true; }; in -if stdenv.isDarwin -then darwin -else linux +if stdenv.hostPlatform.isDarwin then darwin else linux |