nixpkgs-suyu/pkgs/applications/version-management/gitkraken/default.nix

120 lines
2.8 KiB
Nix
Raw Normal View History

2021-01-15 14:21:58 +01:00
{ lib, stdenv, libXcomposite, libgnome-keyring, makeWrapper, udev, curl, alsaLib
2019-08-18 04:01:37 +02:00
, libXfixes, atk, gtk3, libXrender, pango, gnome3, cairo, freetype, fontconfig
2018-03-01 20:05:20 +01: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
, e2fsprogs, krb5, libdrm, mesa
2017-03-05 16:38:55 +01:00
}:
2021-01-15 14:21:58 +01:00
with lib;
2017-03-24 22:01:41 +01:00
2018-03-12 18:34:46 +01:00
let
curlWithGnuTls = curl.override { gnutlsSupport = true; sslSupport = false; };
in
2017-03-05 16:38:55 +01:00
stdenv.mkDerivation rec {
pname = "gitkraken";
2020-12-02 06:08:36 +01:00
version = "7.4.1";
2017-03-05 16:38:55 +01:00
src = fetchzip {
url = "https://release.axocdn.com/linux/GitKraken-v${version}.tar.gz";
2020-12-02 06:08:36 +01:00
sha256 = "1c9cyxx5sqvnilf6xp3ildq3lwl6mj8v1vl0wzyjpaiqky99lj9p";
2017-03-05 16:38:55 +01:00
};
dontBuild = true;
dontConfigure = true;
2017-03-24 22:01:41 +01:00
libPath = makeLibraryPath [
2017-03-05 16:38:55 +01:00
stdenv.cc.cc.lib
2018-03-12 18:34:46 +01:00
curlWithGnuTls
2017-03-05 16:38:55 +01:00
udev
libX11
libXext
libXcursor
libXi
2018-03-01 20:05:20 +01:00
libxcb
2017-03-05 16:38:55 +01:00
glib
libXScrnSaver
libxkbfile
libXtst
nss
nspr
cups
alsaLib
expat
2019-05-22 13:03:39 +02:00
gdk-pixbuf
2017-03-05 16:38:55 +01:00
dbus
libXdamage
libXrandr
atk
pango
cairo
freetype
fontconfig
libXcomposite
libXfixes
libXrender
2019-01-01 20:30:56 +01:00
gtk3
libgnome-keyring
2019-01-01 20:30:56 +01:00
openssl
2019-06-20 06:52:02 +02:00
at-spi2-atk
at-spi2-core
libuuid
e2fsprogs
krb5
libdrm
mesa
2017-03-05 16:38:55 +01:00
];
desktopItem = makeDesktopItem {
name = "gitkraken";
exec = "gitkraken";
2018-05-31 23:04:50 +02:00
icon = "gitkraken";
desktopName = "GitKraken";
genericName = "Git Client";
categories = "Development;";
comment = "Graphical Git client from Axosoft";
};
nativeBuildInputs = [ makeWrapper wrapGAppsHook ];
buildInputs = [ gtk3 gnome3.adwaita-icon-theme ];
2018-05-31 23:04:50 +02:00
installPhase = ''
runHook preInstall
mkdir -p $out/share/gitkraken/
cp -R $src/* $out/share/gitkraken/
mkdir -p $out/bin
2019-02-10 18:45:37 +01:00
ln -s $out/share/gitkraken/gitkraken $out/bin/gitkraken
mkdir -p $out/share/applications
cp ${desktopItem}/share/applications/* $out/share/applications/
substituteInPlace $out/share/applications/gitkraken.desktop \
--replace $out/usr/share/gitkraken $out/bin
mkdir -p $out/share/pixmaps
cp gitkraken.png $out/share/pixmaps/gitkraken.png
runHook postInstall
2018-05-31 23:04:50 +02:00
'';
2018-05-31 23:04:50 +02:00
postFixup = ''
pushd $out/share/gitkraken
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" gitkraken
2018-05-31 23:04:50 +02:00
for file in $(find . -type f \( -name \*.node -o -name gitkraken -o -name \*.so\* \) ); do
patchelf --set-rpath ${libPath}:$out/share/gitkraken $file || true
done
popd
2017-03-05 16:38:55 +01:00
'';
2017-03-24 22:01:41 +01:00
meta = {
homepage = "https://www.gitkraken.com/";
2017-03-05 16:38:55 +01:00
description = "The downright luxurious and most popular Git client for Windows, Mac & Linux";
license = licenses.unfree;
platforms = platforms.linux;
2019-08-18 04:04:38 +02:00
maintainers = with maintainers; [ xnwdd evanjs ];
2017-03-05 16:38:55 +01:00
};
}