nixpkgs/pkgs/applications/misc/please-cli/default.nix
Alexis Hildebrandt 755b915a15 treewide: Remove indefinite article from meta.description
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \
  | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
2024-06-09 23:07:45 +02:00

46 lines
1022 B
Nix

{ 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 = "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;
};
})