diff options
author | Luflosi <luflosi@luflosi.de> | 2021-09-18 14:23:04 +0200 |
---|---|---|
committer | Luflosi <luflosi@luflosi.de> | 2021-09-22 22:41:02 +0200 |
commit | b23cf25c51f04312fd6448711b15cc99aa5667bd (patch) | |
tree | 64c4b00604f265d92c55b7d65e8d1b2d6ad333df /pkgs/development/interpreters/npiet | |
parent | 81a4a694d141094540b08664f8229279658c3a95 (diff) |
npiet: init at 1.3f
Diffstat (limited to 'pkgs/development/interpreters/npiet')
-rw-r--r-- | pkgs/development/interpreters/npiet/default.nix | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/pkgs/development/interpreters/npiet/default.nix b/pkgs/development/interpreters/npiet/default.nix new file mode 100644 index 0000000000000..c0e2c3ade2928 --- /dev/null +++ b/pkgs/development/interpreters/npiet/default.nix @@ -0,0 +1,45 @@ +{ 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 = "An 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 ]; + }; +} |