about summary refs log tree commit diff
path: root/pkgs/applications/graphics/pinta
diff options
context:
space:
mode:
authorDemin Dmitriy <demindf@gmail.com>2015-10-30 06:35:05 +0300
committerDemin Dmitriy <demindf@gmail.com>2015-10-30 06:39:09 +0300
commit0d12bbe5743c62e0865c4a79e7ce2a0f1972621e (patch)
tree188967df7fae5462d95af2f3373696a615d10bf0 /pkgs/applications/graphics/pinta
parent0ec62e075949fb0e71b9ae3eb4f01e16bfe6a7b1 (diff)
pinta: Add installation of manpages and .desktop, locale and icon files
Diffstat (limited to 'pkgs/applications/graphics/pinta')
-rw-r--r--pkgs/applications/graphics/pinta/default.nix26
1 files changed, 23 insertions, 3 deletions
diff --git a/pkgs/applications/graphics/pinta/default.nix b/pkgs/applications/graphics/pinta/default.nix
index 0084ddffb1d75..2fd98b5033e90 100644
--- a/pkgs/applications/graphics/pinta/default.nix
+++ b/pkgs/applications/graphics/pinta/default.nix
@@ -1,4 +1,5 @@
-{ stdenv, fetchFromGitHub, buildDotnetPackage, dotnetPackages, gtksharp }:
+{ stdenv, fetchFromGitHub, buildDotnetPackage, dotnetPackages, gtksharp,
+  gettext }:
 
 let
   mono-addins = dotnetPackages.MonoAddins;
@@ -9,7 +10,7 @@ buildDotnetPackage rec {
   baseName = "Pinta";
   version = "1.6";
   outputFiles = [ "bin/*" ];
-  buildInputs = [ gtksharp mono-addins ];
+  buildInputs = [ gtksharp mono-addins gettext ];
   xBuildFiles = [ "Pinta.sln" ];
 
   src = fetchFromGitHub {
@@ -45,7 +46,14 @@ buildDotnetPackage rec {
     map2 = f: listA: listB: concatMap (a: map (f a) listB) listA;
     concatMap2Strings = f: listA: listB: concatStrings (map2 f listA listB);
   in
-    concatMap2Strings stripVersion versionedNames csprojFiles;
+    concatMap2Strings stripVersion versionedNames csprojFiles
+    + ''
+      # For some reason there is no Microsoft.Common.tasks file
+      # in ''${mono}/lib/mono/3.5 .
+      substituteInPlace Pinta.Install.proj \
+        --replace 'ToolsVersion="3.5"' 'ToolsVersion="4.0"' \
+        --replace "/usr/local" "$out"
+    '';
 
   makeWrapperArgs = [
     ''--prefix MONO_GAC_PREFIX ':' "${gtksharp}"''
@@ -53,6 +61,18 @@ buildDotnetPackage rec {
     ''--prefix LD_LIBRARY_PATH ':' "${gtksharp.gtk}/lib"''
   ];
 
+  postInstall = ''
+    # Do automake's job manually
+    substitute xdg/pinta.desktop.in xdg/pinta.desktop \
+      --replace _Name Name \
+      --replace _Comment Comment \
+      --replace _GenericName GenericName \
+      --replace _X-GNOME-FullName X-GNOME-FullName
+
+    xbuild /target:CompileTranslations Pinta.Install.proj
+    xbuild /target:Install Pinta.Install.proj
+  '';
+
   meta = {
     homepage = http://www.pinta-project.com/;
     description = "Drawing/editing program modeled after Paint.NET";