mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-23 12:34:15 +00:00

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
799 B
Nix
35 lines
799 B
Nix
{ lib, stdenv, fetchFromGitHub, makeWrapper, git }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "git-test";
|
|
version = "1.0.4";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "spotify";
|
|
repo = "git-test";
|
|
rev = "v${version}";
|
|
sha256 = "01h3f0andv1p7pwir3k6n01v92hgr5zbjadfwl144yjw9x37fm2f";
|
|
};
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
dontBuild = true;
|
|
|
|
installPhase = ''
|
|
install -m755 -Dt $out/bin git-test
|
|
install -m444 -Dt $out/share/man/man1 git-test.1
|
|
|
|
wrapProgram $out/bin/git-test \
|
|
--prefix PATH : "${lib.makeBinPath [ git ]}"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Test your commits";
|
|
homepage = "https://github.com/spotify/git-test";
|
|
license = licenses.asl20;
|
|
maintainers = [ ];
|
|
platforms = platforms.all;
|
|
mainProgram = "git-test";
|
|
};
|
|
}
|