2018-02-25 03:23:58 +01:00
|
|
|
{ stdenv, lib, libXcomposite, libgnome-keyring, makeWrapper, udev, curl, alsaLib
|
2017-03-25 12:51:36 +01:00
|
|
|
, libXfixes, atk, gtk2, libXrender, pango, gnome2, cairo, freetype, fontconfig
|
2018-03-01 20:05:20 +01:00
|
|
|
, libX11, libXi, libxcb, libXext, libXcursor, glib, libXScrnSaver, libxkbfile, libXtst
|
2017-03-25 12:51:36 +01:00
|
|
|
, nss, nspr, cups, fetchurl, expat, gdk_pixbuf, libXdamage, libXrandr, dbus
|
2017-04-01 23:25:34 +02:00
|
|
|
, dpkg, makeDesktopItem
|
2017-03-05 16:38:55 +01:00
|
|
|
}:
|
|
|
|
|
2017-03-24 22:01:41 +01:00
|
|
|
with stdenv.lib;
|
|
|
|
|
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 {
|
|
|
|
name = "gitkraken-${version}";
|
2018-05-04 22:59:46 +02:00
|
|
|
version = "3.6.0";
|
2017-03-05 16:38:55 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-04-01 23:25:34 +02:00
|
|
|
url = "https://release.gitkraken.com/linux/v${version}.deb";
|
2018-05-04 22:59:46 +02:00
|
|
|
sha256 = "0zrxw7rrlspm3ic847dy1ly4rlcdkizdr6m8nycmrxg4s98yxkb8";
|
2017-03-05 16:38:55 +01:00
|
|
|
};
|
|
|
|
|
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
|
|
|
|
gdk_pixbuf
|
|
|
|
dbus
|
|
|
|
libXdamage
|
|
|
|
libXrandr
|
|
|
|
atk
|
|
|
|
pango
|
|
|
|
cairo
|
|
|
|
freetype
|
|
|
|
fontconfig
|
|
|
|
libXcomposite
|
|
|
|
libXfixes
|
|
|
|
libXrender
|
|
|
|
gtk2
|
|
|
|
gnome2.GConf
|
2018-02-25 03:23:58 +01:00
|
|
|
libgnome-keyring
|
2017-03-05 16:38:55 +01:00
|
|
|
];
|
|
|
|
|
2017-03-25 12:51:36 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2017-03-05 16:38:55 +01:00
|
|
|
|
2017-03-25 12:51:36 +01:00
|
|
|
dontBuild = true;
|
2017-03-05 16:38:55 +01:00
|
|
|
|
2017-04-01 23:25:34 +02:00
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
name = "gitkraken";
|
|
|
|
exec = "gitkraken";
|
|
|
|
icon = "app";
|
|
|
|
desktopName = "GitKraken";
|
|
|
|
genericName = "Git Client";
|
|
|
|
categories = "Application;Development;";
|
|
|
|
comment = "Graphical Git client from Axosoft";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ dpkg ];
|
|
|
|
|
2018-03-01 20:05:20 +01:00
|
|
|
unpackPhase = "true";
|
|
|
|
buildCommand = ''
|
|
|
|
mkdir -p $out
|
|
|
|
dpkg -x $src $out
|
|
|
|
substituteInPlace $out/usr/share/applications/gitkraken.desktop \
|
|
|
|
--replace /usr/share/gitkraken $out/bin
|
|
|
|
cp -av $out/usr/* $out
|
|
|
|
rm -rf $out/etc $out/usr $out/share/lintian
|
|
|
|
chmod -R g-w $out
|
2017-04-01 23:25:34 +02:00
|
|
|
|
2018-03-01 20:05:20 +01:00
|
|
|
for file in $(find $out -type f \( -perm /0111 -o -name \*.so\* \) ); do
|
|
|
|
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$file" || true
|
|
|
|
patchelf --set-rpath ${libPath}:$out/share/gitkraken $file || true
|
|
|
|
done
|
2017-04-01 23:25:34 +02:00
|
|
|
|
2018-03-01 20:05:20 +01:00
|
|
|
find $out/share/gitkraken -name "*.node" -exec patchelf --set-rpath "${libPath}:$out/share/gitkraken" {} \;
|
2017-04-01 23:25:34 +02:00
|
|
|
|
2018-05-04 22:59:46 +02:00
|
|
|
mkdir $out/bin
|
2018-03-01 20:05:20 +01:00
|
|
|
ln -s $out/share/gitkraken/gitkraken $out/bin/gitkraken
|
2017-03-05 16:38:55 +01:00
|
|
|
'';
|
|
|
|
|
2017-03-24 22:01:41 +01:00
|
|
|
meta = {
|
2017-03-05 16:38:55 +01:00
|
|
|
homepage = https://www.gitkraken.com/;
|
|
|
|
description = "The downright luxurious and most popular Git client for Windows, Mac & Linux";
|
|
|
|
license = licenses.unfree;
|
|
|
|
platforms = platforms.linux;
|
2017-03-09 23:09:06 +01:00
|
|
|
maintainers = with maintainers; [ xnwdd ];
|
2017-03-05 16:38:55 +01:00
|
|
|
};
|
|
|
|
}
|