license-cli: init at 2.6.1

This commit is contained in:
Gabriel Arazas 2022-07-21 11:28:34 +08:00
parent 1fb010c1a5
commit 513763bc90
2 changed files with 33 additions and 0 deletions

View File

@ -34,6 +34,7 @@ let
hush-shell = callPackage ./hush-shell.nix { };
ictree = callPackage ./ictree.nix { };
libcs50 = callPackage ./libcs50.nix { };
license-cli = callPackage ./license-cli { };
moac = callPackage ./moac.nix { };
mopidy-beets = callPackage ./mopidy-beets.nix { };
mopidy-funkwhale = callPackage ./mopidy-funkwhale.nix { };

View File

@ -0,0 +1,32 @@
{ stdenv, lib, fetchFromSourcehut, rustPlatform, installShellFiles, scdoc }:
rustPlatform.buildRustPackage rec {
pname = "license-cli";
version = "2.6.1";
src = fetchFromSourcehut {
owner = "~zethra";
repo = "license";
rev = version;
sha256 = "sha256-39W8Jagj656rivWlNWUr7qNeDQtaBdJYUzwYucZhr5o=";
};
cargoSha256 = "sha256-CcG71oaqukbU+PBV+izlYwP3yDUE0d4mVjQV2nWIDyg=";
nativeBuildInputs = [ installShellFiles ];
preInstall = ''
${scdoc}/bin/scdoc < doc/license.scd > license.1
'';
postInstall = ''
installShellCompletion completions/license.{bash,fish}
installShellCompletion --zsh completions/_license
installManPage ./license.1
'';
meta = with lib; {
homepage = "https://git.sr.ht/~zethra/license";
description = "Command-line tool to easily add license to your project";
license = licenses.mpl20;
mainProgram = "license";
};
}