about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/properties-cpp/default.nix
blob: 72538da6a997ba64ab8d14dff06b050b66278197 (plain) (blame)
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
56
57
58
59
60
61
62
63
{ lib
, stdenv
, fetchFromGitLab
, gitUpdater
, testers
, cmake
, pkg-config
, gtest
, doxygen
, graphviz
, lomiri
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "properties-cpp";
  version = "0.0.3";

  src = fetchFromGitLab {
    owner = "ubports";
    repo = "development/core/lib-cpp/properties-cpp";
    rev = finalAttrs.version;
    hash = "sha256-C/BDEuKNMQHOjATO5aWBptjIlgfv6ykzjFAsHb6uP3Q=";
  };

  postPatch = lib.optionalString (!finalAttrs.doCheck) ''
    sed -i "/add_subdirectory(tests)/d" CMakeLists.txt
  '';

  strictDeps = true;

  nativeBuildInputs = [
    cmake
    doxygen
    graphviz
    pkg-config
  ];

  buildInputs = [
    lomiri.cmake-extras
  ];

  checkInputs = [
    gtest
  ];

  doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;

  passthru = {
    tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
    updateScript = gitUpdater { };
  };

  meta = with lib; {
    homepage = "https://gitlab.com/ubports/development/core/lib-cpp/properties-cpp";
    description = "A very simple convenience library for handling properties and signals in C++11";
    license = licenses.lgpl3Only;
    maintainers = with maintainers; [ edwtjo ];
    platforms = platforms.linux;
    pkgConfigModules = [
      "properties-cpp"
    ];
  };
})