2022-11-21 17:40:18 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, git, makeWrapper, which, installShellFiles }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "git-subrepo";
|
2022-11-21 17:40:18 +00:00
|
|
|
version = "0.4.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ingydotnet";
|
|
|
|
repo = "git-subrepo";
|
|
|
|
rev = version;
|
2022-11-21 17:40:18 +00:00
|
|
|
sha256 = "sha256-ZU5yYaiear5AjlBqtzabmMJNUa2ypeJKW3sQPIcyskM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
makeWrapper
|
|
|
|
which
|
2022-11-21 17:40:18 +00:00
|
|
|
installShellFiles
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
git
|
|
|
|
];
|
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
"PREFIX=${placeholder "out"}"
|
|
|
|
"INSTALL_LIB=${placeholder "out"}/bin"
|
|
|
|
"INSTALL_MAN=${placeholder "out"}/share/man/man1"
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
2022-11-21 17:40:18 +00:00
|
|
|
installShellCompletion --bash --name git-subrepo.bash share/completion.bash
|
|
|
|
installShellCompletion --zsh share/zsh-completion/_git-subrepo
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
wrapProgram $out/bin/git-subrepo \
|
|
|
|
--prefix PATH : "${git}/bin"
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/ingydotnet/git-subrepo";
|
|
|
|
description = "Git submodule alternative";
|
|
|
|
license = licenses.mit;
|
2022-11-21 17:40:18 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ ryantrinkle ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|