1 { lib, gccStdenv, fetchFromGitHub, bison, flex, pcre2, libunistring, ncurses }:
3 gccStdenv.mkDerivation rec {
7 src = fetchFromGitHub {
11 hash = "sha256-dvhb5KWBQt7g4n0ZTQMcJQljIfavV3g8i+P3PWB6Gwk=";
14 # Building instructions:
15 # https://boxes.thomasjensen.com/build.html#building-on-linux--unix
16 nativeBuildInputs = [ bison flex ];
18 buildInputs = [ pcre2 libunistring ncurses ];
22 # Makefile references a system wide config file in '/usr/share'. Instead, we
23 # move it within the store by default.
25 substituteInPlace Makefile \
26 --replace-fail "GLOBALCONF = /usr/share/boxes" \
27 "GLOBALCONF=${placeholder "out"}/share/boxes/boxes-config"
30 makeFlags = [ "CC=${gccStdenv.cc.targetPrefix}cc" ];
33 install -Dm755 -t $out/bin out/boxes
34 install -Dm644 -t $out/share/boxes boxes-config
35 install -Dm644 -t $out/share/man/man1 doc/boxes.1
39 description = "Command line program which draws, removes, and repairs ASCII art boxes";
40 mainProgram = "boxes";
41 homepage = "https://boxes.thomasjensen.com";
42 license = licenses.gpl2Plus;
43 maintainers = with maintainers; [ waiting-for-dev ];
44 platforms = platforms.unix;