diff options
author | Michael Raskin <7c6f434c@mail.ru> | 2014-06-12 15:02:39 +0400 |
---|---|---|
committer | Michael Raskin <7c6f434c@mail.ru> | 2014-06-12 15:02:49 +0400 |
commit | 80b701ca94a8b781adb2b08aea0e1308c3a140a2 (patch) | |
tree | 51f8a4e79119584814f8a05f27f422ef682a840b /pkgs/applications/graphics/dia | |
parent | 9118488a690273e430c3d2e94304f51b669de82d (diff) |
Put a correct Dia persistence file in ~/.dia unless such a file exists. Fixes #1691.
Diffstat (limited to 'pkgs/applications/graphics/dia')
-rw-r--r-- | pkgs/applications/graphics/dia/default.nix | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/pkgs/applications/graphics/dia/default.nix b/pkgs/applications/graphics/dia/default.nix index c7582fd6c33f9..1ec9e1d1c0d16 100644 --- a/pkgs/applications/graphics/dia/default.nix +++ b/pkgs/applications/graphics/dia/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurlGnome, gtk, pkgconfig, perl, perlXMLParser, libxml2, gettext +{stdenv, fetchurl, fetchurlGnome, gtk, pkgconfig, perl, perlXMLParser, libxml2, gettext , python, libxml2Python, docbook5, docbook_xsl, libxslt, intltool, libart_lgpl , withGNOME ? false, libgnomeui }: @@ -11,6 +11,11 @@ stdenv.mkDerivation rec { sha256 = "1qgawm7rrf4wd1yc0fp39ywv8gbz4ry1s16k00dzg5w6p67lfqd7"; }; + correctPersistence = fetchurl { + url = https://launchpadlibrarian.net/132677658/persistence; + sha256 = "1rv6zv9i03bna4bdp1wzn72lg7kdwi900y1izdq0imibi54nxjsk"; + }; + buildInputs = [ gtk perlXMLParser libxml2 gettext python libxml2Python docbook5 libxslt docbook_xsl libart_lgpl @@ -24,7 +29,16 @@ stdenv.mkDerivation rec { # 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 - postInstall = "rm $out/share/icons/hicolor/icon-theme.cache"; + 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 '.dia-wrapped "$@"' >> dia + chmod a+x dia + ''; meta = { description = "Gnome Diagram drawing software"; |