diff options
author | Ben Wolsieffer <benwolsieffer@gmail.com> | 2022-09-15 17:46:49 -0400 |
---|---|---|
committer | Ben Wolsieffer <benwolsieffer@gmail.com> | 2022-10-19 20:37:46 -0400 |
commit | 2610d7dee38c830e297a16ebbd490492f5243a19 (patch) | |
tree | 420acbcb0021b21513b8627f9c2666334e2051bc | |
parent | 74553acb65e314b7922baaf4a47f8bad3918a4b1 (diff) | |
download | nixpkgs-2610d7dee38c830e297a16ebbd490492f5243a19.tar nixpkgs-2610d7dee38c830e297a16ebbd490492f5243a19.tar.gz nixpkgs-2610d7dee38c830e297a16ebbd490492f5243a19.tar.bz2 nixpkgs-2610d7dee38c830e297a16ebbd490492f5243a19.tar.lz nixpkgs-2610d7dee38c830e297a16ebbd490492f5243a19.tar.xz nixpkgs-2610d7dee38c830e297a16ebbd490492f5243a19.tar.zst nixpkgs-2610d7dee38c830e297a16ebbd490492f5243a19.zip |
libcamera: fix IPA module signatures
Nix modifies binaries after they are installed, which results in the wrong signature. There is no easy way to avoid these modifications, so the best fix is to simply regenerate the signatures after the fixup phase.
-rw-r--r-- | pkgs/development/libraries/libcamera/default.nix | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pkgs/development/libraries/libcamera/default.nix b/pkgs/development/libraries/libcamera/default.nix index ab2095be8fc..0f465a4de6e 100644 --- a/pkgs/development/libraries/libcamera/default.nix +++ b/pkgs/development/libraries/libcamera/default.nix @@ -85,6 +85,17 @@ stdenv.mkDerivation { # 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"; |