mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-03 20:33:21 +00:00
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.
33 lines
995 B
Nix
33 lines
995 B
Nix
{ lib, stdenv, rustPlatform, fetchFromGitHub, installShellFiles }:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "kondo";
|
|
version = "0.8";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "tbillington";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-OqOmOujnyLTqwzNvLWudQi+xa5v37JTtyUXaItnpnfs=";
|
|
};
|
|
|
|
cargoHash = "sha256-WF4GHj/5VYrTUh1E3t29zbpSLjJ6g7RWVpLYqg9msZg=";
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
|
installShellCompletion --cmd kondo \
|
|
--bash <($out/bin/kondo --completions bash) \
|
|
--fish <($out/bin/kondo --completions fish) \
|
|
--zsh <($out/bin/kondo --completions zsh)
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Save disk space by cleaning unneeded files from software projects";
|
|
homepage = "https://github.com/tbillington/kondo";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ Br1ght0ne ];
|
|
mainProgram = "kondo";
|
|
};
|
|
}
|