base16-schemes: unstable-2024-06-21 -> unstable-2024-11-12
[NixPkgs.git] / pkgs / by-name / gr / grafx2 / package.nix
blobfa80fe718ce4f284658642198e92be8380bacc1f
1 { lib
2 , stdenv
3 , fetchurl
4 , SDL
5 , SDL_image
6 , SDL_ttf
7 , installShellFiles
8 , fontconfig
9 , libpng
10 , libtiff
11 , lua5
12 , pkg-config
13 , zlib
16 stdenv.mkDerivation (finalAttrs: {
17   pname = "grafx2";
18   version = "2.8.3091";
20   outputs = [ "out" "man" ];
22   src = fetchurl {
23     name = "grafx2-${finalAttrs.version}.tar.gz";
24     url = "https://pulkomandy.tk/projects/GrafX2/downloads/65";
25     hash = "sha256-KdY7GUhQp/Q7t/ktLPGxI66ZHy2gDAffn2yB5pmcJCM=";
26   };
28   postPatch = ''
29     substituteInPlace misc/unix/grafx2.desktop \
30       --replace "Exec=grafx2" "Exec=grafx2-sdl"
31   '';
33   nativeBuildInputs = [
34     installShellFiles
35     pkg-config
36   ];
38   buildInputs = [
39     SDL
40     SDL_image
41     SDL_ttf
42     fontconfig
43     libpng
44     libtiff
45     lua5
46     zlib
47   ];
49   strictDeps = false; # Why??
51   makeFlags = [ "-C src" ];
52   installFlags = [ "-C src" "PREFIX=$(out)" ];
54   postInstall = ''
55     installManPage misc/unix/grafx2.1
56   '';
58   meta = {
59     homepage = "http://grafx2.eu/";
60     description = "Ultimate 256-color painting program";
61     longDescription = ''
62       GrafX2 is a bitmap paint program inspired by the Amiga programs â€‹Deluxe
63       Paint and Brilliance. Specialized in 256-color drawing, it includes a very
64       large number of tools and effects that make it particularly suitable for
65       pixel art, game graphics, and generally any detailed graphics painted with
66       a mouse.
68       The program is mostly developed on Haiku, Linux and Windows, but is also
69       portable on many other platforms.
70     '';
71     license = with lib.licenses; [ gpl2Plus ];
72     mainProgram = "grafx2-sdl";
73     maintainers = with lib.maintainers; [ AndersonTorres ];
74     platforms = lib.platforms.unix;
75   };