Skip to content
Snippets Groups Projects
shell.nix 1.01 KiB
Newer Older
Jean-Paul Calderone's avatar
Jean-Paul Calderone committed
# Note: Passing arguments through here to customize the environment does not
# work on Nix 2.3.  It works with Nix 2.5.  I'm not sure about 2.4.
{ ... }@args:
  tests = import ./tests.nix args;
  inherit (tests) privatestorage lint-python;
  inherit (privatestorage) pkgs mach-nix tahoe-lafs zkapauthorizer;

  python-env = mach-nix.mkPython {
    inherit (zkapauthorizer.meta.mach-nix) python;
    providers = zkapauthorizer.meta.mach-nix.providers // {
      jedi = "wheel";
      parso = "wheel";
    };
    overridesPre = [
      (
        self: super: {
          inherit tahoe-lafs;
        }
      )
    ];
      ${builtins.readFile ./docs/requirements.txt}
      ${builtins.readFile ./requirements/test.in}
      ${zkapauthorizer.requirements}
      '';
Jean-Paul Calderone's avatar
Jean-Paul Calderone committed
pkgs.mkShell {
  # Avoid leaving .pyc all over the source tree when manually triggering tests
  # runs.
  buildInputs = [
Jean-Paul Calderone's avatar
Jean-Paul Calderone committed
  ];
}