git-recent: cleanup, refactor (#446131)

Changed files
+51 -52
pkgs
applications
version-management
git-recent
by-name
gi
git-recent
top-level
-48
pkgs/applications/version-management/git-recent/default.nix
···
-
{
-
lib,
-
stdenv,
-
git,
-
less,
-
fetchFromGitHub,
-
makeWrapper,
-
# util-linuxMinimal is included because we need the column command
-
util-linux,
-
}:
-
-
stdenv.mkDerivation rec {
-
pname = "git-recent";
-
version = "2.0.4";
-
-
src = fetchFromGitHub {
-
owner = "paulirish";
-
repo = "git-recent";
-
rev = "v${version}";
-
sha256 = "sha256-b6AWLEXCOza+lIHlvyYs3M6yHGr2StYXzl7OsA9gv/k=";
-
};
-
-
nativeBuildInputs = [ makeWrapper ];
-
-
buildPhase = null;
-
-
installPhase = ''
-
mkdir -p $out/bin
-
cp git-recent $out/bin
-
wrapProgram $out/bin/git-recent \
-
--prefix PATH : "${
-
lib.makeBinPath [
-
git
-
less
-
util-linux
-
]
-
}"
-
'';
-
-
meta = with lib; {
-
homepage = "https://github.com/paulirish/git-recent";
-
description = "See your latest local git branches, formatted real fancy";
-
license = licenses.mit;
-
platforms = platforms.all;
-
maintainers = [ maintainers.jlesquembre ];
-
mainProgram = "git-recent";
-
};
-
}
+51
pkgs/by-name/gi/git-recent/package.nix
···
+
{
+
lib,
+
stdenv,
+
fetchFromGitHub,
+
makeBinaryWrapper,
+
gitMinimal,
+
less,
+
util-linuxMinimal,
+
}:
+
+
stdenv.mkDerivation (finalAttrs: {
+
pname = "git-recent";
+
version = "2.0.4";
+
+
src = fetchFromGitHub {
+
owner = "paulirish";
+
repo = "git-recent";
+
tag = "v${finalAttrs.version}";
+
hash = "sha256-b6AWLEXCOza+lIHlvyYs3M6yHGr2StYXzl7OsA9gv/k=";
+
};
+
+
nativeBuildInputs = [ makeBinaryWrapper ];
+
+
dontBuild = true;
+
+
installPhase = ''
+
runHook preInstall
+
+
install -D -m755 -t $out/bin git-recent
+
+
wrapProgram $out/bin/git-recent \
+
--prefix PATH : "${
+
lib.makeBinPath [
+
gitMinimal
+
less
+
util-linuxMinimal
+
]
+
}"
+
+
runHook postInstall
+
'';
+
+
meta = {
+
homepage = "https://github.com/paulirish/git-recent";
+
description = "See your latest local git branches, formatted real fancy";
+
license = lib.licenses.mit;
+
platforms = lib.platforms.all;
+
maintainers = [ lib.maintainers.jlesquembre ];
+
mainProgram = "git-recent";
+
};
+
})
-4
pkgs/top-level/all-packages.nix
···
git-credential-manager = callPackage ../applications/version-management/git-credential-manager { };
-
git-recent = callPackage ../applications/version-management/git-recent {
-
util-linux = if stdenv.hostPlatform.isLinux then util-linuxMinimal else util-linux;
-
};
-
gitRepo = git-repo;
gittyup = libsForQt5.callPackage ../applications/version-management/gittyup { };