2010-11-07 22:27:06 +01:00
|
|
|
{stdenv, fetchurl, mono, gtksharp, pkgconfig}:
|
2010-06-16 00:25:38 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2013-04-08 11:52:42 +02:00
|
|
|
name = "pinta-1.4";
|
2010-06-18 10:16:21 +02:00
|
|
|
|
2010-11-07 22:27:06 +01:00
|
|
|
src = fetchurl {
|
2013-04-08 11:52:42 +02:00
|
|
|
url = "https://github.com/PintaProject/pinta/tarball/3f7ccfa93d";
|
|
|
|
name = "pinta-1.4.tar.gz";
|
|
|
|
sha256 = "1kgb4gy5l6bd0akniwhiqqkvqayr5jgdsvn2pgg1038q9raafnpn";
|
2010-06-16 00:25:38 +02:00
|
|
|
};
|
|
|
|
|
2010-06-22 23:07:09 +02:00
|
|
|
buildInputs = [mono gtksharp pkgconfig];
|
2010-06-16 00:25:38 +02:00
|
|
|
|
2010-06-22 23:07:09 +02:00
|
|
|
buildPhase = ''
|
|
|
|
# xbuild understands pkgconfig, but gtksharp does not give .pc for gdk-sharp
|
|
|
|
# So we have to go the GAC-way
|
|
|
|
export MONO_GAC_PREFIX=${gtksharp}
|
|
|
|
xbuild Pinta.sln
|
2010-06-18 10:16:21 +02:00
|
|
|
'';
|
|
|
|
|
2010-06-22 23:07:09 +02:00
|
|
|
# Very ugly - I don't know enough Mono to improve this. Isn't there any rpath in binaries?
|
|
|
|
installPhase = ''
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out/lib/pinta $out/bin
|
2010-06-22 23:07:09 +02:00
|
|
|
cp bin/*.{dll,exe} $out/lib/pinta
|
|
|
|
cat > $out/bin/pinta << EOF
|
|
|
|
#!/bin/sh
|
|
|
|
export MONO_GAC_PREFIX=${gtksharp}:\$MONO_GAC_PREFIX
|
|
|
|
export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:${gtksharp}/lib:${gtksharp.gtk}/lib:${mono}/lib
|
|
|
|
exec ${mono}/bin/mono $out/lib/pinta/Pinta.exe
|
|
|
|
EOF
|
|
|
|
chmod +x $out/bin/pinta
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Always needed on Mono, otherwise nothing runs
|
|
|
|
dontStrip = true;
|
2010-06-16 00:25:38 +02:00
|
|
|
|
2010-06-22 23:07:09 +02:00
|
|
|
meta = {
|
|
|
|
homepage = http://www.pinta-project.com/;
|
|
|
|
description = "Drawing/editing program modeled after Paint.NET";
|
|
|
|
license = "MIT";
|
|
|
|
maintainers = with stdenv.lib.maintainers; [viric];
|
|
|
|
platforms = with stdenv.lib.platforms; linux;
|
|
|
|
};
|
2010-06-16 00:25:38 +02:00
|
|
|
}
|