alembic: Fix install destinations#215528
Conversation
6213e65 to
ca23df9
Compare
PySide2 will not build its qt3d component unless qt3d is added to buildInputs. This is part of the effort to package Meshroom. (Related Meshroom PRs: NixOS#215528 and NixOS#215728)
82ad32c to
29bbc9c
Compare
|
Can you add the test ( |
Yeah, good point, I'll do that. If you're reviewing this PR atm: Please note that there's a minor correction I've made locally I haven't pushed yet: |
|
I tried to review and i haven't found an issue, but i'm not comfortable to review the cmake test, so i leave it to someone else. Thanks for your efforts! |
|
Marking this PR as a draft while I reorganize and improve it a bit |
|
Result of 3 packages failed to build:
1 package built:
The errors look unrelated: |
|
@davidak Thanks, I think those failures are fallout due to #212787 (more precisely, commit f386825).
I was going to create an issue, but it turns out issues already exist for those failures: #216580, #216390 |
The generated CMake targets file was referring to an incorrect destination as the derivation manually moved the libraries during installPhase, while CMake uses the path it thinks is going to be used (the DESTINATION in the install rule) in the IMPORTED_LOCATION property. By setting the install destinations via CMake flags (and patching the DESTINATION for the binary install rules), CMake will pick up the correct locations in the generated AlembicTargets-release.cmake file. Along with fixing that issue, this commit also includes the following changes: * Remove unused unzip nativeBuildInput * Enable unit tests * Add missing direct dependency ilmbase: Previously it was only picked up indirectly, resulting in CMake configuration warnings * Add ilmbase as propagatedBuildInput: Downstream users of Alembic (via CMake) need to add ilmbase as a dependency as well For some reason this is not discovered correctly otherwise * Use CMake setup hooks instead of setting buildPhase/installPhase
|
Result of 8 packages built:
|
davidak
left a comment
There was a problem hiding this comment.
Change looks good
Builds, works
Note: I've written a tester (testImportedCMakePackage) in order to prevent issues like the one described below in the future. It's written in a generic fashion and should be applicable to other CMake projects as well. It currently resides below alembic's directory, inpkgs/development/libraries/alembic/cmakePackageTests, as I'm not sure about the interest in such a tester. If there's interest in using it as a generic tester I could also move it topkgs/build-support/testers/. It is somewhat comparable to thehasPkgConfigModuletester that is already located there.Edit: I've moved the tester to a separate commit for now in order to streamline this PR a bit.
Description of changes
The generated CMake targets file was referring to an incorrect destination as the derivation manually moved the libraries during installPhase, while CMake uses the path it thinks is going to be used (the
DESTINATIONin the install rule) in theIMPORTED_LOCATIONproperty.By setting the install destinations via CMake flags (and patching the
DESTINATIONfor the binary install rules), CMake will pick up the correct locations in the generatedAlembicTargets-release.cmakefile.Along with fixing that issue, this commit also includes the following changes:
imathilmbase as propagatedBuildInput: Downstream users of Alembic (via CMake) need to addimathilmbase as a dependency as well. For some reason this is not discovered correctly otherwiseThings done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)nixos/doc/manual/md-to-db.shto update generated release notes