2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv
|
2021-02-05 17:12:51 +00:00
|
|
|
, lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, cppunit
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "cpp-utilities";
|
2023-04-12 12:48:02 +00:00
|
|
|
version = "5.22.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Martchus";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-04-12 12:48:02 +00:00
|
|
|
sha256 = "sha256-c36FzKDAaalKVIrqVSCoslrKVopW77cGdGwfiMbaXe4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ cppunit ];
|
2020-04-24 23:36:52 +00:00
|
|
|
# Otherwise, tests fail since the resulting shared object libc++utilities.so is only available in PWD of the make files
|
2021-05-20 23:08:51 +00:00
|
|
|
preCheck = ''
|
|
|
|
checkFlagsArray+=(
|
|
|
|
"LD_LIBRARY_PATH=$PWD"
|
|
|
|
)
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/Martchus/cpp-utilities";
|
|
|
|
description = "Common C++ classes and routines used by @Martchus' applications featuring argument parser, IO and conversion utilities";
|
2021-05-20 23:08:51 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ doronbehar ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|