diff --git a/new.nix b/new.nix index 6e77490a9d800faf2c0857aed35786049e9d78ab..7223f96e8633605a977b73d634b7c7406a6e181b 100644 --- a/new.nix +++ b/new.nix @@ -6,44 +6,14 @@ in , mach-nix ? import sources.mach-nix { inherit pkgs pypiData; python = "python27"; } , }: - let - python-challenge-bypass-ristretto = - ( - mach-nix.buildPythonPackage rec { - nativeBuildInputs = [ - pkgs.git - pkgs.rustPlatform.rust.rustc - pkgs.rustPlatform.rust.cargo - ]; - buildInputs = [ - pkgs.rustPlatform.cargoSetupHook - pkgs.python2.pkgs.milksnake - pkgs.python2.pkgs.setuptools-scm - ]; - cargoRoot = "challenge-bypass-ristretto-ffi"; - cargoDeps = pkgs.rustPlatform.fetchCargoTarball { - inherit src; - sourceRoot = "source/${cargoRoot}"; - sha256 = "sha256-ewqfNMaOZyNSs8epaviER63iUzljr4fbOeWd3WXYDO4="; - }; - format = "setuptools"; - src = pkgs.fetchFromGitHub { - owner = "LeastAuthority"; - repo = "python-challenge-bypass-ristretto"; - rev = "02482f4afe72521377d5bbe2dc1402fecd4c6a9a"; - sha256 = "sha256-PtyC1fk/WAOZvsCc2vK3XNDt/V21DT5Txdo09LmO8bc="; - fetchSubmodules = true; - leaveDotGit = true; - }; - version = "2021.07.12"; - } - ); - in mach-nix.buildPythonApplication rec { 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"; # Pure python packages that don't build correctly from sdists # - patches in nixpkgs that don't apply # - missing build dependencies @@ -64,7 +34,6 @@ in ) ]; format = "setuptools"; - overridesPre = [ (self: super: { inherit python-challenge-bypass-ristretto; }) ]; requirements = builtins.readFile ./requirements/base.txt; # Record some settings here, so downstream nix files can consume them. #meta.mach-nix = { inherit python providers; }; diff --git a/requirements/base.txt b/requirements/base.txt index 9a97c820a1161a1aee451b2fb50ea9312b542d72..928728b3d0ae03718d0c22073107fbef89d76ef9 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -111,7 +111,7 @@ pyopenssl==21.0.0 # twisted pyrsistent==0.16.1 # via eliot -python-challenge-bypass-ristretto==2021.7.12 +python-challenge-bypass-ristretto # via -r requirements/base.in pyutil==3.3.0 # via -r requirements/base.in