diff options
Diffstat (limited to 'pkgs/by-name/pr')
-rw-r--r-- | pkgs/by-name/pr/pre2k/package.nix | 50 | ||||
-rw-r--r-- | pkgs/by-name/pr/pretalx/package.nix | 9 | ||||
-rw-r--r-- | pkgs/by-name/pr/pretix/language-build.patch | 12 | ||||
-rw-r--r-- | pkgs/by-name/pr/pretix/package.nix | 270 | ||||
-rw-r--r-- | pkgs/by-name/pr/pretix/plugin-build.nix | 37 | ||||
-rw-r--r-- | pkgs/by-name/pr/pretix/plugin-build.patch | 20 | ||||
-rw-r--r-- | pkgs/by-name/pr/pretix/plugins/default.nix | 13 | ||||
-rw-r--r-- | pkgs/by-name/pr/pretix/plugins/pages.nix | 37 | ||||
-rw-r--r-- | pkgs/by-name/pr/pretix/plugins/passbook-openssl.patch | 33 | ||||
-rw-r--r-- | pkgs/by-name/pr/pretix/plugins/passbook.nix | 59 | ||||
-rw-r--r-- | pkgs/by-name/pr/pretix/plugins/reluctant-stripe.nix | 37 | ||||
-rw-r--r-- | pkgs/by-name/pr/pretix/plugins/stretchgoals.nix | 37 | ||||
-rw-r--r-- | pkgs/by-name/pr/promptfoo/package.nix | 7 | ||||
-rw-r--r-- | pkgs/by-name/pr/protoc-gen-js/package.nix | 1 | ||||
-rw-r--r-- | pkgs/by-name/pr/proton-ge-bin/package.nix | 57 | ||||
-rw-r--r-- | pkgs/by-name/pr/protonmail-bridge-gui/package.nix | 113 | ||||
-rw-r--r-- | pkgs/by-name/pr/protonmail-bridge-gui/use-nix-googletest.patch | 23 | ||||
-rw-r--r-- | pkgs/by-name/pr/prox/package.nix | 1 |
18 files changed, 813 insertions, 3 deletions
diff --git a/pkgs/by-name/pr/pre2k/package.nix b/pkgs/by-name/pr/pre2k/package.nix new file mode 100644 index 000000000000..4865269b5565 --- /dev/null +++ b/pkgs/by-name/pr/pre2k/package.nix @@ -0,0 +1,50 @@ +{ lib +, fetchFromGitHub +, python3 +}: + +python3.pkgs.buildPythonApplication rec { + pname = "pre2k"; + version = "3.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "garrettfoster13"; + repo = "pre2k"; + rev = "refs/tags/${version}"; + hash = "sha256-z1ttuRos7x/zdWiYYozxWzRarFExd4W5rUYAEiUMugU="; + }; + + pythonRelaxDeps = [ + "impacket" + "pyasn1" + "rich" + "typer" + ]; + + nativeBuildInputs = with python3.pkgs; [ + poetry-core + pythonRelaxDepsHook + ]; + + propagatedBuildInputs = with python3.pkgs; [ + impacket + ldap3 + pyasn1 + rich + typer + ]; + + pythonImportsCheck = [ + "pre2k" + ]; + + meta = with lib; { + description = "Tool to query for the existence of pre-windows 2000 computer objects"; + homepage = "https://github.com/garrettfoster13/pre2k"; + changelog = "https://github.com/garrettfoster13/pre2k/releases/tag/${version}"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + mainProgram = "pre2k"; + }; +} diff --git a/pkgs/by-name/pr/pretalx/package.nix b/pkgs/by-name/pr/pretalx/package.nix index d353fa6462f5..bea6f3cc41c4 100644 --- a/pkgs/by-name/pr/pretalx/package.nix +++ b/pkgs/by-name/pr/pretalx/package.nix @@ -38,6 +38,7 @@ let meta = with lib; { description = "Conference planning tool: CfP, scheduling, speaker management"; + mainProgram = "pretalx-manage"; homepage = "https://github.com/pretalx/pretalx"; changelog = "https://docs.pretalx.org/en/latest/changelog.html"; license = licenses.asl20; @@ -78,6 +79,14 @@ python.pkgs.buildPythonApplication rec { nativeBuildInputs = [ gettext + ] ++ (with python.pkgs; [ + pythonRelaxDepsHook + setuptools + ]); + + pythonRelaxDeps = [ + "django-csp" + "python-dateutil" ]; propagatedBuildInputs = with python.pkgs; [ diff --git a/pkgs/by-name/pr/pretix/language-build.patch b/pkgs/by-name/pr/pretix/language-build.patch new file mode 100644 index 000000000000..b4043b95446d --- /dev/null +++ b/pkgs/by-name/pr/pretix/language-build.patch @@ -0,0 +1,12 @@ +diff --git a/src/pretix/_build_settings.py b/src/pretix/_build_settings.py +index d1ea73b84..9e13cdc87 100644 +--- a/src/pretix/_build_settings.py ++++ b/src/pretix/_build_settings.py +@@ -49,6 +49,7 @@ HAS_MEMCACHED = False + HAS_CELERY = False + HAS_GEOIP = False + SENTRY_ENABLED = False ++LANGUAGES = ALL_LANGUAGES + + for entry_point in entry_points(group='pretix.plugin'): + INSTALLED_APPS.append(entry_point.module) # noqa: F405 diff --git a/pkgs/by-name/pr/pretix/package.nix b/pkgs/by-name/pr/pretix/package.nix new file mode 100644 index 000000000000..7b238ff6f8e4 --- /dev/null +++ b/pkgs/by-name/pr/pretix/package.nix @@ -0,0 +1,270 @@ +{ lib +, buildNpmPackage +, fetchFromGitHub +, fetchPypi +, fetchpatch2 +, nodejs +, python3 +, gettext +, nixosTests +, plugins ? [ ] +}: + +let + python = python3.override { + packageOverrides = self: super: { + django = super.django_4; + + stripe = super.stripe.overridePythonAttrs rec { + version = "7.9.0"; + + src = fetchPypi { + pname = "stripe"; + inherit version; + hash = "sha256-hOXkMINaSwzU/SpXzjhTJp0ds0OREc2mtu11LjSc9KE="; + }; + }; + + pretix-plugin-build = self.callPackage ./plugin-build.nix { }; + }; + }; + + pname = "pretix"; + version = "2024.2.0"; + + src = fetchFromGitHub { + owner = "pretix"; + repo = "pretix"; + rev = "refs/tags/v${version}"; + hash = "sha256-emtF5dDXEXN8GIucHbjF+m9Vkg1Jj6nmQdHhBOkXMAs="; + }; + + npmDeps = buildNpmPackage { + pname = "pretix-node-modules"; + inherit version src; + + sourceRoot = "${src.name}/src/pretix/static/npm_dir"; + npmDepsHash = "sha256-kE13dcTdWZZNHPMcHEiK0a2dEcu3Z3/q815YhaVkLbQ="; + + dontBuild = true; + + installPhase = '' + runHook preInstall + + mkdir $out + cp -R node_modules $out/ + + runHook postInstall + ''; + }; +in +python.pkgs.buildPythonApplication rec { + inherit pname version src; + pyproject = true; + + patches = [ + # Discover pretix.plugin entrypoints during build and add them into + # INSTALLED_APPS, so that their static files are collected. + ./plugin-build.patch + + # Configure django-statici18n to compile all available languages at + # build time. + ./language-build.patch + + (fetchpatch2 { + # Allow customization of cache and log directory + # https://github.com/pretix/pretix/pull/3997 + name = "pretix-directory-customization.patch"; + url = "https://github.com/pretix/pretix/commit/e151d1d1f08917e547df49da0779b36bb73b7294.patch"; + hash = "sha256-lO5eCKSqUaCwSm7rouMTFMwauWl9Tz/Yf0JE/IO+bnI="; + }) + ]; + + postPatch = '' + NODE_PREFIX=src/pretix/static.dist/node_prefix + mkdir -p $NODE_PREFIX + cp -R ${npmDeps}/node_modules $NODE_PREFIX/ + chmod -R u+w $NODE_PREFIX/ + + # unused + sed -i "/setuptools-rust/d" pyproject.toml + + substituteInPlace pyproject.toml \ + --replace-fail phonenumberslite phonenumbers \ + --replace-fail psycopg2-binary psycopg2 \ + --replace-fail vat_moss_forked==2020.3.20.0.11.0 vat-moss \ + --replace-fail "bleach==5.0.*" bleach \ + --replace-fail "dnspython==2.5.*" dnspython \ + --replace-fail "importlib_metadata==7.*" importlib_metadata \ + --replace-fail "protobuf==4.25.*" protobuf \ + --replace-fail "pycryptodome==3.20.*" pycryptodome \ + --replace-fail "pypdf==3.9.*" pypdf \ + --replace-fail "python-dateutil==2.8.*" python-dateutil \ + --replace-fail "sentry-sdk==1.40.*" sentry-sdk \ + --replace-fail "stripe==7.9.*" stripe + ''; + + build-system = with python.pkgs; [ + gettext + nodejs + pythonRelaxDepsHook + setuptools + tomli + ]; + + dependencies = with python.pkgs; [ + arabic-reshaper + babel + beautifulsoup4 + bleach + celery + chardet + cryptography + css-inline + defusedcsv + dj-static + django + django-bootstrap3 + django-compressor + django-countries + django-filter + django-formset-js-improved + django-formtools + django-hierarkey + django-hijack + django-i18nfield + django-libsass + django-localflavor + django-markup + django-oauth-toolkit + django-otp + django-phonenumber-field + django-redis + django-scopes + django-statici18n + djangorestframework + dnspython + drf-ujson2 + geoip2 + importlib-metadata + isoweek + jsonschema + kombu + libsass + lxml + markdown + mt-940 + oauthlib + openpyxl + packaging + paypalrestsdk + paypal-checkout-serversdk + pyjwt + phonenumbers + pillow + pretix-plugin-build + protobuf + psycopg2 + pycountry + pycparser + pycryptodome + pypdf + python-bidi + python-dateutil + pytz + pytz-deprecation-shim + pyuca + qrcode + redis + reportlab + requests + sentry-sdk + sepaxml + slimit + static3 + stripe + text-unidecode + tlds + tqdm + vat-moss + vobject + webauthn + zeep + ] ++ plugins; + + optional-dependencies = with python.pkgs; { + memcached = [ + pylibmc + ]; + }; + + postInstall = '' + mkdir -p $out/bin + cp ./src/manage.py $out/bin/pretix-manage + + # Trim packages size + rm -rfv $out/${python.sitePackages}/pretix/static.dist/node_prefix + ''; + + dontStrip = true; # no binaries + + nativeCheckInputs = with python.pkgs; [ + pytestCheckHook + pytest-xdist + pytest-mock + pytest-django + pytest-asyncio + pytest-rerunfailures + freezegun + fakeredis + responses + ] ++ lib.flatten (lib.attrValues optional-dependencies); + + pytestFlagsArray = [ + "--reruns" "3" + + # tests fail when run before 4:30am + # https://github.com/pretix/pretix/pull/3987 + "--deselect=src/tests/base/test_orders.py::PaymentReminderTests::test_sent_days" + "--deselect=src/tests/plugins/sendmail/test_rules.py::test_sendmail_rule_specified_subevent" + ]; + + preCheck = '' + export PYTHONPATH=$(pwd)/src:$PYTHONPATH + export DJANGO_SETTINGS_MODULE=tests.settings + ''; + + passthru = { + inherit + npmDeps + python + ; + plugins = lib.recurseIntoAttrs + (python.pkgs.callPackage ./plugins { + inherit (python.pkgs) callPackage; + } + ); + tests = { + inherit (nixosTests) pretix; + }; + }; + + meta = with lib; { + description = "Ticketing software that cares about your event—all the way"; + homepage = "https://github.com/pretix/pretix"; + license = with licenses; [ + agpl3Only + # 3rd party components below src/pretix/static + bsd2 + isc + mit + ofl # fontawesome + unlicense + # all other files below src/pretix/static and src/pretix/locale and aux scripts + asl20 + ]; + maintainers = with maintainers; [ hexa ]; + mainProgram = "pretix-manage"; + platforms = platforms.linux; + }; +} diff --git a/pkgs/by-name/pr/pretix/plugin-build.nix b/pkgs/by-name/pr/pretix/plugin-build.nix new file mode 100644 index 000000000000..307ff4114eb7 --- /dev/null +++ b/pkgs/by-name/pr/pretix/plugin-build.nix @@ -0,0 +1,37 @@ +{ + lib, + buildPythonPackage, + fetchPypi, + setuptools, + django, + gettext, +}: + +buildPythonPackage rec { + pname = "pretix-plugin-build"; + version = "1.0.1"; + pyproject = true; + + src = fetchPypi { + inherit pname version; + hash = "sha256-iLbqcCAbeK4PyLXiebpdE27rt6bOP7eXczIG2bdvvYo="; + }; + + build-system = [ + setuptools + ]; + + dependencies = [ + django + gettext + ]; + + doCheck = false; # no tests + + meta = with lib; { + description = ""; + homepage = "https://github.com/pretix/pretix-plugin-build"; + license = licenses.asl20; + maintainers = with maintainers; [ hexa ]; + }; +} diff --git a/pkgs/by-name/pr/pretix/plugin-build.patch b/pkgs/by-name/pr/pretix/plugin-build.patch new file mode 100644 index 000000000000..aa935ed28148 --- /dev/null +++ b/pkgs/by-name/pr/pretix/plugin-build.patch @@ -0,0 +1,20 @@ +diff --git a/src/pretix/_build_settings.py b/src/pretix/_build_settings.py +index c03f56a1a..d1ea73b84 100644 +--- a/src/pretix/_build_settings.py ++++ b/src/pretix/_build_settings.py +@@ -24,6 +24,8 @@ + This file contains settings that we need at wheel require time. All settings that we only need at runtime are set + in settings.py. + """ ++from importlib_metadata import entry_points ++ + from ._base_settings import * # NOQA + + ENTROPY = { +@@ -47,3 +49,6 @@ HAS_MEMCACHED = False + HAS_CELERY = False + HAS_GEOIP = False + SENTRY_ENABLED = False ++ ++for entry_point in entry_points(group='pretix.plugin'): ++ INSTALLED_APPS.append(entry_point.module) # noqa: F405 diff --git a/pkgs/by-name/pr/pretix/plugins/default.nix b/pkgs/by-name/pr/pretix/plugins/default.nix new file mode 100644 index 000000000000..70e643705c00 --- /dev/null +++ b/pkgs/by-name/pr/pretix/plugins/default.nix @@ -0,0 +1,13 @@ +{ callPackage +, ... +}: + +{ + pages = callPackage ./pages.nix { }; + + passbook = callPackage ./passbook.nix { }; + + reluctant-stripe = callPackage ./reluctant-stripe.nix { }; + + stretchgoals = callPackage ./stretchgoals.nix { }; +} diff --git a/pkgs/by-name/pr/pretix/plugins/pages.nix b/pkgs/by-name/pr/pretix/plugins/pages.nix new file mode 100644 index 000000000000..91f8ef032f77 --- /dev/null +++ b/pkgs/by-name/pr/pretix/plugins/pages.nix @@ -0,0 +1,37 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pretix-plugin-build +, setuptools +}: + +buildPythonPackage rec { + pname = "pretix-pages"; + version = "1.6.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "pretix"; + repo = "pretix-pages"; + rev = "v${version}"; + hash = "sha256-cO5tAiOifLpqFEQwYgrGoByUecpzvue8YmChpPwm+y0="; + }; + + build-system = [ + pretix-plugin-build + setuptools + ]; + + doCheck = false; # no tests + + pythonImportsCheck = [ + "pretix_pages" + ]; + + meta = with lib; { + description = "Plugin to add static pages to your pretix event"; + homepage = "https://github.com/pretix/pretix-pages"; + license = licenses.asl20; + maintainers = with maintainers; [ hexa ]; + }; +} diff --git a/pkgs/by-name/pr/pretix/plugins/passbook-openssl.patch b/pkgs/by-name/pr/pretix/plugins/passbook-openssl.patch new file mode 100644 index 000000000000..44c0d56886af --- /dev/null +++ b/pkgs/by-name/pr/pretix/plugins/passbook-openssl.patch @@ -0,0 +1,33 @@ +diff --git a/pretix_passbook/apps.py b/pretix_passbook/apps.py +index e34eee1..a7ad382 100644 +--- a/pretix_passbook/apps.py ++++ b/pretix_passbook/apps.py +@@ -22,15 +22,6 @@ class PassbookApp(AppConfig): + def ready(self): + from . import signals # NOQA + +- @cached_property +- def compatibility_errors(self): +- import shutil +- +- errs = [] +- if not shutil.which("openssl"): +- errs.append("The OpenSSL binary is not installed or not in the PATH.") +- return errs +- + @cached_property + def compatibility_warnings(self): + errs = [] +diff --git a/pretix_passbook/forms.py b/pretix_passbook/forms.py +index 2a38604..aec38de 100644 +--- a/pretix_passbook/forms.py ++++ b/pretix_passbook/forms.py +@@ -41,7 +41,7 @@ class CertificateFileField(forms.FileField): + return SimpleUploadedFile("cert.pem", content, "text/plain") + + openssl_cmd = [ +- "openssl", ++ "@openssl@", + "x509", + "-inform", + "DER", diff --git a/pkgs/by-name/pr/pretix/plugins/passbook.nix b/pkgs/by-name/pr/pretix/plugins/passbook.nix new file mode 100644 index 000000000000..b7d380aa681d --- /dev/null +++ b/pkgs/by-name/pr/pretix/plugins/passbook.nix @@ -0,0 +1,59 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, substituteAll + +# build-system +, pretix-plugin-build +, setuptools + +# runtime +, openssl + +# dependencies +, googlemaps +, wallet-py3k +}: + +buildPythonPackage rec { + pname = "pretix-passbook"; + version = "1.13.1"; + pyproject = true; + + src = fetchFromGitHub { + owner = "pretix"; + repo = "pretix-passbook"; + rev = "v${version}"; + hash = "sha256-bp64wCEMon05JhOaDr/cVbqUxc+7ndcsSuSesxJt8GE="; + }; + + patches = [ + (substituteAll { + src = ./passbook-openssl.patch; + openssl = lib.getExe openssl; + }) + ]; + + build-system = [ + pretix-plugin-build + setuptools + ]; + + dependencies = [ + googlemaps + wallet-py3k + ]; + + doCheck = false; # no tests + + pythonImportsCheck = [ + "pretix_passbook" + ]; + + meta = with lib; { + description = "Support for Apple Wallet/Passbook files in pretix"; + homepage = "https://github.com/pretix/pretix-passbook"; + license = licenses.asl20; + maintainers = with maintainers; [ hexa ]; + }; +} diff --git a/pkgs/by-name/pr/pretix/plugins/reluctant-stripe.nix b/pkgs/by-name/pr/pretix/plugins/reluctant-stripe.nix new file mode 100644 index 000000000000..40ab96a36bca --- /dev/null +++ b/pkgs/by-name/pr/pretix/plugins/reluctant-stripe.nix @@ -0,0 +1,37 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pretix-plugin-build +, setuptools +}: + +buildPythonPackage { + pname = "pretix-reluctant-stripe"; + version = "unstable-2023-08-03"; + pyproject = true; + + src = fetchFromGitHub { + owner = "metarheinmain"; + repo = "pretix-reluctant-stripe"; + rev = "ae2d770442553e5fc00815ff4521a8fd2c113fd9"; + hash = "sha256-bw9aDMxl4/uar5KHjj+wwkYkaGMRxHWY/c1N75bxu0o="; + }; + + build-system = [ + pretix-plugin-build + setuptools + ]; + + doCheck = false; # no tests + + pythonImportsCheck = [ + "pretix_reluctant_stripe" + ]; + + meta = with lib; { + description = "Nudge users to not use Stripe as a payment provider"; + homepage = "https://github.com/metarheinmain/pretix-reluctant-stripe"; + license = licenses.asl20; + maintainers = with maintainers; [ hexa ]; + }; +} diff --git a/pkgs/by-name/pr/pretix/plugins/stretchgoals.nix b/pkgs/by-name/pr/pretix/plugins/stretchgoals.nix new file mode 100644 index 000000000000..4d1cb8d02e84 --- /dev/null +++ b/pkgs/by-name/pr/pretix/plugins/stretchgoals.nix @@ -0,0 +1,37 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pretix-plugin-build +, setuptools +}: + +buildPythonPackage { + pname = "pretix-avgchart"; + version = "unstable-2023-11-27"; + pyproject = true; + + src = fetchFromGitHub { + owner = "rixx"; + repo = "pretix-avgchart"; + rev = "219816c7ec523a5c23778523b2616ac0c835cb3a"; + hash = "sha256-1V/0PUvStgQeBQ0v6GoofAgyPmWs3RD+v5ekmAO9vFU="; + }; + + build-system = [ + pretix-plugin-build + setuptools + ]; + + doCheck = false; # no tests + + pythonImportsCheck = [ + "pretix_stretchgoals" + ]; + + meta = with lib; { + description = "Display the average ticket sales price over time"; + homepage = "https://github.com/rixx/pretix-avgchart"; + license = licenses.asl20; + maintainers = with maintainers; [ hexa ]; + }; +} diff --git a/pkgs/by-name/pr/promptfoo/package.nix b/pkgs/by-name/pr/promptfoo/package.nix index 4be98d738fcc..e834a9c95b4c 100644 --- a/pkgs/by-name/pr/promptfoo/package.nix +++ b/pkgs/by-name/pr/promptfoo/package.nix @@ -5,21 +5,22 @@ buildNpmPackage rec { pname = "promptfoo"; - version = "0.43.1"; + version = "0.48.0"; src = fetchFromGitHub { owner = "promptfoo"; repo = "promptfoo"; rev = "${version}"; - hash = "sha256-659cVRw++71zd0hzyz/dF9VgoChDXPDvHwgSmIyjnNw="; + hash = "sha256-PFOwCjkkJncutYHTqoM21y4uh6X5LQiTSK+onzLT+uc="; }; - npmDepsHash = "sha256-606CKRMFPdawiqpvzYizwgfQ6Y4YbZngBuQb3fhtpd0="; + npmDepsHash = "sha256-Popm602xNKYZV4Q6sXFhHu978V8sCf5ujPPgJmlUzvc="; dontNpmBuild = true; meta = with lib; { description = "Test your prompts, models, RAGs. Evaluate and compare LLM outputs, catch regressions, and improve prompt quality."; + mainProgram = "promptfoo"; homepage = "https://www.promptfoo.dev/"; changelog = "https://github.com/promptfoo/promptfoo/releases/tag/${version}"; license = licenses.mit; diff --git a/pkgs/by-name/pr/protoc-gen-js/package.nix b/pkgs/by-name/pr/protoc-gen-js/package.nix index 21cd426388f8..e9e8207b3cc9 100644 --- a/pkgs/by-name/pr/protoc-gen-js/package.nix +++ b/pkgs/by-name/pr/protoc-gen-js/package.nix @@ -28,6 +28,7 @@ buildBazelPackage rec { meta = with lib; { description = "Protobuf plugin for generating JavaScript code"; + mainProgram = "protoc-gen-js"; homepage = "https://github.com/protocolbuffers/protobuf-javascript"; platforms = platforms.linux ++ platforms.darwin; license = with licenses; [ asl20 bsd3 ]; diff --git a/pkgs/by-name/pr/proton-ge-bin/package.nix b/pkgs/by-name/pr/proton-ge-bin/package.nix new file mode 100644 index 000000000000..68e147ca4f9c --- /dev/null +++ b/pkgs/by-name/pr/proton-ge-bin/package.nix @@ -0,0 +1,57 @@ +{ lib +, stdenvNoCC +, fetchzip +, writeScript +}: +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "proton-ge-bin"; + version = "GE-Proton9-1"; + + src = fetchzip { + url = "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/${finalAttrs.version}/${finalAttrs.version}.tar.gz"; + hash = "sha256-odpzRlzW7MJGRcorRNo784Rh97ssViO70/1azHRggf0="; + }; + + outputs = [ "out" "steamcompattool" ]; + + buildCommand = '' + runHook preBuild + + # Make it impossible to add to an environment. You should use the appropriate NixOS option. + # Also leave some breadcrumbs in the file. + echo "${finalAttrs.pname} should not be installed into environments. Please use programs.steam.extraCompatPackages instead." > $out + + ln -s $src $steamcompattool + + runHook postBuild + ''; + + /* + We use the created releases, and not the tags, for the update script as nix-update loads releases.atom + that contains both. Sometimes upstream pushes the tags but the Github releases don't get created due to + CI errors. Last time this happened was on 8-33, where a tag was created but no releases were created. + As of 2024-03-13, there have been no announcements indicating that the CI has been fixed, and thus + we avoid nix-update-script and use our own update script instead. + See: <https://github.com/NixOS/nixpkgs/pull/294532#issuecomment-1987359650> + */ + passthru.updateScript = writeScript "update-proton-ge" '' + #!/usr/bin/env nix-shell + #!nix-shell -i bash -p curl jq common-updater-scripts + repo="https://api.github.com/repos/GloriousEggroll/proton-ge-custom/releases" + version="$(curl -sL "$repo" | jq 'map(select(.prerelease == false)) | .[0].tag_name' --raw-output)" + update-source-version proton-ge-bin "$version" + ''; + + meta = { + description = '' + Compatibility tool for Steam Play based on Wine and additional components. + + (This is intended for use in the `programs.steam.extraCompatPackages` option only.) + ''; + homepage = "https://github.com/GloriousEggroll/proton-ge-custom"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ NotAShelf shawn8901 ]; + platforms = [ "x86_64-linux" ]; + sourceProvenance = [ lib.sourceTypes.binaryNativeCode ]; + }; +}) diff --git a/pkgs/by-name/pr/protonmail-bridge-gui/package.nix b/pkgs/by-name/pr/protonmail-bridge-gui/package.nix new file mode 100644 index 000000000000..2b15e67908d4 --- /dev/null +++ b/pkgs/by-name/pr/protonmail-bridge-gui/package.nix @@ -0,0 +1,113 @@ +{ lib +, stdenv +, pkg-config +, libsecret +, cmake +, ninja +, qt6 +, grpc +, protobuf +, zlib +, gtest +, sentry-native +, protonmail-bridge +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "protonmail-bridge-gui"; + + inherit (protonmail-bridge) version src; + + patches = [ + # Use `gtest` from Nixpkgs to allow an offline build + ./use-nix-googletest.patch + ]; + + nativeBuildInputs = [ + pkg-config + cmake + ninja + qt6.qtbase + qt6.qtdeclarative + qt6.qtwayland + qt6.qtsvg + qt6.wrapQtAppsHook + ]; + + buildInputs = [ + libsecret + grpc + protobuf + zlib + gtest + sentry-native + ]; + + sourceRoot = "${finalAttrs.src.name}/internal/frontend/bridge-gui"; + + postPatch = '' + # Bypass `vcpkg` by deleting lines that `include` BridgeSetup.cmake + find . -type f -name "CMakeLists.txt" -exec sed -i "/BridgeSetup\\.cmake/d" {} \; + + # Use the available ICU version + sed -i "s/libicu\(i18n\|uc\|data\)\.so\.56/libicu\1.so/g" bridge-gui/DeployLinux.cmake + + # Create a Desktop Entry that uses a `protonmail-bridge-gui` binary without upstream's launcher + sed "s/^\(Icon\|Exec\)=.*$/\1=protonmail-bridge-gui/" ../../../dist/proton-bridge.desktop > proton-bridge-gui.desktop + + # Also update `StartupWMClass` to match the GUI binary's `wmclass` (Wayland app id) + sed -i "s/^\(StartupWMClass=\)Proton Mail Bridge$/\1ch.proton.bridge-gui/" proton-bridge-gui.desktop + + # Don't build `bridge-gui-tester` + sed -i "/add_subdirectory(bridge-gui-tester)/d" CMakeLists.txt + ''; + + preConfigure = '' + cmakeFlagsArray+=( + "-DCMAKE_BUILD_TYPE=Release" + "-DBRIDGE_APP_FULL_NAME=Proton Mail Bridge" + "-DBRIDGE_VENDOR=Proton AG" + "-DBRIDGE_REVISION=${finalAttrs.src.rev}" + "-DBRIDGE_TAG=${finalAttrs.version}" + "-DBRIDGE_BUILD_ENV=Nix" + "-DBRIDGE_APP_VERSION=${finalAttrs.version}" + ) + ''; + + installPhase = '' + runHook preInstall + + # Install the GUI binary + install -Dm755 bridge-gui/bridge-gui $out/lib/bridge-gui + + # Symlink the backend binary from the protonmail-bridge (CLI) package + ln -s ${protonmail-bridge}/bin/protonmail-bridge $out/lib/bridge + + # Symlink the GUI binary + mkdir -p $out/bin + ln -s $out/lib/bridge-gui $out/bin/protonmail-bridge-gui + + # Install desktop assets + install -Dm644 ../proton-bridge-gui.desktop -t $out/share/applications + install -Dm644 ../../../../dist/bridge.svg $out/share/icons/hicolor/scalable/apps/protonmail-bridge-gui.svg + + runHook postInstall + ''; + + meta = { + changelog = "https://github.com/ProtonMail/proton-bridge/blob/${finalAttrs.src.rev}/Changelog.md"; + description = "Qt-based GUI to use your ProtonMail account with your local e-mail client"; + downloadPage = "https://github.com/ProtonMail/proton-bridge/releases"; + homepage = "https://github.com/ProtonMail/proton-bridge"; + license = lib.licenses.gpl3Plus; + longDescription = '' + Provides a GUI application that runs in the background and seamlessly encrypts + and decrypts your mail as it enters and leaves your computer. + + To work, use secret-service freedesktop.org API (e.g. Gnome keyring) or pass. + ''; + mainProgram = "protonmail-bridge-gui"; + maintainers = with lib.maintainers; [ daniel-fahey ]; + platforms = lib.platforms.linux; + }; +}) diff --git a/pkgs/by-name/pr/protonmail-bridge-gui/use-nix-googletest.patch b/pkgs/by-name/pr/protonmail-bridge-gui/use-nix-googletest.patch new file mode 100644 index 000000000000..fc1ad2b3ab16 --- /dev/null +++ b/pkgs/by-name/pr/protonmail-bridge-gui/use-nix-googletest.patch @@ -0,0 +1,23 @@ +diff --git a/bridgepp/CMakeLists.txt b/bridgepp/CMakeLists.txt +index f4a0a553..02d631dc 100644 +--- a/bridgepp/CMakeLists.txt ++++ b/bridgepp/CMakeLists.txt +@@ -172,16 +172,8 @@ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0") + cmake_policy(SET CMP0135 NEW) # avoid warning DOWNLOAD_EXTRACT_TIMESTAMP + endif () + +-include(FetchContent) +-FetchContent_Declare( +- googletest +- URL https://github.com/google/googletest/archive/b796f7d44681514f58a683a3a71ff17c94edb0c1.zip +-) +- +-# For Windows: Prevent overriding the parent project's compiler/linker settings +-set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) +- +-FetchContent_MakeAvailable(googletest) ++# Use find_package to use the gtest package provided by Nix ++find_package(GTest REQUIRED) + + enable_testing() + diff --git a/pkgs/by-name/pr/prox/package.nix b/pkgs/by-name/pr/prox/package.nix index 7c49551423f7..6f432de3ec72 100644 --- a/pkgs/by-name/pr/prox/package.nix +++ b/pkgs/by-name/pr/prox/package.nix @@ -25,6 +25,7 @@ buildGoModule rec { meta = with lib; { homepage = "https://github.com/fgrosse/prox"; description = "A process runner for Procfile-based applications "; + mainProgram = "prox"; license = licenses.bsd2; maintainers = with maintainers; [ lucperkins ]; }; |