Merge pull request #495 from GlassGhost/patch-1

extended readme.md to explain how to provide shared object libraries and find which package provides them
This commit is contained in:
DavHau 2022-07-29 12:49:00 +02:00 committed by GitHub
commit f15ea8677d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -215,6 +215,29 @@ mach-nix.mkPython {
_.ldap0.buildInputs.add = [ openldap.dev cyrus_sasl.dev ]; _.ldap0.buildInputs.add = [ openldap.dev cyrus_sasl.dev ];
} }
```
### Example: add missing .so shared object library for instance you are getting a `Pyside on nixos ImportError: libgssapi_krb5.so.2` error
If you have nix-index package installed you should be able to find the package that should provide the lib fast with
nix-locate -1 -w libgssapi_krb5.so.2 | grep -v \(
libkrb5.out
krb5.out
hyperion-ng.out
Once you have decided on the lib in this case libkrb5 for pyside2
```nix
...
with mach-nix.nixpkgs;
mach-nix.mkPython {
requirements = "web2ldap";
# add missing os library to libkrb5
_.pyside2.buildInputs.add = with pkgs; [ libkrb5 ]; # LINE ADDED
}
``` ```
## Overrides (overridesPre / overridesPost) ## Overrides (overridesPre / overridesPost)