From f29a714fa632dd9317a80a824a304c9a9d03ed22 Mon Sep 17 00:00:00 2001 From: Sebastian Marquardt Date: Fri, 26 May 2023 16:11:22 +0200 Subject: [PATCH] please-cli: init at version 0.3.0 --- maintainers/maintainer-list.nix | 6 +++ pkgs/applications/misc/please-cli/default.nix | 45 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 3 files changed, 53 insertions(+) create mode 100644 pkgs/applications/misc/please-cli/default.nix diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index c4df505876fd..8a696426a7c2 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -177,6 +177,12 @@ githubId = 12578560; name = "Quinn Bohner"; }; + _8-bit-fox = { + email = "sebastian@markwaerter.de"; + github = "8-bit-fox"; + githubId = 43320117; + name = "Sebastian Marquardt"; + }; _9999years = { email = "rbt@fastmail.com"; github = "9999years"; diff --git a/pkgs/applications/misc/please-cli/default.nix b/pkgs/applications/misc/please-cli/default.nix new file mode 100644 index 000000000000..f21ef4203831 --- /dev/null +++ b/pkgs/applications/misc/please-cli/default.nix @@ -0,0 +1,45 @@ +{ lib +, curl +, fetchFromGitHub +, jq +, makeBinaryWrapper +, please-cli +, stdenv +, testers +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "please-cli"; + version = "0.3.0"; + + src = fetchFromGitHub { + owner = "TNG"; + repo = "please-cli"; + rev = "v${finalAttrs.version}"; + hash = "sha256-rJIR4eMhXL4K9iO7JxnkgWNsICV3hPQb0aobWNuHAG0="; + }; + + nativeBuildInputs = [ makeBinaryWrapper ]; + + installPhase = '' + runHook preInstall + install -Dm555 please.sh "$out/bin/please" + wrapProgram $out/bin/please \ + --prefix PATH : ${lib.makeBinPath [ curl jq ]} + runHook postInstall + ''; + + passthru.tests = testers.testVersion { + package = please-cli; + version = "v${finalAttrs.version}"; + }; + + meta = with lib; { + description = "An AI helper script to create CLI commands based on GPT prompts"; + homepage = "https://github.com/TNG/please-cli"; + license = licenses.asl20; + maintainers = with maintainers; [ _8-bit-fox ]; + mainProgram = "please"; + platforms = platforms.all; + }; +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 73ff9f5e1089..48049aa335c6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -31426,6 +31426,8 @@ with pkgs; pixinsight = libsForQt5.callPackage ../applications/graphics/pixinsight { }; + please-cli = callPackage ../applications/misc/please-cli { }; + protonup-qt = python3Packages.callPackage ../applications/misc/protonup-qt { }; pmbootstrap = python3Packages.callPackage ../tools/misc/pmbootstrap { };