summaryrefslogtreecommitdiff
path: root/default.nix
blob: 1e3c79e10f1f3d0d34a19218a91d68311e0cc914 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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; [
    werkzeug'
    flask'
    pytest
    docopt
    coverage
    black
  ]); 

  python' = python3.withPackages my-python-packages;

in
  stdenv.mkDerivation {
    name = "trseubgti";
    buildInputs = [
      python'
      ag
    ];
  }