Skip to content
Snippets Groups Projects
new.nix 1.42 KiB
Newer Older
  • Learn to ignore specific revisions
  • Tom Prince's avatar
    Tom Prince committed
    let
      sources = import nix/sources.nix;
    in
    { pkgs ? import sources.release2015 {}
    , pypiData ? sources.pypi-deps-db
    
    , mach-nix ? import sources.mach-nix { inherit pkgs pypiData; }
    
    Tom Prince's avatar
    Tom Prince committed
    ,
    }:
        mach-nix.buildPythonApplication rec {
    
    Tom Prince's avatar
    Tom Prince committed
          name = "zero-knowledge-access-pass-authorizer";
          src = ./.;
          providers = {
            _default = "sdist,nixpkgs,wheel";
    
            # not packaged in nixpkgs at all, we can use the binary wheel from
            # pypi though.
            python-challenge-bypass-ristretto = "wheel";
    
    Tom Prince's avatar
    Tom Prince committed
            # Pure python packages that don't build correctly from sdists
            # - patches in nixpkgs that don't apply
            # - missing build dependencies
            platformdirs = "wheel";
            boltons = "wheel";
            klein = "wheel";
            humanize = "wheel";
            chardet = "wheel";
            urllib3 = "wheel";
    
    Tom Prince's avatar
    Tom Prince committed
            zipp = "wheel";
    
    Tom Prince's avatar
    Tom Prince committed
          };
    
    Tom Prince's avatar
    Tom Prince committed
          _.tahoe-lafs.patches = [
            (
              pkgs.fetchpatch {
                url = "https://raw.githubusercontent.com/PrivateStorageio/nixpkgs/privatestorageio/pkgs/development/python-modules/tahoe-lafs/rsa-exponent.patch";
                sha256 = "sha256-0vIMj5gZPbKLkow6wpA+Tz7bpyy+mZRSSFGmpg0VMyk=";
              }
            )
          ];
    
    Tom Prince's avatar
    Tom Prince committed
          format = "setuptools";
          requirements = builtins.readFile ./requirements/base.txt;
          # Record some settings here, so downstream nix files can consume them.
    
          meta.mach-nix = { inherit python providers; };
    
    Tom Prince's avatar
    Tom Prince committed
        }