summaryrefslogtreecommitdiff
path: root/default.nix
diff options
context:
space:
mode:
authorTom Harley2021-07-03 00:18:13 +0000
committerTom Harley2021-07-03 00:18:13 +0000
commit7c5c6c52250ca57257ab4af2cc9cdf4425595ec0 (patch)
treed36019286125bf984e0c267645d53ff562533ebf /default.nix
downloadswap-7c5c6c52250ca57257ab4af2cc9cdf4425595ec0.tar.gz
swap-7c5c6c52250ca57257ab4af2cc9cdf4425595ec0.zip

Initial commit

Diffstat (limited to 'default.nix')
-rw-r--r--default.nix36
1 files changed, 36 insertions, 0 deletions
diff --git a/default.nix b/default.nix
new file mode 100644
index 0000000..91d8df4
--- /dev/null
+++ b/default.nix
@@ -0,0 +1,36 @@
+with import <nixpkgs> {};
+
+let
+
+ # werkzeug workaround related to:
+ # https://github.com/NixOS/nixpkgs/issues/72345#issuecomment-812970457
+
+ my-python-packages = (pypkgs: let
+ werkzeug' = pypkgs.werkzeug.overrideAttrs (old: {
+ postPatch = ''
+ substituteInPlace src/werkzeug/_reloader.py \
+ --replace "rv = [sys.executable]" "return sys.argv"
+ '';
+ doCheck = false;
+ });
+
+ flask' = pypkgs.flask.override { werkzeug = werkzeug'; };
+
+ in with pypkgs; [
+ flask'
+ pytest
+ docopt
+ coverage
+ black
+ ]);
+
+ python' = python3.withPackages my-python-packages;
+
+in
+ stdenv.mkDerivation {
+ name = "trseubgti";
+ buildInputs = [
+ python'
+ ag
+ ];
+ }