10 stdenv.mkDerivation rec {
14 src = fetchFromGitHub {
15 owner = "stephen-huan";
18 hash = "sha256-xKUqkrPwITai8g6U1NiNieAip/AzISgFfFtvR30hLNk=";
24 $CXX -Wall -Wpedantic -Wextra -O3 -o inflow inflow.cpp
32 install -Dm755 inflow -t $out/bin
38 reflowWithLineLength =
39 runCommand "${pname}-test"
41 nativeBuildInputs = [ inflow ];
42 buildInputs = [ diffutils ];
46 xxxxx xxx xxx xxxx xxxxxxxxx xx x xxxxxxxxx x xxxx xxxx xxxxxxx xxxxxxxx xxx
47 xxxxxxxxx xxxxxxxx xx xx xxxxx xxxxx xxxx xx x xxxx xx xxxxxxxx xxxxxxxx xxxx
48 xxx xxxx xxxx xxx xxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxx xxx xxxxx xx xxxx x xxxx
49 xxxxxxxx xxxx xxxx xx xxxxx xxxx xxxxx xxxx xxxxxxxxx xxx xxxxxxxxxxx xxxxxx
50 xxx xxxxxxxxx xxxx xxxx xx x xx xxxx xxx xxxx xx xxx xxx xxxxxxxxxxx xxxx xxxxx
51 x xxxxx xxxxxxx xxxxxxx xx xx xxxxxx xx xxxxx
54 inflow 72 < input.txt > actual.txt
56 cat <<EOF > expected.txt
57 xxxxx xxx xxx xxxx xxxxxxxxx xx x xxxxxxxxx x xxxx xxxx xxxxxxx
58 xxxxxxxx xxx xxxxxxxxx xxxxxxxx xx xx xxxxx xxxxx xxxx xx x xxxx
59 xx xxxxxxxx xxxxxxxx xxxx xxx xxxx xxxx xxx xxxxxxxxxxxxxxxxxxx
60 xxxxxxxxxxxxx xxx xxxxx xx xxxx x xxxx xxxxxxxx xxxx xxxx xx xxxxx
61 xxxx xxxxx xxxx xxxxxxxxx xxx xxxxxxxxxxx xxxxxx xxx xxxxxxxxx
62 xxxx xxxx xx x xx xxxx xxx xxxx xx xxx xxx xxxxxxxxxxx xxxx xxxxx
63 x xxxxx xxxxxxx xxxxxxx xx xx xxxxxx xx xxxxx
66 if ! cmp --silent expected.txt actual.txt
68 echo "Error: actual.txt and expected.txt are different"
69 diff actual.txt expected.txt
78 description = "Variance-optimal paragraph formatter";
79 homepage = "https://github.com/stephen-huan/inflow";
80 license = licenses.unlicense;
81 mainProgram = "inflow";
82 maintainers = with maintainers; [ fbrs ];
83 platforms = platforms.all;