This commit is contained in:
Erwin Boskma 2024-03-11 17:47:51 +01:00
parent 323b0291df
commit 7b82251c57
Signed by: erwin
SSH key fingerprint: SHA256:/Wk1WZdLg+vQHs3in9qq7PsIp8SMzwGSk/RLZ5zPuZk
4 changed files with 52 additions and 1 deletions

View file

@ -231,6 +231,7 @@
packages = {
incus-ui = pkgs.callPackage ./pkgs/incus-ui { };
openfga = pkgs.callPackage ./pkgs/openfga { };
gitu = pkgs.callPackage ./pkgs/gitu { };
};
devShells.default =

View file

@ -176,6 +176,9 @@ in
};
};
home.packages = [ pkgs.git-credential-manager ];
home.packages = [
pkgs.git-credential-manager
pkgs.gitu
];
};
}

View file

@ -44,4 +44,5 @@ _final: prev: {
incus-ui = prev.pkgs.callPackage ../pkgs/incus-ui { };
openfga = prev.pkgs.callPackage ../pkgs/openfga { };
gitu = prev.pkgs.callPackage ../pkgs/gitu { };
}

46
pkgs/gitu/default.nix Normal file
View file

@ -0,0 +1,46 @@
{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
libgit2,
openssl,
zlib,
stdenv,
darwin,
git,
}:
rustPlatform.buildRustPackage rec {
pname = "gitu";
version = "0.5.4";
src = fetchFromGitHub {
owner = "altsem";
repo = "gitu";
rev = "v${version}";
hash = "sha256-a4hNgEizxanYE3XuHSCmbV6CkOqhXkznP3Sp0KLFFQs=";
};
cargoHash = "sha256-+CA3UG32oZedzRbt7b0wOlhH/subuym4BCL5SMNzrr8=";
nativeBuildInputs = [
pkg-config
git
];
buildInputs = [
libgit2
openssl
zlib
] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ];
meta = with lib; {
description = "A TUI Git client inspired by Magit";
homepage = "https://github.com/altsem/gitu";
changelog = "https://github.com/altsem/gitu/blob/${src.rev}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ ];
mainProgram = "gitu";
};
}