diff --git a/pkgs/rustypaste-cli.nix b/pkgs/rustypaste-cli.nix new file mode 100644 index 00000000..3d2e09f6 --- /dev/null +++ b/pkgs/rustypaste-cli.nix @@ -0,0 +1,34 @@ +{ + lib, + rustPlatform, + fetchFromGitHub, + stdenv, + darwin, +}: + +rustPlatform.buildRustPackage rec { + pname = "rustypaste-cli"; + version = "0.9.1"; + + src = fetchFromGitHub { + owner = "orhun"; + repo = "rustypaste-cli"; + rev = "v${version}"; + hash = "sha256-RF4SGqaEx9/OMB5XEJNiPPPGg1uwTM5ta1gwpj8mbho="; + }; + + cargoHash = "sha256-UaOUEuh7NNIhXOKqHEfVRv1hXld7qmdPdazATalXvQU="; + + buildInputs = lib.optionals stdenv.isDarwin [ + darwin.apple_sdk.frameworks.Security + ]; + + meta = { + description = "A CLI tool for rustypaste"; + homepage = "https://github.com/orhun/rustypaste-cli"; + changelog = "https://github.com/orhun/rustypaste-cli/blob/${src.rev}/CHANGELOG.md"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ oluceps ]; + mainProgram = "rustypaste-cli"; + }; +}