From 6bcfa9452f861604ce88cb168df4b7be5881dc97 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 17 Mar 2023 14:18:59 +0300 Subject: [PATCH] refactor: Simplify overlay, move to NixOS 22.11 --- default.nix | 30 +------------- pkgs/selfprivacy-api/default.nix | 53 ------------------------ pkgs/selfprivacy-graphql-api/default.nix | 6 +-- 3 files changed, 4 insertions(+), 85 deletions(-) delete mode 100644 pkgs/selfprivacy-api/default.nix diff --git a/default.nix b/default.nix index c8189c0..7cd2e57 100644 --- a/default.nix +++ b/default.nix @@ -3,36 +3,8 @@ let in self: super: rec { - python39 = super.python39.override { - packageOverrides = python-self: python-super: { - strawberry_graphql = python-super.buildPythonPackage rec { - pname = "strawberry-graphql"; - version = "0.123.0"; - format = "pyproject"; - patches = [ - ./strawberry-graphql.patch - ]; - propagatedBuildInputs = with self.python39Packages; [ - typing-extensions - graphql-core - python-multipart - python-dateutil - flask - pydantic - pygments - poetry - ]; - src = python-super.fetchPypi { - inherit pname version; - sha256 = "sha256-KsmZ5Xv8tUg6yBxieAEtvoKoRG60VS+iVGV0X6oCExo="; - }; - }; - }; - }; - pythonPackages = python39.pkgs; - selfprivacy-api = super.callPackage ./pkgs/selfprivacy-api {}; selfprivacy-graphql-api = super.callPackage ./pkgs/selfprivacy-graphql-api { nixpkgs = pkgs; - pythonPkgs = pythonPackages; + pythonPkgs = super.python310Packages; }; } diff --git a/pkgs/selfprivacy-api/default.nix b/pkgs/selfprivacy-api/default.nix deleted file mode 100644 index bc4b67d..0000000 --- a/pkgs/selfprivacy-api/default.nix +++ /dev/null @@ -1,53 +0,0 @@ -{ nixpkgs ? import { }, pythonPkgs ? nixpkgs.pkgs.python39Packages }: - -let - inherit (nixpkgs) pkgs; - inherit pythonPkgs; - - selfprivacy-api = - { buildPythonPackage - , flask - , flask-restful - , setuptools - , portalocker - , flask-swagger - , flask-swagger-ui - , pytz - , pytest - , pytest-mock - , pytest-datadir - , huey - , gevent - , mnemonic - }: - buildPythonPackage rec { - pname = "selfprivacy-api"; - version = "1.2.6"; - src = builtins.fetchGit { - url = "https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git"; - rev = "401dff23fb9223e8a0a4bd3ee942c61e471a07ab"; - }; - propagatedBuildInputs = [ - flask - flask-restful - setuptools - portalocker - flask-swagger - flask-swagger-ui - pytz - pytest - pytest-mock - pytest-datadir - huey - gevent - mnemonic - ]; - meta = { - description = '' - SelfPrivacy Server Management API - ''; - }; - }; - drv = pythonPkgs.callPackage selfprivacy-api { }; -in -if pkgs.lib.inNixShell then drv.env else drv diff --git a/pkgs/selfprivacy-graphql-api/default.nix b/pkgs/selfprivacy-graphql-api/default.nix index 1e4e3b9..894e816 100644 --- a/pkgs/selfprivacy-graphql-api/default.nix +++ b/pkgs/selfprivacy-graphql-api/default.nix @@ -18,7 +18,7 @@ let , mnemonic , pydantic , typing-extensions - , strawberry_graphql + , strawberry-graphql , psutil , fastapi , uvicorn @@ -29,7 +29,7 @@ let version = "2.1.1"; src = builtins.fetchGit { url = "https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git"; - rev = "1035f9215d72800a71b4918b71fb4eb633432f5f"; + rev = "6aadbabbc4da5dca0a704b9b1a0a3ee58e81bca5"; }; propagatedBuildInputs = [ setuptools @@ -43,7 +43,7 @@ let mnemonic pydantic typing-extensions - strawberry_graphql + strawberry-graphql psutil fastapi uvicorn