2023-10-09 19:29:22 +00:00
|
|
|
{ lib, rustPlatform, fetchFromGitHub, installShellFiles, stdenv, testers, conceal }:
|
2023-04-12 12:48:02 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "conceal";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "0.4.1";
|
2023-04-12 12:48:02 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "TD-Sky";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-10-09 19:29:22 +00:00
|
|
|
sha256 = "sha256-zrG4AE8I1nVvEGNvi7tOsqn6yNOqpRmhJzbuJINnJBw=";
|
2023-04-12 12:48:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
cargoLock = {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
outputHashes = {
|
|
|
|
"trash-3.0.1" = "sha256-6GTdT7pVy9yVMeZglPUS4kub2xVLW1h1uynE6zX3w98=";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion \
|
|
|
|
completions/{cnc/cnc,conceal/conceal}.{bash,fish} \
|
|
|
|
--zsh completions/{cnc/_cnc,conceal/_conceal}
|
|
|
|
'';
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
# There are not any tests in source project.
|
2023-04-12 12:48:02 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
passthru.tests = testers.testVersion {
|
|
|
|
package = conceal;
|
|
|
|
command = "conceal --version";
|
|
|
|
version = "conceal ${version}";
|
|
|
|
};
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Trash collector written in Rust";
|
2023-04-12 12:48:02 +00:00
|
|
|
homepage = "https://github.com/TD-Sky/conceal";
|
|
|
|
license = licenses.mit;
|
2023-10-09 19:29:22 +00:00
|
|
|
maintainers = with maintainers; [ jedsek kashw2 ];
|
2023-05-24 13:37:59 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2023-04-12 12:48:02 +00:00
|
|
|
};
|
|
|
|
}
|