2016-09-11 14:24:51 -07:00
|
|
|
{stdenv, fetchurl, gtk2, pkgconfig, perl, perlXMLParser, libxml2, gettext
|
2011-09-19 23:31:37 -07:00
|
|
|
, python, libxml2Python, docbook5, docbook_xsl, libxslt, intltool, libart_lgpl
|
2012-01-18 12:53:01 -08:00
|
|
|
, withGNOME ? false, libgnomeui }:
|
2007-06-20 05:20:39 -07:00
|
|
|
|
2011-09-19 23:31:37 -07:00
|
|
|
stdenv.mkDerivation rec {
|
2015-04-04 22:22:12 -07:00
|
|
|
name = "dia-${minVer}.3";
|
|
|
|
minVer = "0.97";
|
2011-09-19 23:31:37 -07:00
|
|
|
|
2015-04-04 22:22:12 -07:00
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://gnome/sources/dia/${minVer}/${name}.tar.xz";
|
2014-10-06 22:26:48 -07:00
|
|
|
sha256 = "0d3x6w0l6fwd0l8xx06y1h56xf8ss31yzia3a6xr9y28xx44x492";
|
2007-06-20 05:20:39 -07:00
|
|
|
};
|
|
|
|
|
2014-06-12 04:02:39 -07:00
|
|
|
correctPersistence = fetchurl {
|
|
|
|
url = https://launchpadlibrarian.net/132677658/persistence;
|
|
|
|
sha256 = "1rv6zv9i03bna4bdp1wzn72lg7kdwi900y1izdq0imibi54nxjsk";
|
|
|
|
};
|
|
|
|
|
2011-09-19 23:31:37 -07:00
|
|
|
buildInputs =
|
2016-09-11 14:24:51 -07:00
|
|
|
[ gtk2 perlXMLParser libxml2 gettext python libxml2Python docbook5
|
2011-09-19 23:31:37 -07:00
|
|
|
libxslt docbook_xsl libart_lgpl
|
|
|
|
] ++ stdenv.lib.optional withGNOME libgnomeui;
|
|
|
|
|
2012-12-28 10:20:09 -08:00
|
|
|
nativeBuildInputs = [ pkgconfig intltool perl ];
|
2011-09-19 23:31:37 -07:00
|
|
|
|
|
|
|
configureFlags = stdenv.lib.optionalString withGNOME "--enable-gnome";
|
2007-06-26 04:49:45 -07:00
|
|
|
|
2014-10-06 22:26:48 -07:00
|
|
|
patches = [ ];
|
2012-07-15 08:01:27 -07:00
|
|
|
|
2012-11-27 15:21:34 -08: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 04:02:39 -07: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 14:33:18 -07:00
|
|
|
echo 'chmod u+rw "$HOME/.dia/persistence" ' >> dia
|
2014-06-12 14:22:44 -07:00
|
|
|
echo "\"$out/bin/"'.dia-wrapped" "$@"' >> dia
|
2014-06-12 04:02:39 -07:00
|
|
|
chmod a+x dia
|
|
|
|
'';
|
2012-11-27 15:21:34 -08:00
|
|
|
|
2007-06-26 04:49:45 -07:00
|
|
|
meta = {
|
2011-09-19 23:31:37 -07:00
|
|
|
description = "Gnome Diagram drawing software";
|
2010-01-15 02:51:44 -08:00
|
|
|
homepage = http://live.gnome.org/Dia;
|
2011-09-19 23:31:37 -07:00
|
|
|
maintainers = with stdenv.lib.maintainers; [raskin urkud];
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2007-06-26 04:49:45 -07:00
|
|
|
};
|
2007-06-20 05:20:39 -07:00
|
|
|
}
|