nixpkgs/pkgs/by-name/gi/git-vanity-hash/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
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.
2024-11-09 20:04:51 +08:00

34 lines
832 B
Nix

{
lib,
fetchFromGitHub,
rustPlatform,
}:
rustPlatform.buildRustPackage {
pname = "git-vanity-hash";
version = "1.0.0";
src = fetchFromGitHub {
owner = "prasmussen";
repo = "git-vanity-hash";
# v1.0.0 + build fix
rev = "a80e7725ac6d0b7e6807cd7315cfdc7eaf0584f6";
hash = "sha256-1z4jbtzUB3SH79dDXAITf7Vup1YZdTLHBieSrhrvSXc=";
};
cargoHash = "sha256-+SQ0HpURBjnnwH1Ue7IUReOtI4LxVPK9AGSAihs0qsc=";
postInstall = ''
mkdir -p $out/share/doc/git-vanity-hash
cp README.md $out/share/doc/git-vanity-hash
'';
meta = with lib; {
homepage = "https://github.com/prasmussen/git-vanity-hash";
description = "Tool for creating commit hashes with a specific prefix";
license = [ licenses.mit ];
maintainers = [ maintainers.kaction ];
mainProgram = "git-vanity-hash";
};
}