From 2e8df889dca76fb868721a8dd1b9eaf29c663ea0 Mon Sep 17 00:00:00 2001 From: 1000101 Date: Wed, 1 Jan 2020 15:53:10 +0100 Subject: [PATCH] python: allow nix build from directory (#781) --- python/default.nix | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 python/default.nix diff --git a/python/default.nix b/python/default.nix new file mode 100644 index 000000000..2c3118f6b --- /dev/null +++ b/python/default.nix @@ -0,0 +1,20 @@ +with import {}; + +let + python = let + packageOverrides = self: super: { + trezor = super.trezor.overridePythonAttrs(old: rec { + version = "master"; + src = ./.; + doCheck = true; # set to false if you want to skip tests + checkPhase = '' + runHook preCheck + pytest --pyargs tests --ignore tests/test_tx_api.py + runHook postCheck + ''; + }); + }; + in pkgs.python3.override {inherit packageOverrides; self = python;}; + +in python.withPackages(ps:[ps.trezor]) +