Skip to content
Snippets Groups Projects
shell.nix 956 B
Newer Older
  • Learn to ignore specific revisions
  • 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;
    
        overridesPre = [
          (
            self: super: {
              inherit tahoe-lafs;
            }
          )
        ];
    
          ${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 = [
    
        # Provide the linting tools for interactive usage.
        lint-python
        # Supply all of the runtime and testing dependencies.
        python-env
    
    Jean-Paul Calderone's avatar
    Jean-Paul Calderone committed
      ];
    }