summaryrefslogtreecommitdiff
path: root/default.nix
blob: 4f10756ace9ee0105890fda7cb46c8edbe7e52c2 (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
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 nixfmt ];
}