1 { lib, stdenv, makeDesktopItem, fetchurl, unzip
2 , gdk-pixbuf, glib, gtk3, atk, at-spi2-atk, pango, cairo, freetype, fontconfig, dbus, nss, nspr, alsa-lib, cups, expat, udev, gnome
3 , xorg, mozjpeg, makeWrapper, wrapGAppsHook, libuuid, at-spi2-core, libdrm, mesa, libxkbcommon
6 stdenv.mkDerivation rec {
11 url = "https://media.avocode.com/download/avocode-app/${version}/avocode-${version}-linux.zip";
12 sha256 = "sha256-vNQT4jyMIIAk1pV3Hrp40nawFutWCv7xtwg2gU6ejy0=";
15 libPath = lib.makeLibraryPath (with xorg; [
53 desktopItem = makeDesktopItem {
57 desktopName = "Avocode";
58 genericName = "Design Inspector";
59 categories = [ "Development" ];
60 comment = "The bridge between designers and developers";
63 nativeBuildInputs = [makeWrapper wrapGAppsHook unzip];
64 buildInputs = [ gtk3 gnome.adwaita-icon-theme ];
66 # src is producing multiple folder on unzip so we must
67 # override unpackCmd to extract it into newly created folder
74 substituteInPlace avocode.desktop.in \
75 --replace /path/to/avocode-dir/Avocode $out/bin/avocode \
76 --replace /path/to/avocode-dir/avocode.png avocode
78 mkdir -p share/applications share/pixmaps
79 mv avocode.desktop.in share/applications/avocode.desktop
80 mv avocode.png share/pixmaps/
86 ln -s $out/avocode $out/bin/avocode
87 ln -s ${mozjpeg}/bin/cjpeg $out/resources/cjpeg
91 patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/avocode
92 for file in $(find $out -type f \( -perm /0111 -o -name \*.so\* \) ); do
93 patchelf --set-rpath ${libPath}:$out/ $file || true
97 enableParallelBuilding = true;
100 homepage = "https://avocode.com/";
101 description = "The bridge between designers and developers";
102 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
103 license = licenses.unfree;
104 platforms = platforms.linux;
105 maintainers = with maintainers; [ megheaiulian ];