add git-squash

This commit is contained in:
Sridhar Ratnakumar 2024-10-02 16:12:33 -04:00
parent 19b0fe2e8f
commit d99ada42c2
No known key found for this signature in database
3 changed files with 36 additions and 0 deletions

View file

@ -2,6 +2,7 @@
{
home.packages = with pkgs; [
git-filter-repo
git-squash # https://github.com/sheerun/git-squash
];
programs.git = {

View file

@ -15,4 +15,5 @@ self: super: {
actualism-app = inputs.actualism-app.packages.${self.system}.default;
omnix = inputs.omnix.packages.${self.system}.default;
git-merge-and-delete = self.callPackage "${packages}/git-merge-and-delete.nix" { };
git-squash = self.callPackage "${packages}/git-squash.nix" { };
}

34
packages/git-squash.nix Normal file
View file

@ -0,0 +1,34 @@
{ lib
, stdenv
, fetchFromGitHub
, bash
, git
}:
stdenv.mkDerivation {
pname = "git-squash";
version = "0.3.0";
src = fetchFromGitHub {
owner = "sheerun";
repo = "git-squash";
rev = "master";
sha256 = "sha256-yvufKIwjP7VcIzLi8mE228hN4jmaqk90c8oxJtkXEP8=";
};
nativeBuildInputs = [ bash git ];
installPhase = ''
mkdir -p $out/bin
cp git-squash $out/bin/git-squash
chmod +x $out/bin/git-squash
'';
meta = with lib; {
description = "A Git command for squashing commits";
homepage = "https://github.com/sheerun/git-squash";
license = licenses.mit; # Adjust if the actual license is different
platforms = platforms.all;
maintainers = [ ]; # You can add maintainers if needed
};
}