From e41eb4356b5ce5efb50f389ba7b54f76d3a3d246 Mon Sep 17 00:00:00 2001 From: Nathaniel Brough Date: Fri, 24 Nov 2023 14:31:19 -0800 Subject: [PATCH] promptfoo: Add promptfoo package --- pkgs/by-name/pr/promptfoo/package.nix | 28 +++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 pkgs/by-name/pr/promptfoo/package.nix diff --git a/pkgs/by-name/pr/promptfoo/package.nix b/pkgs/by-name/pr/promptfoo/package.nix new file mode 100644 index 000000000000..f7b6aeb07a40 --- /dev/null +++ b/pkgs/by-name/pr/promptfoo/package.nix @@ -0,0 +1,28 @@ +{ buildNpmPackage +, fetchFromGitHub +, lib +}: + +buildNpmPackage rec { + pname = "promptfoo"; + version = "0.28.0"; + + src = fetchFromGitHub { + owner = "promptfoo"; + repo = "promptfoo"; + rev = "${version}"; + hash = "sha256-fJZeao5/iTF1QTSdhUT4VurH0witOAVs0NT2sb2McYM="; + }; + + npmDepsHash = "sha256-IcMD8t+2Z2RwQ87j08zNQWlNhtRqDi2cD60ZPEAezww="; + + dontNpmBuild = true; + + meta = with lib; { + description = "Test your prompts, models, RAGs. Evaluate and compare LLM outputs, catch regressions, and improve prompt quality."; + homepage = "https://www.promptfoo.dev/"; + changelog = "https://github.com/promptfoo/promptfoo/releases/tag/${version}"; + license = licenses.mit; + maintainers = [ maintainers.nathanielbrough ]; + }; +}