571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
35 lines
923 B
Nix
35 lines
923 B
Nix
{ rustPlatform, fetchFromGitHub, lib, installShellFiles }:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "tre-command";
|
|
version = "0.4.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "dduan";
|
|
repo = "tre";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-JlkONhXMWLzxAf3SYoLkSvXw4bFYBnsCyyj0TUsezwg=";
|
|
};
|
|
|
|
cargoHash = "sha256-b3fScJMG/CIkMrahbELLQp1otmT5En+p8kQsip05SOc=";
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
preFixup = ''
|
|
installManPage manual/tre.1
|
|
installShellCompletion scripts/completion/tre.{bash,fish}
|
|
installShellCompletion --zsh scripts/completion/_tre
|
|
'';
|
|
|
|
# this test requires package to be in a git repo to succeed
|
|
checkFlags = [ "--skip" "respect_git_ignore" ];
|
|
|
|
meta = with lib; {
|
|
description = "Tree command, improved";
|
|
homepage = "https://github.com/dduan/tre";
|
|
license = licenses.mit;
|
|
maintainers = [ maintainers.dduan ];
|
|
mainProgram = "tre";
|
|
};
|
|
}
|