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
|
||||
pkgs = import <nixpkgs> { };
|
||||
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;
|
||||
_final: prev: {
|
||||
selfprivacy-graphql-api = prev.callPackage ./pkgs/selfprivacy-graphql-api {
|
||||
pythonPackages = prev.python310Packages;
|
||||
};
|
||||
}
|
||||
|
|
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
|
||||
inherit (nixpkgs) pkgs;
|
||||
inherit pythonPkgs;
|
||||
|
||||
selfprivacy-graphql-api =
|
||||
{ buildPythonPackage
|
||||
, fetchPypi
|
||||
, setuptools
|
||||
, portalocker
|
||||
, pytz
|
||||
, pytest
|
||||
, pytest-mock
|
||||
, pytest-datadir
|
||||
, huey
|
||||
, gevent
|
||||
, mnemonic
|
||||
, pydantic
|
||||
, typing-extensions
|
||||
, strawberry_graphql
|
||||
, psutil
|
||||
, fastapi
|
||||
, uvicorn
|
||||
}:
|
||||
pythonPkgs.buildPythonApplication rec {
|
||||
pname = "selfprivacy-graphql-api";
|
||||
version = "2.0.9";
|
||||
src = builtins.fetchGit {
|
||||
url = "https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git";
|
||||
rev = "0a09a338b850704f221bd9b451519290584ef209";
|
||||
};
|
||||
propagatedBuildInputs = [
|
||||
setuptools
|
||||
portalocker
|
||||
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
|
||||
pythonPackages.buildPythonApplication rec {
|
||||
pname = "selfprivacy-graphql-api";
|
||||
version = "2.1.3"; # (version updates here are susceptible to human error)
|
||||
src = builtins.fetchGit {
|
||||
url = "https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git";
|
||||
rev = "b3a37e8b1fd50457b4d48b9421d77603437e6f2f";
|
||||
};
|
||||
propagatedBuildInputs = with pythonPackages; [
|
||||
fastapi
|
||||
gevent
|
||||
huey
|
||||
mnemonic
|
||||
portalocker
|
||||
psutil
|
||||
pydantic
|
||||
pytest
|
||||
pytest-datadir
|
||||
pytest-mock
|
||||
pytz
|
||||
redis
|
||||
setuptools
|
||||
strawberry-graphql
|
||||
typing-extensions
|
||||
uvicorn
|
||||
];
|
||||
meta = {
|
||||
description = ''
|
||||
SelfPrivacy Server Management API
|
||||
'';
|
||||
};
|
||||
passthru = {
|
||||
# TODO explain what's the purpose of this?
|
||||
pythonPath = pythonPackages.makePythonPath propagatedBuildInputs;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue