nixpkgs/pkgs/applications/version-management/git-and-tools/git-vanity-hash/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00

28 lines
795 B
Nix

{ lib, stdenv, fetchFromGitHub, rustPlatform }:
rustPlatform.buildRustPackage rec {
pname = "git-vanity-hash";
version = "2020-02-26-unstable";
src = fetchFromGitHub {
owner = "prasmussen";
repo = "git-vanity-hash";
rev = "000004122124005af8d118a3f379bfc6ecc1e7c7";
sha256 = "1wf342zawbphlzvji0yba0qg4f6v67h81nhxqcsir132jv397ma7";
};
cargoSha256 = "0mbdis1kxmgj3wlgznr9bqf5yv0jwlj2f63gr5c99ja0ijccp99h";
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 ];
};
}