From 9c501a05a65ed416145c37e9246dea552535dc79 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Wed, 30 Aug 2017 20:01:47 -0400 Subject: [PATCH 1/3] dia: mark as working on darwin --- pkgs/applications/graphics/dia/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/graphics/dia/default.nix b/pkgs/applications/graphics/dia/default.nix index 8d8e36a8bc89..34d15b0c4647 100644 --- a/pkgs/applications/graphics/dia/default.nix +++ b/pkgs/applications/graphics/dia/default.nix @@ -45,6 +45,6 @@ stdenv.mkDerivation rec { description = "Gnome Diagram drawing software"; homepage = http://live.gnome.org/Dia; maintainers = with stdenv.lib.maintainers; [raskin]; - platforms = stdenv.lib.platforms.linux; + platforms = stdenv.lib.platforms.unix; }; } From 42a4aa1e8397acf53cdb71b447f4253b1163f9a1 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Wed, 30 Aug 2017 21:02:06 -0400 Subject: [PATCH 2/3] dia: undo persistence wrapper The wrapper was introduced as workaround for #1691. The original bug was present in 0.97.2 but was fixed in 0.97.3. --- pkgs/applications/graphics/dia/default.nix | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/pkgs/applications/graphics/dia/default.nix b/pkgs/applications/graphics/dia/default.nix index 34d15b0c4647..1516e8f6e6db 100644 --- a/pkgs/applications/graphics/dia/default.nix +++ b/pkgs/applications/graphics/dia/default.nix @@ -11,11 +11,6 @@ stdenv.mkDerivation rec { sha256 = "0d3x6w0l6fwd0l8xx06y1h56xf8ss31yzia3a6xr9y28xx44x492"; }; - correctPersistence = fetchurl { - url = https://launchpadlibrarian.net/132677658/persistence; - sha256 = "1rv6zv9i03bna4bdp1wzn72lg7kdwi900y1izdq0imibi54nxjsk"; - }; - buildInputs = [ gtk2 perlXMLParser libxml2 gettext python libxml2Python docbook5 libxslt docbook_xsl libart_lgpl @@ -31,14 +26,6 @@ stdenv.mkDerivation rec { # It have no reasons to exist in a redistribuable package 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 - echo 'chmod u+rw "$HOME/.dia/persistence" ' >> dia - echo "\"$out/bin/"'.dia-wrapped" "$@"' >> dia - chmod a+x dia ''; meta = { From 13d628d2d39fa2eb83997d877c37b99d31aeafd0 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Wed, 30 Aug 2017 21:04:07 -0400 Subject: [PATCH 3/3] dia: 0.97.3 -> 0.97.3.20170622 --- pkgs/applications/graphics/dia/default.nix | 30 +++++++++++++--------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/pkgs/applications/graphics/dia/default.nix b/pkgs/applications/graphics/dia/default.nix index 1516e8f6e6db..73362588a57e 100644 --- a/pkgs/applications/graphics/dia/default.nix +++ b/pkgs/applications/graphics/dia/default.nix @@ -1,26 +1,32 @@ -{stdenv, fetchurl, gtk2, pkgconfig, perl, perlXMLParser, libxml2, gettext -, python, libxml2Python, docbook5, docbook_xsl, libxslt, intltool, libart_lgpl -, withGNOME ? false, libgnomeui }: +{ stdenv, fetchgit, autoconf, automake, libtool, gtk2, pkgconfig, perl, +perlXMLParser, libxml2, gettext, python, libxml2Python, docbook5, docbook_xsl, +libxslt, intltool, libart_lgpl, withGNOME ? false, libgnomeui, +gtk-mac-integration }: stdenv.mkDerivation rec { - name = "dia-${minVer}.3"; - minVer = "0.97"; + name = "dia-${version}"; + version = "0.97.3.20170622"; - src = fetchurl { - url = "mirror://gnome/sources/dia/${minVer}/${name}.tar.xz"; - sha256 = "0d3x6w0l6fwd0l8xx06y1h56xf8ss31yzia3a6xr9y28xx44x492"; + src = fetchgit { + url = git://git.gnome.org/dia; + rev = "b86085dfe2b048a2d37d587adf8ceba6fb8bc43c"; + sha256 = "1fyxfrzdcs6blxhkw3bcgkksaf3byrsj4cbyrqgb4869k3ynap96"; }; buildInputs = [ gtk2 perlXMLParser libxml2 gettext python libxml2Python docbook5 - libxslt docbook_xsl libart_lgpl - ] ++ stdenv.lib.optional withGNOME libgnomeui; + libxslt docbook_xsl libart_lgpl ] + ++ 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"; - patches = [ ]; + hardeningDisable = [ "format" ]; # 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