From 32bb40df7777da11b7f75477294ab5a16e631f0d Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Sun, 15 Jan 2023 01:11:04 +0000 Subject: [PATCH] baserow/backend: pynixify tweaks to make it build --- nix/pkgs/baserow/backend/pynixify/overlay.nix | 15 +++++------- .../pynixify/packages/celery/default.nix | 4 ++++ .../packages/cryptography/default.nix | 20 ---------------- .../pynixify/packages/daphne/default.nix | 2 +- .../pynixify/packages/jsonschema/default.nix | 20 ---------------- .../pynixify/packages/pillow/default.nix | 21 ----------------- .../pynixify/packages/psycopg2/default.nix | 23 ------------------- .../packages/typing-extensions/default.nix | 7 +++++- 8 files changed, 17 insertions(+), 95 deletions(-) delete mode 100644 nix/pkgs/baserow/backend/pynixify/packages/cryptography/default.nix delete mode 100644 nix/pkgs/baserow/backend/pynixify/packages/jsonschema/default.nix delete mode 100644 nix/pkgs/baserow/backend/pynixify/packages/pillow/default.nix delete mode 100644 nix/pkgs/baserow/backend/pynixify/packages/psycopg2/default.nix diff --git a/nix/pkgs/baserow/backend/pynixify/overlay.nix b/nix/pkgs/baserow/backend/pynixify/overlay.nix index aca62bb386..f8d029cc84 100644 --- a/nix/pkgs/baserow/backend/pynixify/overlay.nix +++ b/nix/pkgs/baserow/backend/pynixify/overlay.nix @@ -19,8 +19,6 @@ self: super: { baserow-backend = self.callPackage ./packages/baserow-backend { }; - jsonschema = self.callPackage ./packages/jsonschema { }; - requests = self.callPackage ./packages/requests { }; python-crontab = self.callPackage ./packages/python-crontab { }; @@ -61,16 +59,12 @@ self: super: { oauthlib = self.callPackage ./packages/oauthlib { }; - psycopg2 = self.callPackage ./packages/psycopg2 { }; - django-celery-beat = self.callPackage ./packages/django-celery-beat { }; redis = self.callPackage ./packages/redis { }; httptools = self.callPackage ./packages/httptools { }; - twisted = self.callPackage ./packages/twisted { }; - typing-extensions = self.callPackage ./packages/typing-extensions { }; boto3 = self.callPackage ./packages/boto3 { }; @@ -91,12 +85,15 @@ self: super: { websockets = self.callPackage ./packages/websockets { }; - cryptography = self.callPackage ./packages/cryptography { }; - psutil = self.callPackage ./packages/psutil { }; botocore = self.callPackage ./packages/botocore { }; - pillow = self.callPackage ./packages/pillow { }; + sqlalchemy = super.sqlalchemy.overridePythonAttrs (_: { + doCheck = false; + }); + fakeredis = super.fakeredis.overridePythonAttrs (_: { + doCheck = false; + }); } diff --git a/nix/pkgs/baserow/backend/pynixify/packages/celery/default.nix b/nix/pkgs/baserow/backend/pynixify/packages/celery/default.nix index 4bc4665215..8a64a24bd6 100644 --- a/nix/pkgs/baserow/backend/pynixify/packages/celery/default.nix +++ b/nix/pkgs/baserow/backend/pynixify/packages/celery/default.nix @@ -25,6 +25,10 @@ buildPythonPackage rec { click-plugins ]; + prePatch = '' + sed -i '/setuptools/d' requirements/default.txt + ''; + # TODO FIXME doCheck = false; diff --git a/nix/pkgs/baserow/backend/pynixify/packages/cryptography/default.nix b/nix/pkgs/baserow/backend/pynixify/packages/cryptography/default.nix deleted file mode 100644 index 1df3badc9c..0000000000 --- a/nix/pkgs/baserow/backend/pynixify/packages/cryptography/default.nix +++ /dev/null @@ -1,20 +0,0 @@ -# WARNING: This file was automatically generated. You should avoid editing it. -# If you run pynixify again, the file will be either overwritten or -# deleted, and you will lose the changes you made to it. - -{ buildPythonPackage, fetchPypi, lib }: - -buildPythonPackage rec { - pname = "cryptography"; - version = "38.0.1"; - - src = fetchPypi { - inherit pname version; - sha256 = "1mrkmsq0hpgs3k38qqabp3knnf7cv6amchwngwqzlca9l43xicqx"; - }; - - # TODO FIXME - doCheck = false; - - meta = with lib; { }; -} diff --git a/nix/pkgs/baserow/backend/pynixify/packages/daphne/default.nix b/nix/pkgs/baserow/backend/pynixify/packages/daphne/default.nix index b3b944beaf..6facfa4f3a 100644 --- a/nix/pkgs/baserow/backend/pynixify/packages/daphne/default.nix +++ b/nix/pkgs/baserow/backend/pynixify/packages/daphne/default.nix @@ -15,7 +15,7 @@ buildPythonPackage rec { }; buildInputs = [ pytest-runner ]; - propagatedBuildInputs = [ twisted autobahn asgiref ]; + propagatedBuildInputs = [ twisted autobahn asgiref ] ++ twisted.optional-dependencies.tls; # TODO FIXME doCheck = false; diff --git a/nix/pkgs/baserow/backend/pynixify/packages/jsonschema/default.nix b/nix/pkgs/baserow/backend/pynixify/packages/jsonschema/default.nix deleted file mode 100644 index 957a26f918..0000000000 --- a/nix/pkgs/baserow/backend/pynixify/packages/jsonschema/default.nix +++ /dev/null @@ -1,20 +0,0 @@ -# WARNING: This file was automatically generated. You should avoid editing it. -# If you run pynixify again, the file will be either overwritten or -# deleted, and you will lose the changes you made to it. - -{ buildPythonPackage, fetchPypi, lib }: - -buildPythonPackage rec { - pname = "jsonschema"; - version = "4.16.0"; - - src = fetchPypi { - inherit pname version; - sha256 = "08sbw5fn19vn8x7c216gkczyzd575702yx2vmqdrgxpgfvq5jl0n"; - }; - - # TODO FIXME - doCheck = false; - - meta = with lib; { }; -} diff --git a/nix/pkgs/baserow/backend/pynixify/packages/pillow/default.nix b/nix/pkgs/baserow/backend/pynixify/packages/pillow/default.nix deleted file mode 100644 index f7983bc3cf..0000000000 --- a/nix/pkgs/baserow/backend/pynixify/packages/pillow/default.nix +++ /dev/null @@ -1,21 +0,0 @@ -# WARNING: This file was automatically generated. You should avoid editing it. -# If you run pynixify again, the file will be either overwritten or -# deleted, and you will lose the changes you made to it. - -{ buildPythonPackage, fetchPypi, lib }: - -buildPythonPackage rec { - pname = "pillow"; - version = "9.0.0"; - - src = fetchPypi { - inherit version; - pname = "Pillow"; - sha256 = "0gjry0yqryd2678sm47jhdnbghzxn5wk8pgyaqwr4qi7x5ijjvpf"; - }; - - # TODO FIXME - doCheck = false; - - meta = with lib; { }; -} diff --git a/nix/pkgs/baserow/backend/pynixify/packages/psycopg2/default.nix b/nix/pkgs/baserow/backend/pynixify/packages/psycopg2/default.nix deleted file mode 100644 index ece7930262..0000000000 --- a/nix/pkgs/baserow/backend/pynixify/packages/psycopg2/default.nix +++ /dev/null @@ -1,23 +0,0 @@ -# WARNING: This file was automatically generated. You should avoid editing it. -# If you run pynixify again, the file will be either overwritten or -# deleted, and you will lose the changes you made to it. - -{ buildPythonPackage, fetchPypi, lib }: - -buildPythonPackage rec { - pname = "psycopg2"; - version = "2.9.1"; - - src = fetchPypi { - inherit pname version; - sha256 = "0z0v2d5gpgy0wf2ypqxv955c9k44yszd7r20km5s79yhy6k06lyy"; - }; - - # TODO FIXME - doCheck = false; - - meta = with lib; { - description = "psycopg2 - Python-PostgreSQL Database Adapter"; - homepage = "https://psycopg.org/"; - }; -} diff --git a/nix/pkgs/baserow/backend/pynixify/packages/typing-extensions/default.nix b/nix/pkgs/baserow/backend/pynixify/packages/typing-extensions/default.nix index e4f08fe803..9942afa439 100644 --- a/nix/pkgs/baserow/backend/pynixify/packages/typing-extensions/default.nix +++ b/nix/pkgs/baserow/backend/pynixify/packages/typing-extensions/default.nix @@ -2,11 +2,12 @@ # If you run pynixify again, the file will be either overwritten or # deleted, and you will lose the changes you made to it. -{ buildPythonPackage, fetchPypi, lib }: +{ buildPythonPackage, fetchPypi, lib, flit-core }: buildPythonPackage rec { pname = "typing-extensions"; version = "4.4.0"; + format = "pyproject"; src = fetchPypi { inherit version; @@ -14,6 +15,10 @@ buildPythonPackage rec { sha256 = "1al7634rq9zqw1s7d1nbry0l23c05s0wrc8jihcxvy1bp55l648m"; }; + nativeBuildInputs = [ + flit-core + ]; + # TODO FIXME doCheck = false;