126 lines
2.8 KiB
Nix
126 lines
2.8 KiB
Nix
with import <nixpkgs> {};
|
|
|
|
let
|
|
upstream = with pkgs.python3Packages; {
|
|
inherit buildPythonPackage;
|
|
inherit fetchPypi;
|
|
|
|
inherit blinker;
|
|
inherit cachetools;
|
|
inherit cryptography;
|
|
inherit cython;
|
|
inherit flask;
|
|
inherit flask_login;
|
|
inherit flask_sqlalchemy;
|
|
inherit flask_wtf;
|
|
inherit mock;
|
|
inherit prometheus_client;
|
|
inherit pyjwt;
|
|
inherit pytest;
|
|
inherit pyserial;
|
|
inherit qrcode;
|
|
inherit raspberrypi-tools;
|
|
inherit requests;
|
|
inherit six;
|
|
};
|
|
|
|
in with upstream; let
|
|
websocket_client = buildPythonPackage rec {
|
|
version = "0.40.0";
|
|
pname = "websocket_client";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "1yz67wdjijrvwpx0a0f6wdfy8ajsvr9xbj5514ld452fqnh19b20";
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
six
|
|
];
|
|
};
|
|
|
|
oauthlib = buildPythonPackage rec {
|
|
pname = "oauthlib";
|
|
version = "2.1.0";
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "0qj183fipjzw6ipiv2k10896y97sxvargnkb6db5qs61c5d6cddc";
|
|
};
|
|
|
|
checkInputs = [ mock pytest ];
|
|
propagatedBuildInputs = [ cryptography blinker pyjwt ];
|
|
|
|
checkPhase = ''
|
|
py.test tests/
|
|
'';
|
|
};
|
|
|
|
requests_oauthlib = buildPythonPackage rec {
|
|
pname = "requests-oauthlib";
|
|
version = "1.0.0";
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "0gys581rqjdlv0whhqp5s2caxx66jzvb2hslxn8v7bypbbnbz1l8";
|
|
};
|
|
|
|
doCheck = false;
|
|
propagatedBuildInputs = [ oauthlib requests ];
|
|
};
|
|
|
|
flask_oauthlib = buildPythonPackage rec {
|
|
pname = "Flask-OAuthlib";
|
|
version = "0.9.5";
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "01llysn53jfrr9n02hvjcynrb28lh4rjqn18k2hhk6an09cq7znb";
|
|
};
|
|
|
|
doCheck = false;
|
|
propagatedBuildInputs = [ flask flask_sqlalchemy requests_oauthlib oauthlib ];
|
|
};
|
|
|
|
spaceauth = buildPythonPackage rec {
|
|
pname = "Flask-SpaceAuth";
|
|
version = "0.2.0";
|
|
|
|
src = pkgs.fetchgit {
|
|
url = "https://code.hackerspace.pl/informatic/flask-spaceauth";
|
|
rev = "v${version}";
|
|
sha256 = "000vg41lw4pyd10bvcqrp15y673qlpkllgppfhm48w7vk02r6zi2";
|
|
};
|
|
|
|
propagatedBuildInputs = [ flask flask_login flask_oauthlib flask_wtf requests ];
|
|
};
|
|
|
|
pigpio = stdenv.mkDerivation rec {
|
|
pname = "pigpio";
|
|
version = "74-q3k";
|
|
installFlags = [ "DESTDIR=$(out)" "prefix=" ];
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
owner = "q3k";
|
|
repo = "pigpio";
|
|
rev = "5a0b27c997631b3ba1a7778a176b6f5462233be4";
|
|
sha256 = "1b55bzfsyghd2lrfqmz6g935zsmwnhbcscb4g11hxm3g7a68g9vv";
|
|
};
|
|
|
|
propagatedBuildInputs = [ raspberrypi-tools ];
|
|
};
|
|
|
|
in buildPythonPackage rec {
|
|
name = "bitvend";
|
|
src = ./.;
|
|
doCheck = false;
|
|
propagatedBuildInputs = [
|
|
flask
|
|
flask_sqlalchemy
|
|
websocket_client
|
|
cachetools
|
|
requests
|
|
prometheus_client
|
|
spaceauth
|
|
qrcode
|
|
pyserial
|
|
];
|
|
}
|