nixpkgs/pkgs/development/interpreters/npiet/default.nix
Alexis Hildebrandt 755b915a15 treewide: Remove indefinite article from meta.description
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \
  | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
2024-06-09 23:07:45 +02:00

46 lines
1.2 KiB
Nix

{ lib
, stdenv
, fetchurl
, gd
, giflib
, groff
, libpng
, tk
}:
stdenv.mkDerivation rec {
pname = "npiet";
version = "1.3f";
src = fetchurl {
url = "https://www.bertnase.de/npiet/npiet-${version}.tar.gz";
sha256 = "sha256-Le2FYGKr1zWZ6F4edozmvGC6LbItx9aptidj3KBLhVo=";
};
buildInputs = [ gd giflib libpng ];
nativeBuildInputs = [ groff ];
postPatch = ''
# malloc.h is not needed because stdlib.h is already included.
# On macOS, malloc.h does not even exist, resulting in an error.
substituteInPlace npiet-foogol.c \
--replace '#include <malloc.h>' ""
substituteInPlace npietedit \
--replace 'exec wish' 'exec ${tk}/bin/wish'
'';
meta = with lib; {
description = "Interpreter for piet programs. Also includes npietedit and npiet-foogol";
longDescription = ''
npiet is an interpreter for the piet programming language.
Instead of text, piet programs are pictures. Commands are determined based on changes in color.
'';
homepage = "https://www.bertnase.de/npiet/";
license = licenses.gpl2Only;
platforms = platforms.unix;
maintainers = with maintainers; [ Luflosi ];
};
}