58 lines
1.6 KiB
Nix
58 lines
1.6 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, rustPlatform
|
|
, darwin
|
|
, libiconv
|
|
, makeBinaryWrapper
|
|
, installShellFiles
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "fortune-kind-custom";
|
|
version = "0.1.9";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "cafkafk";
|
|
repo = "fortune-kind";
|
|
rev = "v${version}";
|
|
hash = "sha256-93BEy9FX3bZTYNewotBv1ejmMSnSdu9XnC4TgIvcYG0=";
|
|
};
|
|
|
|
cargoHash = "sha256-w5nR+pduM64DvVXhJxFKCg8O7lYSa1ur7aBBZQbOdpk=";
|
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ libiconv darwin.apple_sdk.frameworks.Security ];
|
|
|
|
buildNoDefaultFeatures = true;
|
|
|
|
MAN_OUT = "./man";
|
|
|
|
preBuild = ''
|
|
mkdir -p "./$MAN_OUT";
|
|
'';
|
|
|
|
preInstall = ''
|
|
mkdir -p $out
|
|
cp -r ./man $out/man;
|
|
cp -r ./fortunes $out/fortunes;
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "A kinder, curated fortune; just the build, ma'am";
|
|
longDescription = ''
|
|
Historically, contributions to fortune-mod have had a less-than ideal
|
|
quality control process, and as such, many of the fortunes that a user may
|
|
receive from the program read more like cryptic inside jokes, or at the
|
|
very worst, locker-room banter. One of the major goals of fortune-kind is
|
|
defining and applying a somewhat more rigorous moderation and editing
|
|
process to the fortune adoption workflow.
|
|
'';
|
|
homepage = "https://github.com/cafkafk/fortune-kind";
|
|
changelog = "https://github.com/cafkafk/fortune-kind/releases/tag/v${version}";
|
|
license = licenses.gpl3Only;
|
|
mainProgram = "fortune-kind";
|
|
maintainers = with maintainers; [ cafkafk ];
|
|
platforms = platforms.unix ++ platforms.windows;
|
|
};
|
|
}
|