about summary refs log tree commit diff
path: root/pkgs/applications/graphics/grafx2/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/graphics/grafx2/default.nix')
-rw-r--r--pkgs/applications/graphics/grafx2/default.nix48
1 files changed, 38 insertions, 10 deletions
diff --git a/pkgs/applications/graphics/grafx2/default.nix b/pkgs/applications/graphics/grafx2/default.nix
index 26454897ddab..cd2d89d0e99c 100644
--- a/pkgs/applications/graphics/grafx2/default.nix
+++ b/pkgs/applications/graphics/grafx2/default.nix
@@ -4,6 +4,7 @@
 , SDL
 , SDL_image
 , SDL_ttf
+, installShellFiles
 , fontconfig
 , libpng
 , libtiff
@@ -12,17 +13,28 @@
 , zlib
 }:
 
-stdenv.mkDerivation rec {
-  version = "2.8.3091";
+stdenv.mkDerivation (finalAttrs: {
   pname = "grafx2";
+  version = "2.8.3091";
+
+  outputs = [ "out" "man" ];
 
   src = fetchurl {
+    name = "grafx2-${finalAttrs.version}.tar.gz";
     url = "https://pulkomandy.tk/projects/GrafX2/downloads/65";
-    name = "${pname}-${version}.tar.gz";
     hash = "sha256-KdY7GUhQp/Q7t/ktLPGxI66ZHy2gDAffn2yB5pmcJCM=";
   };
 
-  nativeBuildInputs = [ pkg-config ];
+  postPatch = ''
+    substituteInPlace misc/unix/grafx2.desktop \
+      --replace "Exec=grafx2" "Exec=grafx2-sdl"
+  '';
+
+  nativeBuildInputs = [
+    installShellFiles
+    pkg-config
+  ];
+
   buildInputs = [
     SDL
     SDL_image
@@ -34,15 +46,31 @@ stdenv.mkDerivation rec {
     zlib
   ];
 
+  strictDeps = false; # Why??
+
   makeFlags = [ "-C src" ];
   installFlags = [ "-C src" "PREFIX=$(out)" ];
 
+  postInstall = ''
+    installManPage misc/unix/grafx2.1
+  '';
+
   meta = {
-    description = "Bitmap paint program inspired by the Amiga programs Deluxe Paint and Brilliance";
-    homepage = "http://pulkomandy.tk/projects/GrafX2";
-    license = lib.licenses.gpl2;
-    platforms = [ "x86_64-linux" "i686-linux" ];
-    maintainers = [];
+    homepage = "http://grafx2.eu/";
+    description = "The ultimate 256-color painting program";
+    longDescription = ''
+      GrafX2 is a bitmap paint program inspired by the Amiga programs ​Deluxe
+      Paint and Brilliance. Specialized in 256-color drawing, it includes a very
+      large number of tools and effects that make it particularly suitable for
+      pixel art, game graphics, and generally any detailed graphics painted with
+      a mouse.
+
+      The program is mostly developed on Haiku, Linux and Windows, but is also
+      portable on many other platforms.
+    '';
+    license = with lib.licenses; [ gpl2Plus ];
     mainProgram = "grafx2-sdl";
+    maintainers = with lib.maintainers; [ AndersonTorres ];
+    platforms = lib.platforms.unix;
   };
-}
+})