gitkraken: 3.6.0 -> 3.6.1 (#41130)

This commit is contained in:
Meghea Iulian 2018-06-01 00:04:50 +03:00 committed by xeji
parent aee19ca7f8
commit e4ba5dc3d6

View File

@ -12,11 +12,11 @@ let
in
stdenv.mkDerivation rec {
name = "gitkraken-${version}";
version = "3.6.0";
version = "3.6.1";
src = fetchurl {
url = "https://release.gitkraken.com/linux/v${version}.deb";
sha256 = "0zrxw7rrlspm3ic847dy1ly4rlcdkizdr6m8nycmrxg4s98yxkb8";
sha256 = "1f77y281r3dp35vw3zdai2cgwwy2gpg7px6g66ylfz4gkig26dz8";
};
libPath = makeLibraryPath [
@ -54,41 +54,47 @@ stdenv.mkDerivation rec {
libgnome-keyring
];
nativeBuildInputs = [ makeWrapper ];
dontBuild = true;
desktopItem = makeDesktopItem {
name = "gitkraken";
exec = "gitkraken";
icon = "app";
icon = "gitkraken";
desktopName = "GitKraken";
genericName = "Git Client";
categories = "Application;Development;";
comment = "Graphical Git client from Axosoft";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ dpkg ];
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
unpackCmd = ''
mkdir out
dpkg -x $curSrc out
'';
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
installPhase = ''
mkdir $out
pushd usr
pushd share
substituteInPlace applications/gitkraken.desktop \
--replace /usr/share/gitkraken $out/bin \
--replace Icon=app Icon=gitkraken
mv pixmaps/app.png pixmaps/gitkraken.png
popd
rm -rf bin/gitkraken share/lintian
cp -av share bin $out/
popd
ln -s $out/share/gitkraken/gitkraken $out/bin/gitkraken
'';
postFixup = ''
pushd $out/share/gitkraken
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" gitkraken
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
find $out/share/gitkraken -name "*.node" -exec patchelf --set-rpath "${libPath}:$out/share/gitkraken" {} \;
mkdir $out/bin
ln -s $out/share/gitkraken/gitkraken $out/bin/gitkraken
popd
'';
meta = {