about summary refs log tree commit diff
path: root/pkgs/development/libraries
diff options
context:
space:
mode:
authorJonas Heinrich <onny@project-insanity.org>2022-12-24 09:04:51 +0100
committerJonas Heinrich <onny@project-insanity.org>2022-12-28 18:58:13 +0100
commit16fe46f48e6a7ca155fd4f7a9644a6413dfd04ac (patch)
tree547a10ebec504eb93b29a772ecb1ad26f93d6303 /pkgs/development/libraries
parent7b32e5370c23ce3e6d842c67389a87d43d8753b5 (diff)
process-cpp: init at unstable-2021-05-11
Diffstat (limited to 'pkgs/development/libraries')
-rw-r--r--pkgs/development/libraries/process-cpp/default.nix50
1 files changed, 50 insertions, 0 deletions
diff --git a/pkgs/development/libraries/process-cpp/default.nix b/pkgs/development/libraries/process-cpp/default.nix
new file mode 100644
index 0000000000000..f73f72e4545d1
--- /dev/null
+++ b/pkgs/development/libraries/process-cpp/default.nix
@@ -0,0 +1,50 @@
+{ lib
+, stdenv
+, fetchFromGitLab
+, cmake
+, boost
+, properties-cpp
+, pkg-config
+}:
+
+stdenv.mkDerivation rec {
+  pname = "process-cpp";
+  version = "unstable-2021-05-11";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.com";
+    owner = "ubports";
+    repo = "development/core/lib-cpp/process-cpp";
+    rev = "ee6d99a3278343f5fdcec7ed3dad38763e257310";
+    sha256 = "sha256-jDYXKCzrg/ZGFC2xpyfkn/f7J3t0cdOwHK2mLlYWNN0=";
+  };
+
+  postPatch = ''
+    # Excludes tests from tainting nativeBuildInputs with their dependencies when not being run
+    # Tests fail upon verifying OOM score adjustment via /proc/<pid>/oom_score
+    # [ RUN      ] LinuxProcess.adjusting_proc_oom_score_adj_works
+    # /build/source/tests/linux_process_test.cpp:83: Failure
+    # Value of: is_approximately_equal(oom_score.value, core::posix::linux::proc::process::OomScoreAdj::max_value())
+    #   Actual: false (333 > 10)
+    # Expected: true
+    sed -i '/tests/d' CMakeLists.txt
+  '';
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
+
+  buildInputs = [
+    boost
+    properties-cpp
+  ];
+
+  meta = with lib; {
+    description = "A simple convenience library for handling processes in C++11";
+    homepage = "https://gitlab.com/ubports/development/core/lib-cpp/process-cpp";
+    license = with licenses; [ gpl3Only lgpl3Only ];
+    maintainers = with maintainers; [ onny ];
+    platforms = platforms.linux;
+  };
+}