File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6161 pypiDataSha256 =
6262 "0499zl39aia74f0i7fkn5dsy8244dkmcw4vzd5nf4kai605j2jli" ;
6363 } ) ;
64+ # This wrapper allows to setup both the production as well as the
65+ # development Python environments in the same way (albeit having
66+ # different requirements.txt).
67+ getPythonEnv = system : requirements :
68+ machnixFor . ${ system } . mkPython {
69+ requirements = ''
70+ ${ requirements }
71+ '' ;
72+ # Fix an issue with an upstream dep of GitPython.
73+ # https://github.com/DavHau/mach-nix/issues/287
74+ # See https://github.com/DavHau/mach-nix/issues/318
75+ _ . gitpython . propagatedBuildInputs . mod = pySelf : self : oldVal :
76+ oldVal ++ [ pySelf . typing-extensions ] ;
77+ } ;
6478
6579 in {
6680
6781 # A Nixpkgs overlay.
6882 overlay = final : prev :
6983 with final . pkgs ; {
7084
71- pythonEnv = machnixFor . ${ system } . mkPython {
72- requirements = ''
73- ${ requirements }
74- '' ;
75- } ;
85+ pythonEnv = getPythonEnv system requirements ;
7686
7787 vulnerablecode = stdenv . mkDerivation {
7888 inherit version ;
117127 # Tests run by 'nix flake check' and by Hydra.
118128 checks = forAllSystems ( system :
119129 let
120- pythonEnvDev = machnixFor . ${ system } . mkPython {
121- requirements = ''
122- ${ requirements }
123- ${ requirementsDev }
124- '' ;
125- } ;
130+ pythonEnvDev = getPythonEnv system ''
131+ ${ requirements }
132+ ${ requirementsDev }
133+ '' ;
126134
127135 in {
128136 inherit ( self . packages . ${ system } ) vulnerablecode ;
You can’t perform that action at this time.
0 commit comments