2017-03-25 12:51:36 +01:00
|
|
|
{ stdenv, lib, libXcomposite, libgnome_keyring, makeWrapper, udev, curl, alsaLib
|
|
|
|
, libXfixes, atk, gtk2, libXrender, pango, gnome2, cairo, freetype, fontconfig
|
|
|
|
, libX11, libXi, libXext, libXcursor, glib, libXScrnSaver, libxkbfile, libXtst
|
|
|
|
, 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;
|
|
|
|
|
2017-03-05 16:38:55 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "gitkraken-${version}";
|
2017-07-22 23:29:35 +02:00
|
|
|
version = "2.7.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";
|
2017-07-22 23:29:35 +02:00
|
|
|
sha256 = "0088vdn47563f0v9zhk1vggn3c2cfg8rhmifc6nw4zbss49si5gp";
|
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
|
|
|
|
curl
|
|
|
|
udev
|
|
|
|
libX11
|
|
|
|
libXext
|
|
|
|
libXcursor
|
|
|
|
libXi
|
|
|
|
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
|
|
|
|
libgnome_keyring
|
|
|
|
];
|
|
|
|
|
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 ];
|
|
|
|
|
|
|
|
unpackPhase = "dpkg-deb -x $src .";
|
|
|
|
|
2017-03-05 16:38:55 +01:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p "$out/opt/gitkraken"
|
2017-04-01 23:25:34 +02:00
|
|
|
cp -r usr/share/gitkraken/* "$out/opt/gitkraken"
|
|
|
|
|
|
|
|
mkdir -p "$out/share/applications"
|
|
|
|
cp $desktopItem/share/applications/* "$out/share/applications"
|
|
|
|
|
|
|
|
mkdir -p "$out/share/pixmaps"
|
|
|
|
cp usr/share/pixmaps/app.png "$out/share/pixmaps"
|
2017-03-25 12:51:36 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
2017-03-05 16:38:55 +01:00
|
|
|
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
|
|
|
|
--set-rpath "$libPath:$out/opt/gitkraken" "$out/opt/gitkraken/gitkraken"
|
|
|
|
wrapProgram $out/opt/gitkraken/gitkraken \
|
2017-03-24 22:01:41 +01:00
|
|
|
--prefix LD_PRELOAD : "${makeLibraryPath [ curl ]}/libcurl.so.4" \
|
|
|
|
--prefix LD_PRELOAD : "${makeLibraryPath [ libgnome_keyring ]}/libgnome-keyring.so.0"
|
2017-03-05 16:38:55 +01:00
|
|
|
mkdir "$out/bin"
|
|
|
|
ln -s "$out/opt/gitkraken/gitkraken" "$out/bin/gitkraken"
|
|
|
|
'';
|
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|