141 lines
3.3 KiB
Nix
141 lines
3.3 KiB
Nix
final: prev:
|
|
let
|
|
pkgs = final.pkgs;
|
|
version = "2.4";
|
|
|
|
frontend = pkgs.buildNpmPackage {
|
|
pname = "lenticular_cloud_js";
|
|
version = version;
|
|
src = ./.;
|
|
npmDepsHash = "sha256-L0EZHY1WN0zlnlUVm6d/EJIlC3Z/lod5d8dPNMsuw50=";
|
|
|
|
installPhase = ''
|
|
npm run build
|
|
mkdir -p $out
|
|
cp -r lenticular_cloud/static $out/
|
|
'';
|
|
};
|
|
in {
|
|
python3 = prev.python3.override {
|
|
packageOverrides = final: prev: with final; {
|
|
urlobject = buildPythonPackage rec {
|
|
pname = "URLObject";
|
|
version = "2.4.3";
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "47b2e20e6ab9c8366b2f4a3566b6ff4053025dad311c4bb71279bbcfa2430caa";
|
|
};
|
|
doCheck = true;
|
|
propagatedBuildInputs = [
|
|
];
|
|
};
|
|
flask-dance = buildPythonPackage rec {
|
|
pname = "Flask-Dance";
|
|
version = "7.0.0";
|
|
format = "pyproject";
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "a37dec5c3a21f13966178285d5c10691cd72203dcef8a01db802fef6287e716d";
|
|
};
|
|
doCheck = true;
|
|
propagatedBuildInputs = [
|
|
requests
|
|
oauthlib
|
|
requests_oauthlib
|
|
flask
|
|
urlobject
|
|
flit-core
|
|
];
|
|
checkInputs = [
|
|
pytest
|
|
nose
|
|
pytest-mock
|
|
responses
|
|
freezegun
|
|
coverage
|
|
# testing sqlalchemy support
|
|
sqlalchemy
|
|
flask_sqlalchemy
|
|
# testing integration with other extensions
|
|
flask_login
|
|
flask-caching
|
|
betamax
|
|
# we need the `signedtoken` extra for `oauthlib`
|
|
# oauthlib[signedtoken]
|
|
];
|
|
|
|
};
|
|
|
|
ory-hydra-client = buildPythonPackage {
|
|
pname = "ory-hydra-client";
|
|
version = "2.0.3";
|
|
src = ./libs/ory-hydra-client;
|
|
doCheck = false;
|
|
propagatedBuildInputs = [
|
|
urllib3
|
|
python-dateutil
|
|
attrs
|
|
httpx
|
|
];
|
|
};
|
|
flask = prev.flask.overridePythonAttrs (old: {
|
|
propagatedBuildInputs = old.propagatedBuildInputs ++ flask.optional-dependencies.async;
|
|
});
|
|
lenticular-cloud = buildPythonPackage {
|
|
pname = "lenticular_cloud";
|
|
version = version;
|
|
src = ./.;
|
|
postPatch = ''
|
|
cp -r ${frontend}/static ./lenticular_cloud/
|
|
'';
|
|
propagatedBuildInputs = [
|
|
flask
|
|
flask-restful
|
|
flask_sqlalchemy
|
|
flask_wtf
|
|
flask-babel
|
|
flask_login
|
|
requests
|
|
requests_oauthlib
|
|
# ldap3 # only needed for old upgrade
|
|
#ldap3-orm
|
|
pyotp
|
|
cryptography
|
|
blinker
|
|
authlib # as oauth client lib
|
|
flask_migrate # db migrations
|
|
flask-dance
|
|
ory-hydra-client
|
|
toml
|
|
webauthn pyopenssl
|
|
pyjwt
|
|
|
|
pkgs.nodejs
|
|
#node-env
|
|
gunicorn
|
|
psycopg2
|
|
];
|
|
testBuildInputs = [
|
|
pytest
|
|
pytest-mypy
|
|
flask_testing
|
|
tox
|
|
|
|
types-dateutil
|
|
types-toml
|
|
|
|
nose
|
|
mypy
|
|
|
|
];
|
|
|
|
doCheck = false;
|
|
checkInputs = [
|
|
pytest
|
|
];
|
|
};
|
|
};
|
|
};
|
|
lenticular-cloud = final.python3.pkgs.lenticular-cloud;
|
|
lenticular-cloud-frontend = frontend;
|
|
} |