Author: viric
Date: 2010-06-22 21:07:09 +0000 (Tue, 22 Jun 2010)
New Revision: 22387

You can view the changes in this commit at:
   https://svn.nixos.org/viewvc/nix?rev=22387&view=rev

Removed:
   nixpkgs/trunk/pkgs/applications/graphics/pinta/builder.sh
Modified:
   nixpkgs/trunk/pkgs/applications/graphics/pinta/default.nix
   nixpkgs/trunk/pkgs/development/libraries/gtk-sharp-2/default.nix

Log:
Fixing the pinta build (finally!). All looks very ugly, I imagine that mainly 
because
I know almost nothing about Mono.
I invite others to improve it.

Changes:

Deleted: nixpkgs/trunk/pkgs/applications/graphics/pinta/builder.sh
===================================================================
--- nixpkgs/trunk/pkgs/applications/graphics/pinta/builder.sh   2010-06-22 
20:26:49 UTC (rev 22386)
+++ nixpkgs/trunk/pkgs/applications/graphics/pinta/builder.sh   2010-06-22 
21:07:09 UTC (rev 22387)
@@ -1,20 +0,0 @@
-source $stdenv/setup
-source $makeWrapper
-
-postInstall() {
-    mv $out/bin $out/bin-orig
-    mkdir $out/bin
-
-    for i in $out/bin-orig/*; do
-        echo "wrapping $(basename $i)"
-        # !!! TODO: figure out the MONO_GAC_PREFIX automatically
-        makeWrapper "$i" "$out/bin/$(basename $i)" \
-            --suffix PATH ':' "$(dirname $(type -p mono))" \
-            --suffix MONO_GAC_PREFIX ':' "$gtksharp" \
-            --suffix MONO_GAC_PREFIX ':' "$out"
-    done
-}
-
-genericBuild
-
-

Modified: nixpkgs/trunk/pkgs/applications/graphics/pinta/default.nix
===================================================================
--- nixpkgs/trunk/pkgs/applications/graphics/pinta/default.nix  2010-06-22 
20:26:49 UTC (rev 22386)
+++ nixpkgs/trunk/pkgs/applications/graphics/pinta/default.nix  2010-06-22 
21:07:09 UTC (rev 22387)
@@ -1,25 +1,44 @@
 {stdenv, fetchgit, mono, gtksharp, pkgconfig}:
 
 stdenv.mkDerivation {
-  name = "pinta-20100617";
+  name = "pinta-0.3";
 
-  builder = ./builder.sh;
-
   src = fetchgit {
     url = http://github.com/jpobst/Pinta.git;
-    tag = "0.3";
-    sha256 = "0qvpz9602igjmv8ba6vc4kg9jj3yyw0frl7wgz62hdxiizdfhm2f";
+    rev = "0.3";
+    sha256 = 
"17fde1187be4cfd50a9acda4ba45584e24d51ff22df5074654bed23f61faf33b";
   };
 
-  makeWrapper = ../../../build-support/make-wrapper/make-wrapper.sh;
+  buildInputs = [mono gtksharp pkgconfig];
 
-  makePhase = ''
-    HOME=`pwd`/tmphome
-    mkdir -p $HOME
-    xbuild Pinta.Core/Pinta.Core.csproj /v:diag
+  buildPhase = ''
+    # xbuild understands pkgconfig, but gtksharp does not give .pc for 
gdk-sharp
+    # So we have to go the GAC-way
+    export MONO_GAC_PREFIX=${gtksharp}
+    xbuild Pinta.sln
   '';
 
-  buildInputs = [mono gtksharp pkgconfig];
+  # Very ugly - I don't know enough Mono to improve this. Isn't there any 
rpath in binaries?
+  installPhase = ''
+    ensureDir $out/lib/pinta $out/bin
+    cp bin/*.{dll,exe} $out/lib/pinta
+    cat > $out/bin/pinta << EOF
+    #!/bin/sh
+    export MONO_GAC_PREFIX=${gtksharp}:\$MONO_GAC_PREFIX
+    export 
LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:${gtksharp}/lib:${gtksharp.gtk}/lib:${mono}/lib
+    exec ${mono}/bin/mono $out/lib/pinta/Pinta.exe
+    EOF
+    chmod +x $out/bin/pinta
+  '';
 
-  inherit gtksharp;
+  # Always needed on Mono, otherwise nothing runs
+  dontStrip = true; 
+
+  meta = {
+    homepage = http://www.pinta-project.com/;
+    description = "Drawing/editing program modeled after Paint.NET";
+    license = "MIT";
+    maintainers = with stdenv.lib.maintainers; [viric];
+    platforms = with stdenv.lib.platforms; linux;
+  };
 }

Modified: nixpkgs/trunk/pkgs/development/libraries/gtk-sharp-2/default.nix
===================================================================
--- nixpkgs/trunk/pkgs/development/libraries/gtk-sharp-2/default.nix    
2010-06-22 20:26:49 UTC (rev 22386)
+++ nixpkgs/trunk/pkgs/development/libraries/gtk-sharp-2/default.nix    
2010-06-22 21:07:09 UTC (rev 22387)
@@ -16,12 +16,12 @@
 }:
 
 stdenv.mkDerivation {
-  name = "gtk-sharp-2.12.9";
+  name = "gtk-sharp-2.12.10";
 
   builder = ./builder.sh;
   src = fetchurl {
-    url = 
http://ftp.gnome.org/pub/gnome/sources/gtk-sharp/2.12/gtk-sharp-2.12.9.tar.gz;
-    sha256 = "1wh8zh960s4gq3cs11ys6p1ssblhpj2m8nm4xwv2s3bi7wbmcclh";
+    url = 
http://ftp.gnome.org/pub/gnome/sources/gtk-sharp/2.12/gtk-sharp-2.12.10.tar.gz;
+    sha256 = "1y55vc2cp4lggmbil2lb28d0gn71iq6wfyja1l9mya5xll8svzwc";
   };
 
   # patches = [ ./dllmap-glue.patch ];
@@ -32,5 +32,11 @@
     gnomepanel
   ];
 
+  dontStrip = true;
+
   inherit monoDLLFixer;
+
+  passthru = {
+    inherit gtk;
+  };
 }

_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to