-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2e877e8
commit 34be0e0
Showing
2 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5167,13 +5167,20 @@ | |
github = "deadbaed"; | ||
githubId = 8809909; | ||
}; | ||
|
||
dearrude = { | ||
name = "Ebrahim Nejati"; | ||
email = "[email protected]"; | ||
github = "DearRude"; | ||
githubId = 30749142; | ||
keys = [ { fingerprint = "4E35 F2E5 2132 D654 E815 A672 DB2C BC24 2868 6000"; } ]; | ||
}; | ||
deathraymind = { | ||
name = "Bowyn Rosch"; | ||
email = "[email protected]"; | ||
github = "deathraymind"; | ||
githubId = 116578035; | ||
}; | ||
declan = { | ||
name = "Declan Rixon"; | ||
email = "[email protected]"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
lib, | ||
fetchFromGitHub, | ||
rustPlatform, | ||
installShellFiles, | ||
makeWrapper, | ||
fzf, | ||
stdenv, | ||
nix-update-script, | ||
}: | ||
|
||
rustPlatform.buildRustPackage rec { | ||
pname = "git-smash"; | ||
version = "0.1.1"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "anthraxx"; | ||
repo = "git-smash"; | ||
rev = "refs/tags/v${version}"; | ||
hash = "sha256-NyNYEF5g0O9xNhq+CoDPhQXZ+ISiY4DsShpjk5nP0N8="; | ||
}; | ||
|
||
cargoHash = "sha256-omITZMBWzYlHHim/IXNa1rtiwHqpgLJ5G9z15YvDRi0="; | ||
|
||
nativeBuildInputs = [ | ||
installShellFiles | ||
makeWrapper | ||
]; | ||
|
||
postFixup = '' | ||
wrapProgram "$out/bin/git-smash" --suffix PATH : "${lib.makeBinPath [ fzf ]}" | ||
''; | ||
|
||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' | ||
installShellCompletion --cmd git-smash \ | ||
--bash <($out/bin/git-smash completions bash) \ | ||
--fish <($out/bin/git-smash completions fish) \ | ||
--zsh <($out/bin/git-smash completions zsh) | ||
''; | ||
|
||
passthru.updateScript = nix-update-script { }; | ||
|
||
meta = { | ||
description = "Smash staged changes into previous commits to support your Git workflow, pull request and feature branch maintenance"; | ||
homepage = "https://github.com/anthraxx/git-smash"; | ||
changelog = "https://github.com/anthraxx/git-smash/blob/${src.rev}/CHANGELOG.md"; | ||
license = lib.licenses.mit; | ||
mainProgram = "git-smash"; | ||
maintainers = with lib.maintainers; [ bcyran ]; | ||
}; | ||
} |