2022-06-16 17:23:12 +00:00
|
|
|
{ lib, stdenv, libXcomposite, libgnome-keyring, makeWrapper, udev, curlWithGnuTls, alsa-lib
|
2021-05-20 23:08:51 +00:00
|
|
|
, libXfixes, atk, gtk3, libXrender, pango, gnome, cairo, freetype, fontconfig
|
2020-04-24 23:36:52 +00:00
|
|
|
, libX11, libXi, libxcb, libXext, libXcursor, glib, libXScrnSaver, libxkbfile, libXtst
|
|
|
|
, nss, nspr, cups, fetchzip, expat, gdk-pixbuf, libXdamage, libXrandr, dbus
|
|
|
|
, makeDesktopItem, openssl, wrapGAppsHook, at-spi2-atk, at-spi2-core, libuuid
|
2022-03-10 19:12:11 +00:00
|
|
|
, e2fsprogs, krb5, libdrm, mesa, unzip, copyDesktopItems, libxshmfence, libxkbcommon
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2021-01-17 00:15:33 +00:00
|
|
|
with lib;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
pname = "gitkraken";
|
2023-04-29 16:46:19 +00:00
|
|
|
version = "9.3.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
throwSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
srcs = {
|
|
|
|
x86_64-linux = fetchzip {
|
|
|
|
url = "https://release.axocdn.com/linux/GitKraken-v${version}.tar.gz";
|
2023-04-29 16:46:19 +00:00
|
|
|
sha256 = "sha256-OX/taX+eYHPWTNNGfZhoiBEG8pFSnjCaTshM+z6MhDU=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
x86_64-darwin = fetchzip {
|
|
|
|
url = "https://release.axocdn.com/darwin/GitKraken-v${version}.zip";
|
2023-04-29 16:46:19 +00:00
|
|
|
sha256 = "sha256-miUcV35HX73b5YnwMnkqYdQtxfSHJaMdMcgVVBkZs6A=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-03-10 19:12:11 +00:00
|
|
|
aarch64-darwin = fetchzip {
|
|
|
|
url = "https://release.axocdn.com/darwin-arm64/GitKraken-v${version}.zip";
|
2023-04-29 16:46:19 +00:00
|
|
|
sha256 = "sha256-yAwvuwxtGQh7/bV/7wShdCVHgZCtRCfmXrdT4dI6+cM=";
|
2022-03-10 19:12:11 +00:00
|
|
|
};
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
src = srcs.${stdenv.hostPlatform.system} or throwSystem;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://www.gitkraken.com/";
|
|
|
|
description = "The downright luxurious and most popular Git client for Windows, Mac & Linux";
|
2022-06-26 10:26:21 +00:00
|
|
|
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.unfree;
|
2021-12-06 16:07:01 +00:00
|
|
|
platforms = builtins.attrNames srcs;
|
|
|
|
maintainers = with maintainers; [ xnwdd evanjs arkivm ];
|
|
|
|
};
|
|
|
|
|
|
|
|
linux = stdenv.mkDerivation rec {
|
|
|
|
inherit pname version src meta;
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
dontConfigure = true;
|
|
|
|
|
|
|
|
libPath = makeLibraryPath [
|
|
|
|
stdenv.cc.cc.lib
|
|
|
|
curlWithGnuTls
|
|
|
|
udev
|
|
|
|
libX11
|
|
|
|
libXext
|
|
|
|
libXcursor
|
|
|
|
libXi
|
|
|
|
libxcb
|
|
|
|
glib
|
|
|
|
libXScrnSaver
|
|
|
|
libxkbfile
|
|
|
|
libXtst
|
|
|
|
nss
|
|
|
|
nspr
|
|
|
|
cups
|
|
|
|
alsa-lib
|
|
|
|
expat
|
|
|
|
gdk-pixbuf
|
|
|
|
dbus
|
|
|
|
libXdamage
|
|
|
|
libXrandr
|
|
|
|
atk
|
|
|
|
pango
|
|
|
|
cairo
|
|
|
|
freetype
|
|
|
|
fontconfig
|
|
|
|
libXcomposite
|
|
|
|
libXfixes
|
|
|
|
libXrender
|
|
|
|
gtk3
|
|
|
|
libgnome-keyring
|
|
|
|
openssl
|
|
|
|
at-spi2-atk
|
|
|
|
at-spi2-core
|
|
|
|
libuuid
|
|
|
|
e2fsprogs
|
|
|
|
krb5
|
|
|
|
libdrm
|
|
|
|
mesa
|
2022-03-10 19:12:11 +00:00
|
|
|
libxshmfence
|
|
|
|
libxkbcommon
|
2021-12-06 16:07:01 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
desktopItems = [ (makeDesktopItem {
|
|
|
|
name = pname;
|
|
|
|
exec = pname;
|
|
|
|
icon = pname;
|
|
|
|
desktopName = "GitKraken";
|
|
|
|
genericName = "Git Client";
|
2022-03-05 16:20:37 +00:00
|
|
|
categories = [ "Development" ];
|
2021-12-06 16:07:01 +00:00
|
|
|
comment = "Graphical Git client from Axosoft";
|
|
|
|
}) ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ copyDesktopItems makeWrapper wrapGAppsHook ];
|
|
|
|
buildInputs = [ gtk3 gnome.adwaita-icon-theme ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p $out/share/${pname}/
|
|
|
|
cp -R $src/* $out/share/${pname}
|
|
|
|
|
|
|
|
mkdir -p $out/bin
|
|
|
|
ln -s $out/share/${pname}/${pname} $out/bin/
|
|
|
|
|
|
|
|
mkdir -p $out/share/pixmaps
|
|
|
|
cp ${pname}.png $out/share/pixmaps/${pname}.png
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
pushd $out/share/${pname}
|
2023-02-02 18:25:31 +00:00
|
|
|
for file in ${pname} chrome-sandbox chrome_crashpad_handler; do
|
|
|
|
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $file
|
|
|
|
done
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
for file in $(find . -type f \( -name \*.node -o -name ${pname} -o -name \*.so\* \) ); do
|
|
|
|
patchelf --set-rpath ${libPath}:$out/share/${pname} $file || true
|
|
|
|
done
|
|
|
|
popd
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
darwin = stdenv.mkDerivation {
|
|
|
|
inherit pname version src meta;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ unzip ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/Applications/GitKraken.app
|
|
|
|
cp -R . $out/Applications/GitKraken.app
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2021-12-06 16:07:01 +00:00
|
|
|
in
|
|
|
|
if stdenv.isDarwin
|
|
|
|
then darwin
|
|
|
|
else linux
|