2023-02-22 10:55:15 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, pkg-config
|
|
|
|
, nix-update-script
|
|
|
|
, Security
|
2023-10-19 13:55:26 +00:00
|
|
|
, SystemConfiguration
|
2023-02-22 10:55:15 +00:00
|
|
|
, openssl
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
pname = "gptcommit";
|
2024-10-11 05:15:48 +00:00
|
|
|
version = "0.5.17";
|
2023-02-22 10:55:15 +00:00
|
|
|
in
|
|
|
|
rustPlatform.buildRustPackage {
|
|
|
|
inherit pname version;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "zurawiki";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-10-11 05:15:48 +00:00
|
|
|
hash = "sha256-MB78QsJA90Au0bCUXfkcjnvfPagTPZwFhFVqxix+Clw=";
|
2023-02-22 10:55:15 +00:00
|
|
|
};
|
|
|
|
|
2024-10-11 05:15:48 +00:00
|
|
|
cargoHash = "sha256-F4nabUeQZMnmSNC8KlHjx3IcyR2Xn36kovabmJ6g1zo=";
|
2023-02-22 10:55:15 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
# 0.5.6 release has failing tests
|
|
|
|
doCheck = false;
|
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security SystemConfiguration ]
|
|
|
|
++ lib.optionals stdenv.hostPlatform.isLinux [ openssl ];
|
2023-02-22 10:55:15 +00:00
|
|
|
|
|
|
|
passthru = {
|
|
|
|
updateScript = nix-update-script { };
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-07-27 06:49:29 +00:00
|
|
|
description = "Git prepare-commit-msg hook for authoring commit messages with GPT-3.";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "gptcommit";
|
2023-02-22 10:55:15 +00:00
|
|
|
homepage = "https://github.com/zurawiki/gptcommit";
|
|
|
|
license = with licenses; [ asl20 ];
|
|
|
|
maintainers = with maintainers; [ happysalada ];
|
|
|
|
platforms = with platforms; all;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|