nixpkgs/pkgs/development/tools/gptcommit/default.nix
2023-07-10 14:08:02 +08:00

47 lines
1.0 KiB
Nix

{ stdenv
, lib
, fetchFromGitHub
, rustPlatform
, pkg-config
, nix-update-script
, Security
, openssl
}:
let
pname = "gptcommit";
version = "0.5.10";
in
rustPlatform.buildRustPackage {
inherit pname version;
src = fetchFromGitHub {
owner = "zurawiki";
repo = pname;
rev = "v${version}";
sha256 = "sha256-W4AUP4OQCHWJ3BbuD7N9CowF4tPi9f1fmYZnAbG9Rq8=";
};
cargoSha256 = "sha256-KUM3ZV9pfR/kUktO2mk9uYpTscBwzAi2APHXBb0GH+U=";
nativeBuildInputs = [ pkg-config ];
# 0.5.6 release has failing tests
doCheck = false;
buildInputs = lib.optionals stdenv.isDarwin [ Security ] ++ lib.optionals stdenv.isLinux [ openssl ];
passthru = {
updateScript = nix-update-script { };
};
meta = with lib; {
description = "A git prepare-commit-msg hook for authoring commit messages with GPT-3. ";
homepage = "https://github.com/zurawiki/gptcommit";
license = with licenses; [ asl20 ];
maintainers = with maintainers; [ happysalada ];
platforms = with platforms; all;
};
}