python312Packages.recurring-ical-events: 3.3.4 -> 3.4.0 (#372089)
[NixPkgs.git] / pkgs / by-name / ra / rage / package.nix
blob35b74c1e6e649bb34ccfb55cf6eec7836598e32f
2   lib,
3   stdenv,
4   rustPlatform,
5   fetchFromGitHub,
6   installShellFiles,
7   darwin,
8 }:
10 rustPlatform.buildRustPackage rec {
11   pname = "rage";
12   version = "0.11.1";
14   src = fetchFromGitHub {
15     owner = "str4d";
16     repo = pname;
17     rev = "v${version}";
18     hash = "sha256-aZs1iqfpsiMuhxXNqRatpKD99eDBCsWHk4OPpnnaB70=";
19   };
21   cargoHash = "sha256-2cbW5GexETIjDzKjeYB7my3Q7Ev5fRrWh8eaBYZLmGM=";
23   nativeBuildInputs = [
24     installShellFiles
25   ];
27   buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
28     darwin.apple_sdk.frameworks.Foundation
29   ];
31   # cargo test has an x86-only dependency
32   doCheck = stdenv.hostPlatform.isx86;
34   postInstall = ''
35     installManPage target/*/release/manpages/man1/*
36     installShellCompletion \
37       --bash target/*/release/completions/*.bash \
38       --fish target/*/release/completions/*.fish \
39       --zsh target/*/release/completions/_*
40   '';
42   meta = with lib; {
43     description = "Simple, secure and modern encryption tool with small explicit keys, no config options, and UNIX-style composability";
44     homepage = "https://github.com/str4d/rage";
45     changelog = "https://github.com/str4d/rage/blob/v${version}/rage/CHANGELOG.md";
46     license = with licenses; [
47       asl20
48       mit
49     ]; # either at your option
50     maintainers = with maintainers; [ ryantm ];
51     mainProgram = "rage";
52   };