nixpkgs/pkgs/applications/graphics/pencil/default.nix
2015-04-09 03:54:13 -04:00

32 lines
1 KiB
Nix

{ stdenv, fetchurl, xulrunner }:
stdenv.mkDerivation rec {
version = "2.0.9";
name = "pencil-${version}";
src = fetchurl {
url = "https://github.com/prikhi/pencil/releases/download/v${version}/Pencil-${version}-linux-pkg.tar.gz";
sha256 = "a109d28a695919d2da979de6a6d0baeb4e2820ff795aecd75ba08322f21ed3ee";
};
buildPhase = "";
installPhase = ''
mkdir -p "$out"
cp -r usr/* "$out"
sed -e "s|/usr/bin/xulrunner|${xulrunner}/bin/xulrunner|" \
-e "s|/usr/share/evolus-pencil|$out/share/evolus-pencil|" \
-i "$out/bin/pencil"
sed -e "s|/usr/bin/pencil|$out/bin/pencil|" \
-e "s|Icon=.*|Icon=$out/share/evolus-pencil/skin/classic/icon.svg|" \
-i "$out/share/applications/pencil.desktop"
'';
meta = with stdenv.lib; {
description = "GUI prototyping/mockup tool";
homepage = http://github.com/prikhi/pencil;
license = licenses.gpl2; # Commercial license is also available
maintainers = with maintainers; [ bjornfor prikhi ];
platforms = platforms.linux;
};
}