summaryrefslogtreecommitdiffstats
path: root/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'default.nix')
-rw-r--r--default.nix128
1 files changed, 128 insertions, 0 deletions
diff --git a/default.nix b/default.nix
new file mode 100644
index 0000000..3afa202
--- /dev/null
+++ b/default.nix
@@ -0,0 +1,128 @@
+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 qrcode;
+ 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";
+ installFlags = [ "DESTDIR=$(out)" "prefix=" ];
+
+ src = pkgs.fetchFromGitHub {
+ owner = "joan2937";
+ repo = "pigpio";
+ rev = "v${version}";
+ sha256 = "1arq051dbki50rwhzdxjba3ispnl4vdw7mr244f5hmrk0p34frcy";
+ };
+ };
+
+ cygpio = buildPythonPackage {
+ pname = "cygpio";
+ version = "1.0.0";
+ src = ./cygpio;
+ propagatedBuildInputs = [ pigpio cython ];
+ };
+
+in buildPythonPackage rec {
+ name = "bitvend";
+ src = ./.;
+ doCheck = false;
+ propagatedBuildInputs = [
+ cygpio
+ flask
+ flask_sqlalchemy
+ websocket_client
+ cachetools
+ requests
+ prometheus_client
+ spaceauth
+ qrcode
+ ];
+}