diff options
author | isabel <isabel@isabelroses.com> | 2024-05-14 18:44:13 +0100 |
---|---|---|
committer | isabel <isabel@isabelroses.com> | 2024-05-15 14:11:00 +0100 |
commit | cd833bc84ed588a8a85345c02295e79106d80be7 (patch) | |
tree | 2c637330d21c573dc3f9e5c2ee37e7c6c083c774 /pkgs/by-name/gi | |
parent | c4ce542c774aa505fd80d86d9d5de51349328e43 (diff) |
gitprompt-rs: move to by-name
Diffstat (limited to 'pkgs/by-name/gi')
-rw-r--r-- | pkgs/by-name/gi/gitprompt-rs/package.nix | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/pkgs/by-name/gi/gitprompt-rs/package.nix b/pkgs/by-name/gi/gitprompt-rs/package.nix new file mode 100644 index 0000000000000..b7b1987ae53aa --- /dev/null +++ b/pkgs/by-name/gi/gitprompt-rs/package.nix @@ -0,0 +1,38 @@ +{ + lib, + fetchFromGitHub, + rustPlatform, + git, +}: +let + version = "0.3.0"; +in +rustPlatform.buildRustPackage { + pname = "gitprompt-rs"; + inherit version; + + src = fetchFromGitHub { + owner = "9ary"; + repo = "gitprompt-rs"; + rev = version; + hash = "sha256-BqI3LbG7I/0wjzJaP8bxRwTM56joLqVaQCmAydX5vQM="; + }; + + cargoHash = "sha256-KBBdhiXEZz1/w6Zr/LogyceBdCn1ebfkVgGbtcdAeis="; + + postPatch = '' + substituteInPlace src/main.rs \ + --replace 'Command::new("git")' 'Command::new("${git}/bin/git")' + ''; + + meta = { + description = "Simple Git prompt"; + homepage = "https://github.com/9ary/gitprompt-rs"; + license = lib.licenses.mpl20; + maintainers = with lib.maintainers; [ + isabelroses + cafkafk + ]; + mainProgram = "gitprompt-rs"; + }; +} |