Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / applications / misc / conceal / default.nix
blob177162499230cf1df6c28cc063aa42139354b651
1 { lib, rustPlatform, fetchFromGitHub, installShellFiles, stdenv, testers, conceal }:
3 rustPlatform.buildRustPackage rec {
4   pname = "conceal";
5   version = "0.4.1";
7   src = fetchFromGitHub {
8     owner = "TD-Sky";
9     repo = pname;
10     rev = "v${version}";
11     sha256 = "sha256-zrG4AE8I1nVvEGNvi7tOsqn6yNOqpRmhJzbuJINnJBw=";
12   };
14   cargoLock = {
15     lockFile = ./Cargo.lock;
16     outputHashes = {
17       "trash-3.0.1" = "sha256-6GTdT7pVy9yVMeZglPUS4kub2xVLW1h1uynE6zX3w98=";
18     };
19   };
21   nativeBuildInputs = [ installShellFiles ];
23   postInstall = ''
24     installShellCompletion \
25       completions/{cnc/cnc,conceal/conceal}.{bash,fish} \
26       --zsh completions/{cnc/_cnc,conceal/_conceal}
27   '';
29   # There are not any tests in source project.
30   doCheck = false;
32   passthru.tests = testers.testVersion {
33     package = conceal;
34     command = "conceal --version";
35     version = "conceal ${version}";
36   };
38   meta = with lib; {
39     description = "A trash collector written in Rust";
40     homepage = "https://github.com/TD-Sky/conceal";
41     license = licenses.mit;
42     maintainers = with maintainers; [ jedsek kashw2 ];
43     broken = stdenv.isDarwin;
44   };