1 { stdenv, fetchurl, lib, makeWrapper, wrapGAppsHook3,
3 alsa-lib, atk, at-spi2-atk, at-spi2-core, cairo, cups, dbus, expat, fontconfig,
4 freetype, gdk-pixbuf, glib, glibc, gtk3, libuuid, nspr, nss, pango,
44 in stdenv.mkDerivation rec {
49 url = "http://pencil.evolus.vn/dl/V${version}.ga/pencil_${version}.ga_amd64.deb";
50 sha256 = "01ae54b1a1351b909eb2366c6ec00816e1deba370e58f35601cf7368f10aaba3";
56 ar p "$src" data.tar.gz | tar xz
61 nativeBuildInputs = [ makeWrapper wrapGAppsHook3 ];
66 mkdir -p $out/bin $out/opt $out/share/applications
68 cp -R opt/pencil*/ $out/opt/pencil
69 cp $out/opt/pencil/pencil.desktop $out/share/applications/
71 # fix the path in the desktop file
73 $out/share/applications/pencil.desktop \
74 --replace /opt/ $out/opt/
76 # symlink the binary to bin/
77 ln -s $out/opt/pencil/pencil $out/bin/pencil
83 libPathNative = lib.makeLibraryPath packages;
84 libPath64 = lib.makeSearchPathOutput "lib" "lib64" packages;
85 libPath = "${libPathNative}:${libPath64}";
89 --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
90 --set-rpath "${libPath}:$out/opt/pencil" \
91 $out/opt/pencil/pencil
94 ln -s ${lib.getLib systemd}/lib/libudev.so.1 $out/opt/pencil/libudev.so.1
95 wrapProgram $out/opt/pencil/pencil \
96 --prefix LD_LIBRARY_PATH : $out/opt/pencil
100 description = "GUI prototyping/mockup tool";
101 mainProgram = "pencil";
102 homepage = "https://pencil.evolus.vn/";
103 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
104 license = licenses.gpl2; # Commercial license is also available
105 maintainers = with maintainers; [ bjornfor prikhi mrVanDalo ];
106 platforms = platforms.linux;