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