Skip to content

Commit

Permalink
add git-squash
Browse files Browse the repository at this point in the history
  • Loading branch information
srid committed Oct 2, 2024
1 parent 19b0fe2 commit d99ada4
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
1 change: 1 addition & 0 deletions modules/home/all/git.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
{
home.packages = with pkgs; [
git-filter-repo
git-squash # https://github.com/sheerun/git-squash
];

programs.git = {
Expand Down
1 change: 1 addition & 0 deletions overlays/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 34 additions & 0 deletions packages/git-squash.nix
Original file line number Diff line number Diff line change
@@ -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
};
}

0 comments on commit d99ada4

Please sign in to comment.