From 5a51cd46a0c65dc7e70a9741264ec1268c00567b Mon Sep 17 00:00:00 2001 From: GlassGhost Date: Thu, 21 Jul 2022 09:31:29 -0500 Subject: [PATCH] Update examples.md extended description to explain how to provide shared object libraries and find which package provides them --- examples.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/examples.md b/examples.md index a362f19..03fbcbc 100644 --- a/examples.md +++ b/examples.md @@ -215,6 +215,29 @@ mach-nix.mkPython { _.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)