mach-nix icon indicating copy to clipboard operation
mach-nix copied to clipboard

Proper name of dm.xmlsec.binding causes error

Open spease opened this issue 4 years ago • 2 comments

Trying to use python-saml, which has dm.xmlsec.binding as a dependency.

Using this:

      (mach-nix.buildPythonPackage rec {
        pname = "dm.xmlsec.binding";
        version = "1.3.2";
        buildInputs = [ pkgs.libxml2 pkgs.libxmlsec1 ];
        requirements = "lxml>=3.0";
        src = "https://files.pythonhosted.org/packages/0c/47/c8e17a5fec7bc86b092ba6841c2db7ce5e828327eb72d6a8c4c93a19f62e/dm.xmlsec.binding-${version}.tar.gz";
      })

I'm getting this:

error: attribute 'dm' missing

       at /nix/store/zd5pi8sj0gl2k7jrsnipvrp3lvwd800r-mach_nix_file/share/mach_nix_file.nix:622:36:

          621|     };
          622|     "dm.xmlsec.binding" = override python-super.dm.xmlsec.binding ( oldAttrs:
             |                                    ^
          623|       (mapAttrs (n: v: if elem n depNamesOther then map (dep: updatePythonDepsRec python-self dep) v else v ) oldAttrs) // {
(use '--show-trace' to show detailed location information)

If I change the pname to, say, dm-xmlsec-binding, then it can't find the package from packagesExtra and I'm back at square one.

spease avatar Nov 20 '21 17:11 spease

Hey, could you check if https://github.com/DavHau/mach-nix/pull/359 fixes that?

DavHau avatar Nov 25 '21 06:11 DavHau

I tried it tonight, and I'm not sure.

With your patch:

One thing that seems to have changed is that I need to add a space to the requirements string for a package which doesn't need any, which doesn't get detected properly without another manual extraPackages entry (mysql-python).

dm.xmlsec.binding still doesn't get found without a manual extraPackage.

With my original extraPackages, I get:

Error : cannot get LibXML2 pre-processor and compiler flags; do you have the `libxml2` development package installed?

If I move both dependencies to nativeBuildInputs, I now get this error:

Error: cannot get XMLSec1 pre-processor and compiler flags; do you have the `libxmlsec1` development package installed?

Which I can't seem to clear no matter what I try. But both these errors are independent of the patch, so I'm not sure what changed.

spease avatar Nov 26 '21 03:11 spease