mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-02 19:14:14 +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.
32 lines
1.0 KiB
Nix
32 lines
1.0 KiB
Nix
{ lib, rustPlatform, fetchCrate, installShellFiles, stdenv }:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "cauwugo";
|
|
version = "0.1.0";
|
|
|
|
src = fetchCrate {
|
|
inherit version;
|
|
pname = "bpaf_cauwugo";
|
|
hash = "sha256-9gWUu2qbscKlbWZlRbOn+rrmizegkHxPnwnAmpaV1Ww=";
|
|
};
|
|
|
|
cargoHash = "sha256-dXlSBb3ey3dAiifrQ9Bbhscnm1QmcChiQbX1ic069V4=";
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
|
installShellCompletion --cmd cauwugo \
|
|
--bash <($out/bin/cauwugo --bpaf-complete-style-bash) \
|
|
--fish <($out/bin/cauwugo --bpaf-complete-style-fish) \
|
|
--zsh <($out/bin/cauwugo --bpaf-complete-style-zsh)
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Alternative cargo frontend that implements dynamic shell completion for usual cargo commands";
|
|
mainProgram = "cauwugo";
|
|
homepage = "https://github.com/pacak/bpaf/tree/master/bpaf_cauwugo";
|
|
license = with licenses; [ mit /* or */ asl20 ];
|
|
maintainers = with maintainers; [ figsoda ];
|
|
};
|
|
}
|