Change:
Describe the bug , which provides the "pam" namespace to everything in python-packages. This is fine, except this also broke the definition of , which packages the same library at the same version. To Reproduce Steps to reproduce the behavior: build result/lib/python3.8/site- points at a non-existent SO in the "pam" Python package Expected behavior Only one, working definition of this Python package. Additional context Add any other context about the problem here. Notify maintainers <!-- Please @ people who are in the list of the offending package or module. If in doubt, check for whoever last touched something. -- Metadata Please run and paste the result. system: host os: multi-user?: sandbox: version: nixpkgs: Maintainer information:
The problem is that the python-pam probably is referencing the pam python package from the current scope, which I solved in my package by inheriting from the parent scope. The reason why pam was created in the first place is because I got confused because of the name and I imagine the reason it was named python-pam by the original author is to solve the inherit issue in another way, namely renaming it. I'd be in favour of the name "pam" because that's how the module is being called (unless both modules do have differences, then we need both)
I'm not particularly fussed about which one "wins", just that we should probably only have one of them. I agree that "pam" is probably a better name - it's just a little unergonomic to use in the tree.
Thanks for reporting. See

Discussion:
<del> { lib , buildPythonPackage , fetchFromGitHub , pam }: buildPythonPackage rec { pname = "python-pam"; version = "1.8.4"; src = fetchFromGitHub { owner = "FirefighterBlu3"; repo = pname; rev = "v${version}"; sha256 = "0gp7vzd332j7jwndcnz7kc9j283d6lyv32bndd1nqv9ghzv69sxp"; }; buildInputs = [ pam ]; postPatch = '' sed "s|find_library("pam")|"${pam}/lib/libpam.so"|g" -i pam.py ''; meta = with lib; { description = "Python pam module supporting py3 (and py2)"; homepage = "https://github.com/FirefighterBlu3/python-pam"; license = licenses.mit; maintainers = with maintainers; [ mkg20001 ]; }; } </del>

<del> { stdenv, buildPythonPackage, fetchPypi, pam }: </del> <ins> { lib , buildPythonPackage , fetchFromGitHub , pam }: </ins> buildPythonPackage rec { pname = "python-pam"; version = "1.8.4"; <del> src = fetchPypi { inherit pname version; sha256 = "16whhc0vr7gxsbzvsnq65nq8fs3wwmx755cavm8kkczdkz4djmn8"; </del> <ins> src = fetchFromGitHub { owner = "FirefighterBlu3"; repo = pname; rev = "v${version}"; sha256 = "0gp7vzd332j7jwndcnz7kc9j283d6lyv32bndd1nqv9ghzv69sxp"; </ins> }; <ins> buildInputs = [ pam ]; </ins> postPatch = '' <del> substituteInPlace pam.py --replace 'find_library("pam")'  '"${pam}/lib/libpam${stdenv.hostPlatform.extensions.sharedLibrary}"' </del> <ins> sed "s|find_library("pam")|"${pam}/lib/libpam.so"|g" -i pam.py </ins> ''; <del> meta = with stdenv.lib; { description = "Python PAM module using ctypes"; </del> <ins> meta = with lib; { description = "Python pam module supporting py3 (and py2)"; </ins> homepage = "https://github.com/FirefighterBlu3/python-pam"; <del> maintainers = with maintainers; [ abbradar ]; </del> license = licenses.mit; <ins> maintainers = with maintainers; [ abbradar mkg20001 ]; </ins> }; }

palettable = callPackage ../development/python-modules/palettable { }; <del> pam = callPackage ../development/python-modules/pam { inherit (pkgs) pam; }; </del> <ins> # Alias. Added 2020-09-07. pam = self.python-pam; </ins> pamela = callPackage ../development/python-modules/pamela { };

python-packer = callPackage ../development/python-modules/python-packer { }; <del> python-pam = callPackage ../development/python-modules/python-pam { }; </del> <ins> python-pam = callPackage ../development/python-modules/python-pam { inherit (pkgs) pam; }; </ins> python-periphery = callPackage ../development/python-modules/python-periphery { };