lol
1{ lib
2, stdenv
3, fetchFromGitea
4, cmake
5}:
6
7stdenv.mkDerivation rec {
8 pname = "justify";
9 version = "unstable-2022-03-19";
10
11 src = fetchFromGitea {
12 domain = "tildegit.org";
13 owner = "jns";
14 repo = "justify";
15 rev = "0d397c20ed921c8e091bf18e548d174e15810e62";
16 sha256 = "sha256-406OhJt2Ila/LIhfqJXhbFqFxJJiRyMVI4/VK8Y43kc=";
17 };
18
19 postPatch = ''
20 sed '1i#include <algorithm>' -i src/stringHelper.h # gcc12
21 '';
22
23 nativeBuildInputs = [ cmake ];
24
25 installPhase = ''
26 install -D justify $out/bin/justify
27 '';
28
29 meta = with lib; {
30 homepage = "https://tildegit.org/jns/justify";
31 description = "Simple text alignment tool that supports left/right/center/fill justify alignment";
32 license = licenses.gpl3Only;
33 platforms = platforms.unix;
34 mainProgram = "justify";
35 maintainers = with maintainers; [ xfnw ];
36 };
37}