1{ stdenv
2, lib
3, fetchFromGitHub
4, cmake
5, cppunit
6}:
7
8stdenv.mkDerivation rec {
9 pname = "cpp-utilities";
10 version = "5.11.2";
11
12 src = fetchFromGitHub {
13 owner = "Martchus";
14 repo = pname;
15 rev = "v${version}";
16 sha256 = "sha256-my4799a9XFXWl9Xyq6gRfw4YTOCEWJgTvRKz0mVqrkQ=";
17 };
18
19 nativeBuildInputs = [ cmake ];
20 checkInputs = [ cppunit ];
21 # Otherwise, tests fail since the resulting shared object libc++utilities.so is only available in PWD of the make files
22 preCheck = ''
23 checkFlagsArray+=(
24 "LD_LIBRARY_PATH=$PWD"
25 )
26 '';
27 doCheck = true;
28
29 meta = with lib; {
30 homepage = "https://github.com/Martchus/cpp-utilities";
31 description = "Common C++ classes and routines used by @Martchus' applications featuring argument parser, IO and conversion utilities";
32 license = licenses.gpl2Plus;
33 maintainers = with maintainers; [ doronbehar ];
34 platforms = platforms.linux;
35 };
36}