12 rustPlatform.buildRustPackage rec {
13 pname = "fortune-kind";
16 src = fetchFromGitHub {
18 repo = "fortune-kind";
20 hash = "sha256-Tpg0Jq2EhkwQuz5ZOtv6Rb5YESSlmzLoJPTxYJNNgac=";
23 cargoHash = "sha256-hxbvsAQsZWUAgj8QAlcxqBA5YagLO3/vz9lQGJMHUjw=";
25 nativeBuildInputs = [ makeBinaryWrapper installShellFiles ];
26 buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv darwin.apple_sdk.frameworks.Security ];
28 buildNoDefaultFeatures = true;
33 mkdir -p "./$MAN_OUT";
37 installManPage man/fortune-kind.1
38 installShellCompletion \
39 --fish man/fortune-kind.fish \
40 --bash man/fortune-kind.bash \
41 --zsh man/_fortune-kind
43 cp -r $src/fortunes $out/fortunes;
47 wrapProgram $out/bin/fortune-kind \
48 --prefix FORTUNE_DIR : "$out/fortunes"
49 ''+ lib.optionalString fortuneAlias ''
50 ln -s fortune-kind $out/bin/fortune
54 description = "Kinder, curated fortune, written in rust";
56 Historically, contributions to fortune-mod have had a less-than ideal
57 quality control process, and as such, many of the fortunes that a user may
58 receive from the program read more like cryptic inside jokes, or at the
59 very worst, locker-room banter. One of the major goals of fortune-kind is
60 defining and applying a somewhat more rigorous moderation and editing
61 process to the fortune adoption workflow.
63 homepage = "https://github.com/cafkafk/fortune-kind";
64 changelog = "https://github.com/cafkafk/fortune-kind/releases/tag/v${version}";
65 license = licenses.gpl3Only;
66 mainProgram = "fortune-kind";
67 maintainers = with maintainers; [ cafkafk ];
68 platforms = platforms.unix ++ platforms.windows;