summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/dc/dcpomatic/asdcplib.nix
blob: e6633fc446967a0533c24e321b2d5d1ebd631c34 (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{
  lib,
  stdenv,
  fetchgit,

  wafHook,
  python3,
  gitMinimal,
  pkg-config,
  openssl,
  boost,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "asdcplib";
  version = "1.0.11";

  src = fetchgit {
    url = "https://git.carlh.net/git/asdcplib";
    tag = "v${finalAttrs.version}";
    hash = "sha256-VkXDiNYPXU4eOgOfhZB3RMoSp1ujL2jMdAYwjdyIei0=";
  };

  # for some reason the version is not set properly upstream
  postPatch = ''
    substituteInPlace wscript \
      --replace-fail \
        "VERSION = open('VERSION').read().strip()" \
        "VERSION = '${finalAttrs.version}'"
  '';

  nativeBuildInputs = [
    wafHook
    python3
    gitMinimal
    pkg-config
  ];

  buildInputs = [
    openssl
    boost
  ];

  __structuredAttrs = true;
  strictDeps = true;

  meta = {
    description = "asdcplib library for low-level DCP handling";
    homepage = "https://git.carlh.net/cgit/asdcplib";
    downloadPage = "https://git.carlh.net/cgit/asdcplib";
    license = lib.licenses.bsd3;
    platforms = lib.platforms.linux;
    maintainers = with lib.maintainers; [ logn ];
  };
})