From 34be0e05b0e5f531ff42bc757b10a379a2c30f0c Mon Sep 17 00:00:00 2001 From: Deathraymind Date: Fri, 22 Nov 2024 18:46:11 +0900 Subject: [PATCH] maintainers: add deathraymind --- maintainers/maintainer-list.nix | 7 ++++ pkgs/by-name/gi/git-smash/package.nix | 51 +++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 pkgs/by-name/gi/git-smash/package.nix diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index e4ce300f7cdad..c08ac0d3077a2 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -5167,6 +5167,7 @@ github = "deadbaed"; githubId = 8809909; }; + dearrude = { name = "Ebrahim Nejati"; email = "dearrude@tfwno.gf"; @@ -5174,6 +5175,12 @@ githubId = 30749142; keys = [ { fingerprint = "4E35 F2E5 2132 D654 E815 A672 DB2C BC24 2868 6000"; } ]; }; + deathraymind = { + name = "Bowyn Rosch"; + email = "deathraymind@gmail.com"; + github = "deathraymind"; + githubId = 116578035; + }; declan = { name = "Declan Rixon"; email = "declan.fraser.rixon@gmail.com"; diff --git a/pkgs/by-name/gi/git-smash/package.nix b/pkgs/by-name/gi/git-smash/package.nix new file mode 100644 index 0000000000000..3d0be16148a64 --- /dev/null +++ b/pkgs/by-name/gi/git-smash/package.nix @@ -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 ]; + }; +}