diff --git a/pkgs/development/libraries/opencolorio/1.x.nix b/pkgs/development/libraries/opencolorio/1.x.nix index 4ac41482037f..c91fee14ed23 100644 --- a/pkgs/development/libraries/opencolorio/1.x.nix +++ b/pkgs/development/libraries/opencolorio/1.x.nix @@ -3,22 +3,22 @@ lib, fetchFromGitHub, cmake, - boost, + gitMinimal, pkg-config, lcms2, tinyxml, - git, + boost, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAtts: { pname = "opencolorio"; version = "1.1.1"; src = fetchFromGitHub { owner = "imageworks"; repo = "OpenColorIO"; - rev = "v${version}"; - sha256 = "12srvxca51czpfjl0gabpidj9n84mw78ivxy5w75qhq2mmc798sb"; + tag = "v${finalAtts.version}"; + hash = "sha256-S6N0WK0CQ1wOL77viA6vBNkkW7xLPUClu5+FoljfWYs="; }; outputs = [ @@ -30,8 +30,8 @@ stdenv.mkDerivation rec { # TODO: Investigate whether git can be dropped: It's only used to apply patches nativeBuildInputs = [ cmake + gitMinimal pkg-config - git ]; buildInputs = [ @@ -57,6 +57,13 @@ stdenv.mkDerivation rec { stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64 ) "-DCMAKE_OSX_ARCHITECTURES=arm64"; + env = lib.optionalAttrs stdenv.cc.isClang { + # yaml-cpp uses std::auto_ptr and std::binary_function which has + # been disabled in clang with libcxx. These flags re-enables these + # features + NIX_CXXSTDLIB_COMPILE = "-D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR=1 -D_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION=1"; + }; + postInstall = '' moveToOutput bin "$bin" moveToOutput cmake "$dev" @@ -66,11 +73,11 @@ stdenv.mkDerivation rec { --replace "$out/bin" "$bin/bin" ''; - meta = with lib; { + meta = { homepage = "https://opencolorio.org"; description = "Color management framework for visual effects and animation"; - license = licenses.bsd3; - maintainers = [ ]; - platforms = platforms.unix; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ yzx9 ]; + platforms = lib.platforms.unix; }; -} +})