nixpkgs/pkgs/applications/version-management/git-vendor/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

68 lines
1.8 KiB
Nix
Raw Normal View History

2021-05-25 22:06:04 +02:00
{ lib, stdenv, fetchFromGitHub, writeShellScriptBin, skawarePackages
}:
let
2022-02-28 07:32:33 +01:00
version = "1.3.0";
sha256 = "sha256-CFv9gZQHeEiZctJFyB6PJ1dVNkrQ7PlVtgZuteQQTJ0=";
2021-05-25 22:06:04 +02:00
in stdenv.mkDerivation {
pname = "git-vendor";
inherit version;
src = fetchFromGitHub {
owner = "brettlangdon";
repo = "git-vendor";
rev = "v${version}";
inherit sha256;
};
outputs = [ "bin" "man" "doc" "out" ];
PREFIX = (placeholder "out");
BINPREFIX = "${placeholder "bin"}/bin";
MANPREFIX = "${placeholder "man"}/share/man/man1";
buildInputs = [
# stubbing out a `git config` check that `make install` tries to do
(writeShellScriptBin "git" "")
];
postInstall = ''
${skawarePackages.cleanPackaging.commonFileActions {
docFiles = [
"LICENSE"
"README.md"
];
noiseFiles = [
"bin/git-vendor"
"Makefile"
"etc/bash_completion.sh"
"man"
"install.sh"
];
}} $doc/share/doc/git-vendor
'';
postFixup = ''
${skawarePackages.cleanPackaging.checkForRemainingFiles}
'';
meta = {
description = "Git command for managing vendored dependencies";
longDescription = ''
git-vendor is a wrapper around git-subtree commands for checking out and updating vendored dependencies.
By default git-vendor conforms to the pattern used for vendoring golang dependencies:
* Dependencies are stored under vendor/ directory in the repo.
* Dependencies are stored under the fully qualified project path.
e.g. https://github.com/brettlangdon/forge will be stored under vendor/github.com/brettlangdon/forge.
'';
homepage = "https://github.com/brettlangdon/git-vendor";
license = lib.licenses.mit;
maintainers = [ ];
2021-05-25 22:06:04 +02:00
platforms = lib.platforms.all;
2023-11-27 02:17:53 +01:00
mainProgram = "git-vendor";
2021-05-25 22:06:04 +02:00
};
}