Files
nixpkgs/pkgs/by-name/al/alembic/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

76 lines
1.8 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
cmake,
openexr,
hdf5-threadsafe,
}:
stdenv.mkDerivation rec {
pname = "alembic";
version = "1.8.8";
src = fetchFromGitHub {
owner = "alembic";
repo = "alembic";
tag = version;
hash = "sha256-R69UYyvLnMwv1JzEQ6S6elvR83Rmvc8acBJwSV/+hCk=";
};
# note: out is unused (but required for outputDoc anyway)
outputs = [
"bin"
"dev"
"out"
"lib"
];
# Prevent cycle between bin and dev (only occurs on Darwin for some reason)
propagatedBuildOutputs = [ "lib" ];
nativeBuildInputs = [ cmake ];
buildInputs = [
openexr
hdf5-threadsafe
];
# 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
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)/' {} \;
'';
doCheck = true;
enableParallelChecking = false;
meta = with lib; {
description = "Open framework for storing and sharing scene data";
homepage = "http://alembic.io/";
license = licenses.bsd3;
platforms = platforms.all;
maintainers = with maintainers; [
guibou
tmarkus
];
};
}