From b4716ea17953b3e32ca431e79f752f9f02f08901 Mon Sep 17 00:00:00 2001 From: happysalada Date: Sat, 18 Feb 2023 22:54:22 -0500 Subject: [PATCH] gptcommit: init at 0.1.15 --- pkgs/development/tools/gptcommit/default.nix | 43 ++++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++ 2 files changed, 47 insertions(+) create mode 100644 pkgs/development/tools/gptcommit/default.nix diff --git a/pkgs/development/tools/gptcommit/default.nix b/pkgs/development/tools/gptcommit/default.nix new file mode 100644 index 000000000000..1485b8165649 --- /dev/null +++ b/pkgs/development/tools/gptcommit/default.nix @@ -0,0 +1,43 @@ +{ stdenv +, lib +, fetchFromGitHub +, rustPlatform +, pkg-config +, nix-update-script +, Security +, openssl +}: + +let + pname = "gptcommit"; + version = "0.1.15"; +in +rustPlatform.buildRustPackage { + inherit pname version; + + src = fetchFromGitHub { + owner = "zurawiki"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-ykcKvJJg+K2mDiz7hDYzoL1CYI1zOidlqz4xLUY1NW0="; + }; + + cargoSha256 = "sha256-/BASGNwfdAHLKdceRQe4GNfLy6uanHwH0yohGO7V60Q="; + + nativeBuildInputs = [ pkg-config ]; + + 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; + }; +} + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3a9a91a045bb..c9b992838fd2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7876,6 +7876,10 @@ with pkgs; gpt2tc = callPackage ../tools/text/gpt2tc { }; + gptcommit = callPackage ../development/tools/gptcommit { + inherit (darwin.apple_sdk.frameworks) Security; + }; + gptman = callPackage ../tools/system/gptman { }; ldmtool = callPackage ../tools/misc/ldmtool { };