2023-04-12 12:48:02 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, doctest
|
|
|
|
, glm
|
|
|
|
, libevdev
|
|
|
|
, libxml2
|
2021-05-03 20:48:10 +00:00
|
|
|
}:
|
2020-12-25 13:55:36 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "wf-config";
|
2021-05-03 20:48:10 +00:00
|
|
|
version = "0.7.1";
|
2020-12-25 13:55:36 +00:00
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "WayfireWM";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "sha256-ADUBvDJcPYEB9ZvaFIgTfemo1WYwiWgCWX/z2yrEPtA=";
|
2020-12-25 13:55:36 +00:00
|
|
|
};
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
];
|
2020-12-25 13:55:36 +00:00
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
buildInputs = [
|
|
|
|
libevdev
|
|
|
|
libxml2
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
glm
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
cmake
|
|
|
|
doctest
|
|
|
|
];
|
2021-05-03 20:48:10 +00:00
|
|
|
# CMake is just used for finding doctest.
|
|
|
|
dontUseCmakeConfigure = true;
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
mesonFlags = [
|
|
|
|
(lib.mesonEnable "tests" (stdenv.buildPlatform.canExecute stdenv.hostPlatform))
|
|
|
|
];
|
|
|
|
|
2021-05-03 20:48:10 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
2020-12-25 13:55:36 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/WayfireWM/wf-config";
|
|
|
|
description = "Library for managing configuration files, written for Wayfire";
|
|
|
|
license = licenses.mit;
|
2023-04-12 12:48:02 +00:00
|
|
|
maintainers = with maintainers; [ qyliss wucke13 rewine ];
|
2020-12-25 13:55:36 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|