Merge pull request #28776 from veprbl/dia_update

dia: enable on darwin, 0.97 -> 2017-06-22
This commit is contained in:
Jörg Thalheim 2017-08-31 08:34:14 +01:00 committed by GitHub
commit 7076bc2510

View File

@ -1,50 +1,43 @@
{stdenv, fetchurl, gtk2, pkgconfig, perl, perlXMLParser, libxml2, gettext { stdenv, fetchgit, autoconf, automake, libtool, gtk2, pkgconfig, perl,
, python, libxml2Python, docbook5, docbook_xsl, libxslt, intltool, libart_lgpl perlXMLParser, libxml2, gettext, python, libxml2Python, docbook5, docbook_xsl,
, withGNOME ? false, libgnomeui }: libxslt, intltool, libart_lgpl, withGNOME ? false, libgnomeui,
gtk-mac-integration }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "dia-${minVer}.3"; name = "dia-${version}";
minVer = "0.97"; version = "0.97.3.20170622";
src = fetchurl { src = fetchgit {
url = "mirror://gnome/sources/dia/${minVer}/${name}.tar.xz"; url = git://git.gnome.org/dia;
sha256 = "0d3x6w0l6fwd0l8xx06y1h56xf8ss31yzia3a6xr9y28xx44x492"; rev = "b86085dfe2b048a2d37d587adf8ceba6fb8bc43c";
}; sha256 = "1fyxfrzdcs6blxhkw3bcgkksaf3byrsj4cbyrqgb4869k3ynap96";
correctPersistence = fetchurl {
url = https://launchpadlibrarian.net/132677658/persistence;
sha256 = "1rv6zv9i03bna4bdp1wzn72lg7kdwi900y1izdq0imibi54nxjsk";
}; };
buildInputs = buildInputs =
[ gtk2 perlXMLParser libxml2 gettext python libxml2Python docbook5 [ gtk2 perlXMLParser libxml2 gettext python libxml2Python docbook5
libxslt docbook_xsl libart_lgpl libxslt docbook_xsl libart_lgpl ]
] ++ stdenv.lib.optional withGNOME libgnomeui; ++ stdenv.lib.optional withGNOME libgnomeui
++ stdenv.lib.optional stdenv.isDarwin gtk-mac-integration;
nativeBuildInputs = [ pkgconfig intltool perl ]; nativeBuildInputs = [ autoconf automake libtool pkgconfig intltool perl ];
preConfigure = ''
NOCONFIGURE=1 ./autogen.sh # autoreconfHook is not enough
'';
configureFlags = stdenv.lib.optionalString withGNOME "--enable-gnome"; configureFlags = stdenv.lib.optionalString withGNOME "--enable-gnome";
patches = [ ]; hardeningDisable = [ "format" ];
# This file should normally require a gtk-update-icon-cache -q /usr/share/icons/hicolor command # 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 # It have no reasons to exist in a redistribuable package
postInstall = '' postInstall = ''
rm $out/share/icons/hicolor/icon-theme.cache 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
echo 'chmod u+rw "$HOME/.dia/persistence" ' >> dia
echo "\"$out/bin/"'.dia-wrapped" "$@"' >> dia
chmod a+x dia
''; '';
meta = { meta = {
description = "Gnome Diagram drawing software"; description = "Gnome Diagram drawing software";
homepage = http://live.gnome.org/Dia; homepage = http://live.gnome.org/Dia;
maintainers = with stdenv.lib.maintainers; [raskin]; maintainers = with stdenv.lib.maintainers; [raskin];
platforms = stdenv.lib.platforms.linux; platforms = stdenv.lib.platforms.unix;
}; };
} }