From ce563f610557f4e2659c9b3a567bbf46116736bf Mon Sep 17 00:00:00 2001 From: novenary Date: Sun, 22 Jan 2023 20:36:51 +0200 Subject: [PATCH] gitprompt-rs: init at 0.3.0 --- .../gitprompt-rs/default.nix | 27 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 29 insertions(+) create mode 100644 pkgs/applications/version-management/gitprompt-rs/default.nix diff --git a/pkgs/applications/version-management/gitprompt-rs/default.nix b/pkgs/applications/version-management/gitprompt-rs/default.nix new file mode 100644 index 000000000000..6980c8f22576 --- /dev/null +++ b/pkgs/applications/version-management/gitprompt-rs/default.nix @@ -0,0 +1,27 @@ +{ lib, fetchFromGitHub, rustPlatform, git }: + +rustPlatform.buildRustPackage rec { + pname = "gitprompt-rs"; + version = "0.3.0"; + + src = fetchFromGitHub { + owner = "9ary"; + repo = pname; + rev = version; + sha256 = "00xxz7awk01981daabp8m3kwq127y733ynijiwqgs8xvn4nkg8h6"; + }; + + cargoSha256 = "0avs833vb6q1avjbfygm55s83iy942xgqsx6qdzksry44n35s418"; + + postPatch = '' + substituteInPlace src/main.rs \ + --replace 'Command::new("git")' 'Command::new("${git}/bin/git")' + ''; + + meta = with lib; { + description = "Simple Git prompt"; + homepage = "https://github.com/9ary/gitprompt-rs"; + license = with licenses; [ mpl20 ]; + maintainers = with maintainers; [ novenary ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 819c43791048..1a0c6950990b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1882,6 +1882,8 @@ with pkgs; gitnuro = callPackage ../applications/version-management/gitnuro { }; + gitprompt-rs = callPackage ../applications/version-management/gitprompt-rs/default.nix { }; + gitsign = callPackage ../applications/version-management/gitsign { }; gitstats = callPackage ../applications/version-management/gitstats { };