From 7c9bd98e863ac924809e0b3e7714edc25db79ae2 Mon Sep 17 00:00:00 2001 From: Evan Stoll Date: Fri, 31 Jan 2020 14:23:08 -0500 Subject: [PATCH] gitkraken: 6.4.1 -> 6.5.1 - use fetchzip to retrieve the tarball for GitKraken, as the deb now tries to change permissions and etc which nix will not like - add at-spi2-core dependency - remove dpkg dependency - refactor expression to properly handle the GitKraken tarball (compared to the deb archive) --- .../version-management/gitkraken/default.nix | 46 ++++++++++--------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/pkgs/applications/version-management/gitkraken/default.nix b/pkgs/applications/version-management/gitkraken/default.nix index 2272e66faf58..73d376396a66 100644 --- a/pkgs/applications/version-management/gitkraken/default.nix +++ b/pkgs/applications/version-management/gitkraken/default.nix @@ -1,8 +1,8 @@ { stdenv, libXcomposite, libgnome-keyring, makeWrapper, udev, curl, alsaLib , libXfixes, atk, gtk3, libXrender, pango, gnome3, cairo, freetype, fontconfig , libX11, libXi, libxcb, libXext, libXcursor, glib, libXScrnSaver, libxkbfile, libXtst -, nss, nspr, cups, fetchurl, expat, gdk-pixbuf, libXdamage, libXrandr, dbus -, dpkg, makeDesktopItem, openssl, wrapGAppsHook, at-spi2-atk, libuuid +, nss, nspr, cups, fetchzip, expat, gdk-pixbuf, libXdamage, libXrandr, dbus +, makeDesktopItem, openssl, wrapGAppsHook, at-spi2-atk, at-spi2-core, libuuid , e2fsprogs, krb5 }: @@ -13,13 +13,16 @@ let in stdenv.mkDerivation rec { pname = "gitkraken"; - version = "6.4.1"; + version = "6.5.1"; - src = fetchurl { - url = "https://release.axocdn.com/linux/GitKraken-v${version}.deb"; - sha256 = "1w8iwpbr6nwzhhf63fvr7pd66yjx3jgjy4gx5y02qxa3ip5psq5b"; + src = fetchzip { + url = "https://release.axocdn.com/linux/GitKraken-v${version}.tar.gz"; + sha256 = "0dwjwismv4rfw58801g2ay51h9qrffcxgbl910frd4i530w0y44p"; }; + dontBuild = true; + dontConfigure = true; + libPath = makeLibraryPath [ stdenv.cc.cc.lib curlWithGnuTls @@ -54,6 +57,7 @@ stdenv.mkDerivation rec { libgnome-keyring openssl at-spi2-atk + at-spi2-core libuuid e2fsprogs krb5 @@ -69,27 +73,27 @@ stdenv.mkDerivation rec { comment = "Graphical Git client from Axosoft"; }; - nativeBuildInputs = [ dpkg makeWrapper wrapGAppsHook ]; + nativeBuildInputs = [ makeWrapper wrapGAppsHook ]; buildInputs = [ gtk3 gnome3.adwaita-icon-theme ]; - unpackCmd = '' - mkdir out - dpkg -x $curSrc out - ''; - installPhase = '' runHook preInstall - mkdir $out - pushd usr - pushd share - substituteInPlace applications/gitkraken.desktop \ - --replace /usr/share/gitkraken $out/bin - popd - rm -rf bin/gitkraken share/lintian - cp -av share bin $out/ - popd + mkdir -p $out/share/gitkraken/ + cp -R $src/* $out/share/gitkraken/ + + mkdir -p $out/bin 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 '';