How to import deps.nix to package

Hi,
I used pip2nix to convert a requirements.txt to deps.nix (result here ) but I don’t know how to import this file into my default.nix

Here is my default.nix:

{ buildPythonPackage
, lib
, fetchPypi
, pkgs
, fetchurl
}:
let
  python = import ./deps.nix { inherit pkgs; };
in buildPythonPackage rec {
  pname = "ansible-aisnippet";
  version = "0.1.2";
  format = "pyproject";

  src = fetchPypi {
    inherit pname version;
    sha256 = "fbb618ca911867bce45574c1639618cdfb5d94e207432b19bc19563d80d2f171";
  };
  
  propagatedBuildInputs = builtins.attrValues python.packages;
  doCheck = false;
}

When I run the build, I stuck on this:

➜  ansible-aisnippet git:(ansible-aisnippet) ✗ nix-build -E 'with import <nixpkgs> {}; python310Packages.callPackage ./default.nix {}' 
error:
       … while evaluating the attribute 'drvPath'

         at /nix/store/0n7kd1zwy8mlh11vr9n2b21k4yq06x50-nixpkgs/nixpkgs/lib/customisation.nix:228:7:

          227|     in commonAttrs // {
          228|       drvPath = assert condition; drv.drvPath;
             |       ^
          229|       outPath = assert condition; drv.outPath;

       … while calling the 'derivationStrict' builtin

         at //builtin/derivation.nix:9:12: (source not available)

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: function 'anonymous lambda' called without required argument 'fetchurl'

       at /home/kiko/Documents/nixpkgs/pkgs/development/python-modules/ansible-aisnippet/deps.nix:4:1:

            3|
            4| { pkgs, fetchurl, fetchgit, fetchhg }:
             | ^
            5|

Does anyone have a solution? Thank you very much in advance

This should help you: Overriding Python packages.