about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/graphics/pikopixel/default.nix
blob: c65353143368f04d95f3d5da1c6e1131bb198342 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{ lib
, clangStdenv
, fetchurl
, gnustep
}:

clangStdenv.mkDerivation rec {
  pname = "pikopixel";
  version = "1.0-b10";

  src = fetchurl {
    url = "https://twilightedge.com/downloads/PikoPixel.Sources.${version}.tar.gz";
    sha256 = "1b27npgsan2nx1p581b9q2krx4506yyd6s34r4sf1r9x9adshm77";
  };

  sourceRoot = "PikoPixel.Sources.${version}/PikoPixel";

  nativeBuildInputs = [
    gnustep.make
    gnustep.wrapGNUstepAppsHook
  ];

  buildInputs = [
    gnustep.base
    gnustep.gui
    gnustep.back
  ];

  # Fix the Exec and Icon paths in the .desktop file, and save the file in the
  # correct place.
  # postInstall gets redefined in gnustep.make's builder.sh, so we use preFixup
  preFixup = ''
    mkdir -p $out/share/applications
    sed \
      -e "s@^Exec=.*\$@Exec=$out/bin/PikoPixel %F@" \
      -e "s@^Icon=.*/local@Icon=$out@" \
      PikoPixel.app/Resources/PikoPixel.desktop > $out/share/applications/PikoPixel.desktop
  '';

  meta = with lib; {
    description = "Application for drawing and editing pixel-art images";
    mainProgram = "PikoPixel";
    homepage = "https://twilightedge.com/mac/pikopixel/";
    downloadPage = "https://twilightedge.com/mac/pikopixel/";
    license = licenses.agpl3Plus;
    maintainers = with maintainers; [ fgaz ];
    platforms = platforms.all;
  };
}