2022-04-27 09:35:20 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
2024-02-07 01:22:34 +00:00
|
|
|
, darwin
|
2022-04-27 09:35:20 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "rage";
|
2024-02-07 01:22:34 +00:00
|
|
|
version = "0.10.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "str4d";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-02-07 01:22:34 +00:00
|
|
|
hash = "sha256-7PfNDFDuvQ9T3BeA15FuY1jAprGLsyglWXcNrZvtPAE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
cargoHash = "sha256-5aLT0JfeFj0fZP/1sHXulCQtoquHYriapMdPtN+fxko=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
installShellFiles
|
|
|
|
];
|
2020-06-18 07:06:33 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [
|
2024-02-07 01:22:34 +00:00
|
|
|
darwin.apple_sdk.frameworks.Foundation
|
2020-12-07 07:45:13 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
# cargo test has an x86-only dependency
|
|
|
|
doCheck = stdenv.hostPlatform.isx86;
|
|
|
|
|
2020-06-18 07:06:33 +00:00
|
|
|
postInstall = ''
|
2024-02-07 01:22:34 +00:00
|
|
|
installManPage target/*/release/manpages/man1/*
|
|
|
|
installShellCompletion \
|
|
|
|
--bash target/*/release/completions/*.bash \
|
|
|
|
--fish target/*/release/completions/*.fish \
|
|
|
|
--zsh target/*/release/completions/_*
|
2020-06-18 07:06:33 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Simple, secure and modern encryption tool with small explicit keys, no config options, and UNIX-style composability";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/str4d/rage";
|
2024-02-07 01:22:34 +00:00
|
|
|
changelog = "https://github.com/str4d/rage/blob/v${version}/rage/CHANGELOG.md";
|
2020-11-24 20:58:05 +00:00
|
|
|
license = with licenses; [ asl20 mit ]; # either at your option
|
2024-05-15 15:35:15 +00:00
|
|
|
maintainers = with maintainers; [ ryantm ];
|
2023-08-04 22:07:22 +00:00
|
|
|
mainProgram = "rage";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|