diff options
Diffstat (limited to 'pkgs/by-name/li/libcamera/package.nix')
-rw-r--r-- | pkgs/by-name/li/libcamera/package.nix | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/pkgs/by-name/li/libcamera/package.nix b/pkgs/by-name/li/libcamera/package.nix index a6a0fe8fa7c35..dabf457de7432 100644 --- a/pkgs/by-name/li/libcamera/package.nix +++ b/pkgs/by-name/li/libcamera/package.nix @@ -1,7 +1,6 @@ { stdenv , fetchgit , lib -, fetchpatch , meson , ninja , pkg-config @@ -33,12 +32,24 @@ stdenv.mkDerivation rec { hash = "sha256-x0Im9m9MoACJhQKorMI34YQ+/bd62NdAPc2nWwaJAvM="; }; - outputs = [ "out" "dev" "doc" ]; + outputs = [ "out" "dev" ]; postPatch = '' patchShebangs utils/ ''; + # libcamera signs the IPA module libraries at install time, but they are then + # modified by stripping and RPATH fixup. Therefore, we need to generate the + # signatures again ourselves. For reproducibility, we use a static private key. + # + # If this is not done, libcamera will still try to load them, but it will + # isolate them in separate processes, which can cause crashes for IPA modules + # that are not designed for this (notably ipa_rpi.so). + preBuild = '' + ninja src/ipa-priv-key.pem + install -D ${./ipa-priv-key.pem} src/ipa-priv-key.pem + ''; + strictDeps = true; buildInputs = [ @@ -86,6 +97,10 @@ stdenv.mkDerivation rec { # Avoid blanket -Werror to evade build failures on less # tested compilers. "-Dwerror=false" + # Documentation breaks binary compatibility. + # Given that upstream also provides public documentation, + # we can disable it here. + "-Ddocumentation=disabled" ]; # Fixes error on a deprecated declaration @@ -94,17 +109,6 @@ stdenv.mkDerivation rec { # Silence fontconfig warnings about missing config FONTCONFIG_FILE = makeFontsConf { fontDirectories = [ ]; }; - # libcamera signs the IPA module libraries at install time, but they are then - # modified by stripping and RPATH fixup. Therefore, we need to generate the - # signatures again ourselves. - # - # If this is not done, libcamera will still try to load them, but it will - # isolate them in separate processes, which can cause crashes for IPA modules - # that are not designed for this (notably ipa_rpi.so). - postFixup = '' - ../src/ipa/ipa-sign-install.sh src/ipa-priv-key.pem $out/lib/libcamera/ipa_*.so - ''; - meta = with lib; { description = "An open source camera stack and framework for Linux, Android, and ChromeOS"; homepage = "https://libcamera.org"; |