diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-06-16 06:56:35 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-06-16 06:56:35 +0000 |
commit | 99fcaeccb89621dd492203ce1f2d551c06f228ed (patch) | |
tree | 41cb730ae07383004789779b0f6e11cb3f4642a3 /nixpkgs/pkgs/development/libraries/alembic | |
parent | 59c5f5ac8682acc13bb22bc29c7cf02f7d75f01f (diff) | |
parent | 75a5ebf473cd60148ba9aec0d219f72e5cf52519 (diff) | |
download | nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.gz nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.bz2 nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.lz nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.xz nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.zst nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.zip |
Merge branch 'nixos-unstable' of https://github.com/NixOS/nixpkgs
Conflicts: nixpkgs/nixos/modules/config/console.nix nixpkgs/nixos/modules/services/mail/mailman.nix nixpkgs/nixos/modules/services/mail/public-inbox.nix nixpkgs/nixos/modules/services/mail/rss2email.nix nixpkgs/nixos/modules/services/networking/ssh/sshd.nix nixpkgs/pkgs/applications/networking/instant-messengers/dino/default.nix nixpkgs/pkgs/applications/networking/irc/weechat/default.nix nixpkgs/pkgs/applications/window-managers/sway/default.nix nixpkgs/pkgs/build-support/go/module.nix nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix nixpkgs/pkgs/development/interpreters/python/default.nix nixpkgs/pkgs/development/node-packages/overrides.nix nixpkgs/pkgs/development/tools/b4/default.nix nixpkgs/pkgs/servers/dict/dictd-db.nix nixpkgs/pkgs/servers/mail/public-inbox/default.nix nixpkgs/pkgs/tools/security/pinentry/default.nix nixpkgs/pkgs/tools/text/unoconv/default.nix nixpkgs/pkgs/top-level/all-packages.nix
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/alembic')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/alembic/default.nix | 60 |
1 files changed, 42 insertions, 18 deletions
diff --git a/nixpkgs/pkgs/development/libraries/alembic/default.nix b/nixpkgs/pkgs/development/libraries/alembic/default.nix index 667d334c9026..4efa425ee28b 100644 --- a/nixpkgs/pkgs/development/libraries/alembic/default.nix +++ b/nixpkgs/pkgs/development/libraries/alembic/default.nix @@ -1,37 +1,61 @@ -{ lib, stdenv, fetchFromGitHub, unzip, cmake, openexr, hdf5-threadsafe }: +{ lib, stdenv, fetchFromGitHub, cmake, openexr, hdf5-threadsafe, ilmbase }: stdenv.mkDerivation rec { pname = "alembic"; - version = "1.8.3"; + version = "1.8.5"; src = fetchFromGitHub { owner = "alembic"; repo = "alembic"; rev = version; - sha256 = "sha256-QnqUD8KmMDmEZ1REoKN70SwVICOdyGPZsB/lU9nojj4="; + sha256 = "sha256-wJVx0rwK0Qk07jlP0DyEAZUrAD+47qcVXSnTh5ngZG8="; }; + # note: out is unused (but required for outputDoc anyway) outputs = [ "bin" "dev" "out" "lib" ]; - nativeBuildInputs = [ unzip cmake ]; - buildInputs = [ openexr hdf5-threadsafe ]; + # Prevent cycle between bin and dev (only occurs on Darwin for some reason) + propagatedBuildOutputs = [ "lib" ]; - buildPhase = '' - cmake -DUSE_HDF5=ON -DCMAKE_INSTALL_PREFIX=$out/ -DUSE_TESTS=OFF . + nativeBuildInputs = [ cmake ]; - mkdir $out - mkdir -p $bin/bin - mkdir -p $dev/include - mkdir -p $lib/lib - ''; + # NOTE: Alembic also support imath instead of ilmbase, but some users of Alembic (e.g. Blender) + # are incompatible with the imath version of Alembic + buildInputs = [ openexr hdf5-threadsafe ilmbase ]; + + # Downstream packages trying to use Alembic via CMake need ilmbase as well + # For some reason this won't be picked up correctly otherwise + propagatedBuildInputs = [ ilmbase ]; + + # These flags along with the postPatch step ensure that all artifacts end up + # in the correct output without needing to move anything + # + # - bin: Uses CMAKE_INSTALL_BINDIR (set via CMake setup hooK) + # - lib (contains shared libraries): Uses ALEMBIC_LIB_INSTALL_DIR + # - dev (headers): Uses CMAKE_INSTALL_PREFIX + # (this works because every other install rule uses an absolute DESTINATION) + # - dev (CMake files): Uses ConfigPackageLocation - installPhase = '' - make install + cmakeFlags = [ + "-DUSE_HDF5=ON" + "-DUSE_TESTS=ON" + "-DALEMBIC_LIB_INSTALL_DIR=${placeholder "lib"}/lib" + "-DConfigPackageLocation=${placeholder "dev"}/lib/cmake/Alembic" + "-DCMAKE_INSTALL_PREFIX=${placeholder "dev"}" + "-DQUIET=ON" + ]; + + postPatch = '' + find bin/ -type f -name CMakeLists.txt -print -exec \ + sed -i 's/INSTALL(TARGETS \([a-zA-Z ]*\) DESTINATION bin)/INSTALL(TARGETS \1)/' {} \; + ''; - mv $out/bin $bin/ - mv $out/lib $lib/ - mv $out/include $dev/ + doCheck = true; + checkPhase = '' + runHook preCheck + ctest -j 1 + runHook postCheck ''; meta = with lib; { @@ -39,6 +63,6 @@ stdenv.mkDerivation rec homepage = "http://alembic.io/"; license = licenses.bsd3; platforms = platforms.all; - maintainers = [ maintainers.guibou ]; + maintainers = with maintainers; [ guibou tmarkus ]; }; } |