Merge pull request #164182 from IvarWithoutBones/init/gummy

This commit is contained in:
Sandro 2022-03-28 17:02:25 +02:00 committed by GitHub
commit a85e2dcf73
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 120 additions and 0 deletions

View file

@ -0,0 +1,50 @@
{ lib
, stdenv
, fetchFromGitHub
, cmake
, pkg-config
, systemd
, expat
}:
stdenv.mkDerivation rec {
pname = "sdbus-cpp";
version = "1.1.0";
src = fetchFromGitHub {
owner = "kistler-group";
repo = "sdbus-cpp";
rev = "v${version}";
sha256 = "sha256-AjaZ6YmMlnN0jAcUBkft01XHkrze0nSr3dUMechsLrQ=";
};
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
systemd
expat
];
cmakeFlags = [
"-DBUILD_CODE_GEN=ON"
];
meta = with lib; {
homepage = "https://github.com/Kistler-Group/sdbus-cpp";
changelog = "https://github.com/Kistler-Group/sdbus-cpp/blob/v${version}/ChangeLog";
description = "High-level C++ D-Bus library designed to provide easy-to-use yet powerful API";
longDescription = ''
sdbus-c++ is a high-level C++ D-Bus library for Linux designed to provide expressive, easy-to-use API in modern C++.
It adds another layer of abstraction on top of sd-bus, a nice, fresh C D-Bus implementation by systemd.
It's been written primarily as a replacement of dbus-c++, which currently suffers from a number of (unresolved) bugs,
concurrency issues and inherent design complexities and limitations.
'';
mainProgram = "sdbus-c++-xml2cpp";
license = licenses.lgpl2Only;
platforms = platforms.linux;
maintainers = [ maintainers.ivar ];
};
}

View file

@ -0,0 +1,66 @@
{ lib
, stdenv
, fetchFromGitHub
, testVersion
, gummy
, cmake
, libX11
, libXext
, sdbus-cpp
, udev
, coreutils
}:
stdenv.mkDerivation rec {
pname = "gummy";
version = "0.1";
src = fetchFromGitHub {
owner = "fushko";
repo = "gummy";
rev = version;
sha256 = "sha256-CbZFuvFMmbFVX8k3duhhsg0fd9kVmhsj0VeFYil9YiE=";
};
nativeBuildInputs = [
cmake
];
buildInputs = [
libX11
libXext
sdbus-cpp
udev
];
cmakeFlags = [
"-DUDEV_DIR=${placeholder "out"}/lib/udev"
];
# Fixes the "gummy start" command, without this it cannot find the binary.
# Setting this through cmake does not seem to work.
postPatch = ''
substituteInPlace src/gummy/gummy.cpp \
--replace "CMAKE_INSTALL_DAEMON_PATH" "\"${placeholder "out"}/libexec/gummyd\""
'';
preFixup = ''
substituteInPlace $out/lib/udev/99-gummy.rules \
--replace "/bin/chmod" "${coreutils}/bin/chmod"
ln -s $out/libexec/gummyd $out/bin/gummyd
'';
passthru.tests.version = testVersion { package = gummy; };
meta = with lib; {
homepage = "https://github.com/Fushko/gummy";
description = "Brightness and temperature manager for X11";
longDescription = ''
CLI screen manager for X11 that allows automatic and manual brightness/temperature adjustments,
via backlight (currently only for embedded displays) and gamma. Multiple monitors are supported.
'';
license = licenses.gpl3Only;
maintainers = [ maintainers.ivar ];
};
}

View file

@ -1119,6 +1119,8 @@ with pkgs;
redfang = callPackage ../tools/networking/redfang { };
sdbus-cpp = callPackage ../development/libraries/sdbus-cpp { };
sdlookup = callPackage ../tools/security/sdlookup { };
sx-go = callPackage ../tools/security/sx-go { };
@ -33492,6 +33494,8 @@ with pkgs;
gummi = callPackage ../applications/misc/gummi { };
gummy = callPackage ../tools/misc/gummy { };
gxemul = callPackage ../applications/emulators/gxemul { };
hatari = callPackage ../applications/emulators/hatari { };