settei/pkgs/default.nix
Nikodem Rabuliński 367fddb7c0 pkgs: add git-commit-last
Small helper which adds a command git commit-last, which,
as the name suggests, commits with the last commit message.
Useful when the commit fails for whatever reason
or something else happens during a commit.
2024-02-07 14:29:34 +01:00

22 lines
484 B
Nix

{inputs, ...}: {
perSystem = {
pkgs,
system,
inputs',
...
}: {
packages.conduit-next = pkgs.callPackage ./conduit {
src = inputs.conduit-src;
crane = inputs.crane.lib.${system};
fenix = inputs'.fenix.packages;
};
packages.git-commit-last = pkgs.writeShellApplication {
name = "git-commit-last";
text = ''
GITDIR="$(git rev-parse --git-dir)"
git commit -eF "$GITDIR/COMMIT_EDITMSG"
'';
};
};
}