nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 rustPlatform,
4 fetchFromGitHub,
5 installShellFiles,
6 stdenv,
7 testers,
8 conceal,
9}:
10
11rustPlatform.buildRustPackage (finalAttrs: {
12 pname = "conceal";
13 version = "0.6.2";
14
15 src = fetchFromGitHub {
16 owner = "TD-Sky";
17 repo = "conceal";
18 tag = "v${finalAttrs.version}";
19 hash = "sha256-B6vZ4Xl7H6KOlscys+FT8fMXb0Xrvosr2DXHzvRjLis=";
20 };
21
22 cargoHash = "sha256-aBc9ijRObFi9AyQxSoQZs/3exAzOlYq5uNqFfvjNhvw=";
23
24 env.CONCEAL_GEN_COMPLETIONS = "true";
25
26 nativeBuildInputs = [ installShellFiles ];
27
28 postInstall = ''
29 installShellCompletion \
30 completions/{cnc/cnc,conceal/conceal}.{bash,fish} \
31 --zsh completions/{cnc/_cnc,conceal/_conceal}
32 '';
33
34 # There are not any tests in source project.
35 doCheck = false;
36
37 passthru.tests = testers.testVersion {
38 package = conceal;
39 command = "conceal --version";
40 version = "conceal ${finalAttrs.version}";
41 };
42
43 meta = {
44 description = "Trash collector written in Rust";
45 homepage = "https://github.com/TD-Sky/conceal";
46 license = lib.licenses.mit;
47 maintainers = with lib.maintainers; [
48 jedsek
49 kashw2
50 ];
51 broken = stdenv.hostPlatform.isDarwin;
52 };
53})