1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/applications/graphics/avocode/default.nix

103 lines
2.5 KiB
Nix
Raw Normal View History

{ stdenv, makeDesktopItem, fetchurl, unzip
2019-05-22 12:03:39 +01:00
, gdk-pixbuf, glib, gtk3, atk, at-spi2-atk, pango, cairo, freetype, fontconfig, dbus, nss, nspr, alsaLib, cups, expat, udev, gnome3
, xorg, mozjpeg, makeWrapper, wrapGAppsHook, libuuid, at-spi2-core
2018-05-13 15:02:51 +01:00
}:
stdenv.mkDerivation rec {
pname = "avocode";
2020-05-20 08:44:20 +01:00
version = "4.6.3";
2018-05-13 15:02:51 +01:00
src = fetchurl {
url = "https://media.avocode.com/download/avocode-app/${version}/avocode-${version}-linux.zip";
2020-05-20 08:44:20 +01:00
sha256 = "1s8i82963fdx5q4wgh0cn211h0p1r1mzyss0g99bplp8d9ll40kw";
2018-05-13 15:02:51 +01:00
};
2019-02-13 21:47:50 +00:00
libPath = stdenv.lib.makeLibraryPath (with xorg; [
2018-05-13 15:02:51 +01:00
stdenv.cc.cc.lib
at-spi2-core.out
2019-05-22 12:03:39 +01:00
gdk-pixbuf
2018-05-13 15:02:51 +01:00
glib
2018-10-27 09:06:41 +01:00
gtk3
2018-05-13 15:02:51 +01:00
atk
2018-10-27 09:06:41 +01:00
at-spi2-atk
2018-05-13 15:02:51 +01:00
pango
cairo
freetype
fontconfig
dbus
nss
nspr
alsaLib
cups
expat
udev
libX11
libxcb
libXi
libXcursor
libXdamage
libXrandr
libXcomposite
libXext
libXfixes
libXrender
libXtst
libXScrnSaver
2019-03-14 19:52:28 +00:00
libuuid
2018-05-13 15:02:51 +01:00
]);
desktopItem = makeDesktopItem {
name = "Avocode";
exec = "avocode";
icon = "avocode";
desktopName = "Avocode";
genericName = "Design Inspector";
categories = "Application;Development;";
comment = "The bridge between designers and developers";
};
2019-03-14 19:52:28 +00:00
nativeBuildInputs = [makeWrapper wrapGAppsHook];
buildInputs = [ unzip gtk3 gnome3.adwaita-icon-theme ];
2018-05-13 15:02:51 +01:00
# src is producing multiple folder on unzip so we must
# override unpackCmd to extract it into newly created folder
unpackCmd = ''
mkdir out
unzip $curSrc -d out
'';
installPhase = ''
substituteInPlace avocode.desktop.in \
--replace /path/to/avocode-dir/Avocode $out/bin/avocode \
--replace /path/to/avocode-dir/avocode.png avocode
mkdir -p share/applications share/pixmaps
mv avocode.desktop.in share/applications/avocode.desktop
mv avocode.png share/pixmaps/
rm resources/cjpeg
cp -av . $out
mkdir $out/bin
ln -s $out/avocode $out/bin/avocode
ln -s ${mozjpeg}/bin/cjpeg $out/resources/cjpeg
'';
postFixup = ''
2018-05-16 22:43:59 +01:00
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/avocode
2018-05-13 15:02:51 +01:00
for file in $(find $out -type f \( -perm /0111 -o -name \*.so\* \) ); do
2019-03-14 19:52:28 +00:00
patchelf --set-rpath ${libPath}:$out/ $file || true
2018-10-27 09:06:41 +01:00
done
2018-05-13 15:02:51 +01:00
'';
enableParallelBuilding = true;
meta = with stdenv.lib; {
2020-03-04 17:19:28 +00:00
homepage = "https://avocode.com/";
2018-05-13 15:02:51 +01:00
description = "The bridge between designers and developers";
license = licenses.unfree;
platforms = platforms.linux;
maintainers = with maintainers; [ megheaiulian ];
};
}