diff options
Diffstat (limited to 'pkgs/by-name/pr')
-rw-r--r-- | pkgs/by-name/pr/presenterm/package.nix | 18 | ||||
-rw-r--r-- | pkgs/by-name/pr/pretalx/package.nix | 201 | ||||
-rw-r--r-- | pkgs/by-name/pr/prometheus-restic-exporter/package.nix | 49 | ||||
-rw-r--r-- | pkgs/by-name/pr/promptfoo/package.nix | 6 | ||||
-rw-r--r-- | pkgs/by-name/pr/protoc-gen-js/package.nix | 37 | ||||
-rw-r--r-- | pkgs/by-name/pr/prowler/package.nix | 69 |
6 files changed, 373 insertions, 7 deletions
diff --git a/pkgs/by-name/pr/presenterm/package.nix b/pkgs/by-name/pr/presenterm/package.nix index ba1de5d9fb81..f637a77b4ff0 100644 --- a/pkgs/by-name/pr/presenterm/package.nix +++ b/pkgs/by-name/pr/presenterm/package.nix @@ -2,30 +2,40 @@ , fetchFromGitHub , rustPlatform , libsixel +, testers +, presenterm +, stdenv }: rustPlatform.buildRustPackage rec { pname = "presenterm"; - version = "0.4.1"; + version = "0.5.0"; src = fetchFromGitHub { owner = "mfontanini"; repo = "presenterm"; rev = "refs/tags/v${version}"; - hash = "sha256-OHp/qbuaZ7uVydKGnSiBR5KQGdf8rWQQWRHrka+PI1M="; + hash = "sha256-VAcK02dbtuTGn+lPu1vb/wAkroHuHqsU2KYHBiP2Org="; }; buildInputs = [ libsixel ]; - cargoHash = "sha256-ymSTloz7sPAtMZN1uDgLs89gMcU+UTsMVc6y5UHt7no="; + cargoHash = "sha256-bufFiyqRsn4eG57bKn42p5cyX+Z7oiz/USZvg9YOvHA="; - buildFeatures = [ "sixel" ]; + # Crashes at runtime on darwin with: + # Library not loaded: .../out/lib/libsixel.1.dylib + buildFeatures = lib.optionals (!stdenv.isDarwin) [ "sixel" ]; # Skip test that currently doesn't work checkFlags = [ "--skip=execute::test::shell_code_execution" ]; + passthru.tests.version = testers.testVersion { + package = presenterm; + command = "presenterm --version"; + }; + meta = with lib; { description = "A terminal based slideshow tool"; changelog = "https://github.com/mfontanini/presenterm/releases/tag/v${version}"; diff --git a/pkgs/by-name/pr/pretalx/package.nix b/pkgs/by-name/pr/pretalx/package.nix new file mode 100644 index 000000000000..a4bf9fc9b5ef --- /dev/null +++ b/pkgs/by-name/pr/pretalx/package.nix @@ -0,0 +1,201 @@ +{ lib +, buildNpmPackage +, gettext +, python3 +, fetchFromGitHub +, nixosTests +}: + +let + python = python3.override { + packageOverrides = final: prev: { + django-bootstrap4 = prev.django-bootstrap4.overridePythonAttrs (oldAttrs: rec { + version = "3.0.0"; + src = oldAttrs.src.override { + rev = "v${version}"; + hash = "sha256-a8BopUwZjmvxOzBVqs4fTo0SY8sEEloGUw90daYWfz8="; + }; + + propagatedBuildInputs = with final; [ + beautifulsoup4 + django + ]; + + # fails with some assertions + doCheck = false; + }); + }; + }; + + version = "2023.1.3"; + + src = fetchFromGitHub { + owner = "pretalx"; + repo = "pretalx"; + rev = "v${version}"; + hash = "sha256-YxmkjfftNrInIcSkK21wJXiEU6hbdDa1Od8p+HiLprs="; + }; + + meta = with lib; { + description = "Conference planning tool: CfP, scheduling, speaker management"; + homepage = "https://github.com/pretalx/pretalx"; + license = licenses.asl20; + maintainers = teams.c3d2.members; + platforms = platforms.linux; + }; + + frontend = buildNpmPackage { + pname = "pretalx-frontend"; + inherit version src; + + sourceRoot = "${src.name}/src/pretalx/frontend/schedule-editor"; + + npmDepsHash = "sha256-4cnBHZ8WpHgp/bbsYYbdtrhuD6ffUAZq9ZjoLpWGfRg="; + + npmBuildScript = "build"; + + inherit meta; + }; +in +python.pkgs.buildPythonApplication rec { + pname = "pretalx"; + inherit version src; + pyproject = true; + + outputs = [ + "out" + "static" + ]; + + postPatch = '' + substituteInPlace src/pretalx/common/management/commands/rebuild.py \ + --replace 'subprocess.check_call(["npm", "run", "build"], cwd=frontend_dir, env=env)' "" + + substituteInPlace src/setup.cfg \ + --replace "--cov=./" "" + ''; + + nativeBuildInputs = [ + gettext + python.pkgs.pythonRelaxDepsHook + ]; + + pythonRelaxDeps = [ + "bleach" + "cssutils" + "django-filter" + "django-formtools" + "libsass" + "markdown" + "pillow" + ]; + + propagatedBuildInputs = with python.pkgs; [ + beautifulsoup4 + bleach + celery + css-inline + csscompressor + cssutils + defusedcsv + django + django-bootstrap4 + django-compressor + django-context-decorator + django-countries + django-csp + django-filter + django-formset-js-improved + django-formtools + django-hierarkey + django-i18nfield + django-libsass + django-scopes + djangorestframework + libsass + markdown + pillow + publicsuffixlist + python-dateutil + qrcode + reportlab + requests + rules + urlman + vobject + whitenoise + zxcvbn + ] ++ beautifulsoup4.optional-dependencies.lxml; + + passthru.optional-dependencies = { + mysql = with python.pkgs; [ + mysqlclient + ]; + postgres = with python.pkgs; [ + psycopg2 + ]; + redis = with python.pkgs; [ + redis + ]; + }; + + postBuild = '' + rm -r ./src/pretalx/frontend/schedule-editor + ln -s ${frontend}/lib/node_modules/@pretalx/schedule-editor ./src/pretalx/frontend/schedule-editor + + # Generate all static files, see https://docs.pretalx.org/administrator/commands.html#python-m-pretalx-rebuild + PYTHONPATH=$PYTHONPATH:./src python -m pretalx rebuild + ''; + + postInstall = '' + mkdir -p $out/bin + cp ./src/manage.py $out/bin/pretalx-manage + + # The processed source files are in the static output, except for fonts, which are duplicated. + # See <https://github.com/pretalx/pretalx/issues/1585> for more details. + find $out/${python.sitePackages}/pretalx/static \ + -mindepth 1 \ + -not -path "$out/${python.sitePackages}/pretalx/static/fonts*" \ + -delete + + # Copy generated static files into dedicated output + mkdir -p $static + cp -r ./src/static.dist/** $static/ + + # Copy frontend files + ln -s ${frontend}/lib/node_modules/@pretalx/schedule-editor/dist/* $static + ''; + + preCheck = '' + export PRETALX_CONFIG_FILE="$src/src/tests/ci_sqlite.cfg" + cd src + ''; + + nativeCheckInputs = with python.pkgs; [ + faker + freezegun + pytest-django + pytest-mock + pytest-xdist + pytestCheckHook + responses + ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies); + + disabledTests = [ + # tries to run npm run i18n:extract + "test_common_custom_makemessages_does_not_blow_up" + # Expected to perform X queries or less but Y were done + "test_schedule_export_public" + "test_schedule_frab_json_export" + "test_schedule_frab_xml_export" + ]; + + passthru = { + inherit python; + tests = { + inherit (nixosTests) pretalx; + }; + }; + + inherit meta; +} diff --git a/pkgs/by-name/pr/prometheus-restic-exporter/package.nix b/pkgs/by-name/pr/prometheus-restic-exporter/package.nix new file mode 100644 index 000000000000..4e3736a573b6 --- /dev/null +++ b/pkgs/by-name/pr/prometheus-restic-exporter/package.nix @@ -0,0 +1,49 @@ +{ lib +, stdenvNoCC +, fetchFromGitHub +, python3 +, restic +, nixosTests +}: + +stdenvNoCC.mkDerivation rec { + pname = "prometheus-restic-exporter"; + version = "1.4.0"; + + src = fetchFromGitHub { + owner = "ngosang"; + repo = "restic-exporter"; + rev = version; + hash = "sha256-Qwhlecginl5+V+iddN/vIHfJA1kQOZtscECsoD4LJPE="; + }; + + buildInputs = [ + (python3.withPackages (ps: [ ps.prometheus-client ])) + ]; + + installPhase = '' + runHook preInstall + + install -D -m0755 restic-exporter.py $out/bin/restic-exporter.py + + substituteInPlace $out/bin/restic-exporter.py --replace \"restic\" \"${lib.makeBinPath [ restic ]}/restic\" + + patchShebangs $out/bin/restic-exporter.py + + runHook postInstall + ''; + + passthru.tests = { + restic-exporter = nixosTests.prometheus-exporters.restic; + }; + + meta = with lib; { + description = "Prometheus exporter for the Restic backup system"; + homepage = "https://github.com/ngosang/restic-exporter"; + changelog = "https://github.com/ngosang/restic-exporter/blob/${src.rev}/CHANGELOG.md"; + license = licenses.mit; + maintainers = with maintainers; [ minersebas ]; + mainProgram = "restic-exporter.py"; + platforms = platforms.all; + }; +} diff --git a/pkgs/by-name/pr/promptfoo/package.nix b/pkgs/by-name/pr/promptfoo/package.nix index f690c52fe130..0aa9599f0508 100644 --- a/pkgs/by-name/pr/promptfoo/package.nix +++ b/pkgs/by-name/pr/promptfoo/package.nix @@ -5,16 +5,16 @@ buildNpmPackage rec { pname = "promptfoo"; - version = "0.35.0"; + version = "0.39.1"; src = fetchFromGitHub { owner = "promptfoo"; repo = "promptfoo"; rev = "${version}"; - hash = "sha256-IySt3qlRDzaVqkhaqr7yeAs3gemKgPNEUjpYANCZVVg="; + hash = "sha256-RnmvL3zcfWNqjnxCHNszGDAweKVT0GQ5GANJWVCRR/w="; }; - npmDepsHash = "sha256-uTNb/zMhnN8rElvG14YgUVuTTcayWPS5raGVo322g+I="; + npmDepsHash = "sha256-OGYAYd1MCOFtdTgcsZcnWgTxtx28889RZhQ6fAe2HuI="; dontNpmBuild = true; diff --git a/pkgs/by-name/pr/protoc-gen-js/package.nix b/pkgs/by-name/pr/protoc-gen-js/package.nix new file mode 100644 index 000000000000..21cd426388f8 --- /dev/null +++ b/pkgs/by-name/pr/protoc-gen-js/package.nix @@ -0,0 +1,37 @@ +{ stdenv, lib, buildBazelPackage, bazel_6, fetchFromGitHub, darwin }: + +buildBazelPackage rec { + pname = "protoc-gen-js"; + version = "3.21.2"; + + src = fetchFromGitHub { + owner = "protocolbuffers"; + repo = "protobuf-javascript"; + rev = "v${version}"; + hash = "sha256-TmP6xftUVTD7yML7UEM/DB8bcsL5RFlKPyCpcboD86U="; + }; + + bazel = bazel_6; + bazelTargets = [ "generator:protoc-gen-js" ]; + bazelBuildFlags = lib.optionals stdenv.cc.isClang [ "--cxxopt=-x" "--cxxopt=c++" "--host_cxxopt=-x" "--host_cxxopt=c++" ]; + removeRulesCC = false; + removeLocalConfigCC = false; + + LIBTOOL = lib.optionalString stdenv.isDarwin "${darwin.cctools}/bin/libtool"; + + fetchAttrs.sha256 = "sha256-H0zTMCMFct09WdR/mzcs9FcC2OU/ZhGye7GAkx4tGa8="; + + buildAttrs.installPhase = '' + mkdir -p $out/bin + install -Dm755 bazel-bin/generator/protoc-gen-js $out/bin/ + ''; + + meta = with lib; { + description = "Protobuf plugin for generating JavaScript code"; + homepage = "https://github.com/protocolbuffers/protobuf-javascript"; + platforms = platforms.linux ++ platforms.darwin; + license = with licenses; [ asl20 bsd3 ]; + sourceProvenance = [ sourceTypes.fromSource ]; + maintainers = with maintainers; [ Sorixelle ]; + }; +} diff --git a/pkgs/by-name/pr/prowler/package.nix b/pkgs/by-name/pr/prowler/package.nix new file mode 100644 index 000000000000..466732634cd6 --- /dev/null +++ b/pkgs/by-name/pr/prowler/package.nix @@ -0,0 +1,69 @@ +{ lib +, python3 +, fetchFromGitHub +}: + +python3.pkgs.buildPythonApplication rec { + pname = "prowler"; + version = "3.12.1"; + pyproject = true; + + src = fetchFromGitHub { + owner = "prowler-cloud"; + repo = "prowler"; + rev = "refs/tags/${version}"; + hash = "sha256-QauDqeCa499AcZurGjn2Yv4GH04F/pahAH2ms7gAca4="; + }; + + pythonRelaxDeps = [ + "azure-mgmt-security" + "boto3" + "botocore" + "google-api-python-client" + "slack-sdk" + ]; + + nativeBuildInputs = with python3.pkgs; [ + poetry-core + pythonRelaxDepsHook + ]; + + propagatedBuildInputs = with python3.pkgs; [ + alive-progress + awsipranges + azure-identity + azure-mgmt-authorization + azure-mgmt-security + azure-mgmt-sql + azure-mgmt-storage + azure-mgmt-subscription + azure-storage-blob + boto3 + botocore + colorama + detect-secrets + google-api-python-client + google-auth-httplib2 + jsonschema + msgraph-core + msrestazure + pydantic_1 + schema + shodan + slack-sdk + tabulate + ]; + + pythonImportsCheck = [ + "prowler" + ]; + + meta = with lib; { + description = "Security tool for AWS, Azure and GCP to perform Cloud Security best practices assessments"; + homepage = "https://github.com/prowler-cloud/prowler"; + changelog = "https://github.com/prowler-cloud/prowler/releases/tag/${version}"; + license = licenses.asl20; + maintainers = with maintainers; [ fab ]; + mainProgram = "prowler"; + }; +} |