summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/ac/aces-container/package.nix
blob: 426c38d87c9123f53a173396b08970b6ee81b985 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{
  lib,
  stdenv,
  fetchFromGitHub,
  cmake,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "aces-container";
  version = "1.0.2";

  src = fetchFromGitHub {
    owner = "aces-aswf";
    repo = "aces_container";
    tag = "v${finalAttrs.version}";
    hash = "sha256-luMqXqlJ6UzoawEDmbK38lm3GHosaZm/mFJntBF54Y4=";
  };

  # Fix the build with CMake 4.
  postPatch = ''
    substituteInPlace CMakeLists.txt \
      --replace-fail \
        'cmake_minimum_required (VERSION 2.6)' \
        'cmake_minimum_required(VERSION 3.10)'
  '';

  nativeBuildInputs = [
    cmake
  ];

  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-c++11-narrowing";

  meta = {
    description = "Reference Implementation of SMPTE ST2065-4";
    homepage = "https://github.com/aces-aswf/aces_container";
    license = lib.licenses.ampas;
    maintainers = with lib.maintainers; [ paperdigits ];
    mainProgram = "aces-container";
    platforms = lib.platforms.all;
  };
})