2016-09-11 23:24:51 +02:00
|
|
|
{stdenv, fetchurl, gtk2, pkgconfig, perl, perlXMLParser, libxml2, gettext
|
2011-09-20 08:31:37 +02:00
|
|
|
, python, libxml2Python, docbook5, docbook_xsl, libxslt, intltool, libart_lgpl
|
2012-01-18 21:53:01 +01:00
|
|
|
, withGNOME ? false, libgnomeui }:
|
2007-06-20 14:20:39 +02:00
|
|
|
|
2011-09-20 08:31:37 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2015-04-05 07:22:12 +02:00
|
|
|
name = "dia-${minVer}.3";
|
|
|
|
minVer = "0.97";
|
2011-09-20 08:31:37 +02:00
|
|
|
|
2015-04-05 07:22:12 +02:00
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://gnome/sources/dia/${minVer}/${name}.tar.xz";
|
2014-10-07 07:26:48 +02:00
|
|
|
sha256 = "0d3x6w0l6fwd0l8xx06y1h56xf8ss31yzia3a6xr9y28xx44x492";
|
2007-06-20 14:20:39 +02:00
|
|
|
};
|
|
|
|
|
2014-06-12 13:02:39 +02:00
|
|
|
correctPersistence = fetchurl {
|
|
|
|
url = https://launchpadlibrarian.net/132677658/persistence;
|
|
|
|
sha256 = "1rv6zv9i03bna4bdp1wzn72lg7kdwi900y1izdq0imibi54nxjsk";
|
|
|
|
};
|
|
|
|
|
2011-09-20 08:31:37 +02:00
|
|
|
buildInputs =
|
2016-09-11 23:24:51 +02:00
|
|
|
[ gtk2 perlXMLParser libxml2 gettext python libxml2Python docbook5
|
2011-09-20 08:31:37 +02:00
|
|
|
libxslt docbook_xsl libart_lgpl
|
|
|
|
] ++ stdenv.lib.optional withGNOME libgnomeui;
|
|
|
|
|
2012-12-28 19:20:09 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig intltool perl ];
|
2011-09-20 08:31:37 +02:00
|
|
|
|
|
|
|
configureFlags = stdenv.lib.optionalString withGNOME "--enable-gnome";
|
2007-06-26 13:49:45 +02:00
|
|
|
|
2014-10-07 07:26:48 +02:00
|
|
|
patches = [ ];
|
2012-07-15 17:01:27 +02:00
|
|
|
|
2012-11-28 00:21:34 +01:00
|
|
|
# This file should normally require a gtk-update-icon-cache -q /usr/share/icons/hicolor command
|
|
|
|
# It have no reasons to exist in a redistribuable package
|
2014-06-12 13:02:39 +02:00
|
|
|
postInstall = ''
|
|
|
|
rm $out/share/icons/hicolor/icon-theme.cache
|
|
|
|
|
|
|
|
cd "$out"/bin/
|
|
|
|
mv dia .dia-wrapped
|
|
|
|
echo '#! ${stdenv.shell}' >> dia
|
|
|
|
echo 'test -f "$HOME/.dia/persistence" || cp ${correctPersistence} "$HOME/.dia/persistence" ' >> dia
|
2014-06-12 23:33:18 +02:00
|
|
|
echo 'chmod u+rw "$HOME/.dia/persistence" ' >> dia
|
2014-06-12 23:22:44 +02:00
|
|
|
echo "\"$out/bin/"'.dia-wrapped" "$@"' >> dia
|
2014-06-12 13:02:39 +02:00
|
|
|
chmod a+x dia
|
|
|
|
'';
|
2012-11-28 00:21:34 +01:00
|
|
|
|
2007-06-26 13:49:45 +02:00
|
|
|
meta = {
|
2011-09-20 08:31:37 +02:00
|
|
|
description = "Gnome Diagram drawing software";
|
2010-01-15 11:51:44 +01:00
|
|
|
homepage = http://live.gnome.org/Dia;
|
2011-09-20 08:31:37 +02:00
|
|
|
maintainers = with stdenv.lib.maintainers; [raskin urkud];
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2007-06-26 13:49:45 +02:00
|
|
|
};
|
2007-06-20 14:20:39 +02:00
|
|
|
}
|