git-vendor: init at 1.2.0

This commit is contained in:
Profpatsch 2021-05-25 22:06:04 +02:00
parent 66e7fcf53f
commit 005702524a
2 changed files with 68 additions and 0 deletions

View file

@ -0,0 +1,66 @@
{ lib, stdenv, fetchFromGitHub, writeShellScriptBin, skawarePackages
}:
let
version = "1.2.0";
sha256 = "1z9fmrfxqi56pj7f1506q2z41crz702jk88gv57baf6fz63m93v2";
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 = "A 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 = [ lib.maintainers.Profpatsch ];
platforms = lib.platforms.all;
};
}

View file

@ -5080,6 +5080,8 @@ in
git-vanity-hash = callPackage ../applications/version-management/git-and-tools/git-vanity-hash { }; git-vanity-hash = callPackage ../applications/version-management/git-and-tools/git-vanity-hash { };
git-vendor = callPackage ../applications/version-management/git-and-tools/git-vendor { };
git-when-merged = callPackage ../applications/version-management/git-and-tools/git-when-merged { }; git-when-merged = callPackage ../applications/version-management/git-and-tools/git-when-merged { };
git-workspace = callPackage ../applications/version-management/git-and-tools/git-workspace { git-workspace = callPackage ../applications/version-management/git-and-tools/git-workspace {