mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nix-repo.git
synced 2024-11-22 20:21:27 +00:00
transition to flakes
This commit is contained in:
parent
c6c151faec
commit
53ed9b3f5f
39
default.nix
39
default.nix
|
@ -1,38 +1,5 @@
|
||||||
let
|
_final: prev: {
|
||||||
pkgs = import <nixpkgs> { };
|
selfprivacy-graphql-api = prev.callPackage ./pkgs/selfprivacy-graphql-api {
|
||||||
in
|
pythonPackages = prev.python310Packages;
|
||||||
|
|
||||||
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;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
11
flake.nix
Normal file
11
flake.nix
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
description = "Selfprivacy overlay";
|
||||||
|
|
||||||
|
outputs = { ... }: {
|
||||||
|
overlay = _final: prev: {
|
||||||
|
selfprivacy-graphql-api = prev.callPackage ./pkgs/selfprivacy-graphql-api {
|
||||||
|
pythonPackages = prev.python310Packages;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,61 +1,37 @@
|
||||||
{ nixpkgs ? import <nixpkgs> { }, pythonPkgs ? nixpkgs.pkgs.python39Packages }:
|
{ pythonPackages }:
|
||||||
|
|
||||||
let
|
pythonPackages.buildPythonApplication rec {
|
||||||
inherit (nixpkgs) pkgs;
|
pname = "selfprivacy-graphql-api";
|
||||||
inherit pythonPkgs;
|
version = "2.1.3"; # (version updates here are susceptible to human error)
|
||||||
|
src = builtins.fetchGit {
|
||||||
selfprivacy-graphql-api =
|
url = "https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git";
|
||||||
{ buildPythonPackage
|
rev = "b3a37e8b1fd50457b4d48b9421d77603437e6f2f";
|
||||||
, fetchPypi
|
};
|
||||||
, setuptools
|
propagatedBuildInputs = with pythonPackages; [
|
||||||
, portalocker
|
fastapi
|
||||||
, pytz
|
gevent
|
||||||
, pytest
|
huey
|
||||||
, pytest-mock
|
mnemonic
|
||||||
, pytest-datadir
|
portalocker
|
||||||
, huey
|
psutil
|
||||||
, gevent
|
pydantic
|
||||||
, mnemonic
|
pytest
|
||||||
, pydantic
|
pytest-datadir
|
||||||
, typing-extensions
|
pytest-mock
|
||||||
, strawberry_graphql
|
pytz
|
||||||
, psutil
|
redis
|
||||||
, fastapi
|
setuptools
|
||||||
, uvicorn
|
strawberry-graphql
|
||||||
}:
|
typing-extensions
|
||||||
pythonPkgs.buildPythonApplication rec {
|
uvicorn
|
||||||
pname = "selfprivacy-graphql-api";
|
];
|
||||||
version = "2.0.9";
|
meta = {
|
||||||
src = builtins.fetchGit {
|
description = ''
|
||||||
url = "https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git";
|
SelfPrivacy Server Management API
|
||||||
rev = "0a09a338b850704f221bd9b451519290584ef209";
|
'';
|
||||||
};
|
};
|
||||||
propagatedBuildInputs = [
|
passthru = {
|
||||||
setuptools
|
# TODO explain what's the purpose of this?
|
||||||
portalocker
|
pythonPath = pythonPackages.makePythonPath propagatedBuildInputs;
|
||||||
pytz
|
};
|
||||||
pytest
|
}
|
||||||
pytest-mock
|
|
||||||
pytest-datadir
|
|
||||||
huey
|
|
||||||
gevent
|
|
||||||
mnemonic
|
|
||||||
pydantic
|
|
||||||
typing-extensions
|
|
||||||
strawberry_graphql
|
|
||||||
psutil
|
|
||||||
fastapi
|
|
||||||
uvicorn
|
|
||||||
];
|
|
||||||
meta = {
|
|
||||||
description = ''
|
|
||||||
SelfPrivacy Server Management API
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
passthru = {
|
|
||||||
pythonPath = pythonPkgs.makePythonPath propagatedBuildInputs;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
drv = pythonPkgs.callPackage selfprivacy-graphql-api { };
|
|
||||||
in
|
|
||||||
drv
|
|
||||||
|
|
Loading…
Reference in a new issue