2021-06-28 23:13:55 +00:00
|
|
|
{ lib, stdenv, libXcomposite, libgnome-keyring, makeWrapper, udev, curl, 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
|
2021-12-06 16:07:01 +00:00
|
|
|
, e2fsprogs, krb5, libdrm, mesa, unzip, copyDesktopItems
|
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
|
2021-12-06 16:07:01 +00:00
|
|
|
curlWithGnuTls = curl.override { gnutlsSupport = true; opensslSupport = false; };
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "gitkraken";
|
2021-12-24 04:21:11 +00:00
|
|
|
version = "8.2.1";
|
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";
|
2021-12-24 04:21:11 +00:00
|
|
|
sha256 = "sha256-FjG7htwMRLZmwH6OjjyHkGUTaVNzuMTn6BjXUnCgwAA=";
|
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";
|
2021-12-24 04:21:11 +00:00
|
|
|
sha256 = "sha256-cBZ53lekhPl5yjxclg2PeMCL0NKwshkKhP/lFbEinCs=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
aarch64-darwin = srcs.x86_64-darwin;
|
|
|
|
};
|
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";
|
|
|
|
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
|
|
|
|
];
|
|
|
|
|
|
|
|
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}
|
|
|
|
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" ${pname}
|
|
|
|
|
|
|
|
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
|