2020-04-24 23:36:52 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub
|
2021-02-05 17:12:51 +00:00
|
|
|
, dbus, cmake, pkg-config, bash-completion
|
2020-04-24 23:36:52 +00:00
|
|
|
, gsl, popt, clightd, systemd, libconfig, libmodule
|
|
|
|
, withGeoclue ? true, geoclue2
|
|
|
|
, withUpower ? true, upower }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "clight";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "4.10";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "FedeDP";
|
|
|
|
repo = "Clight";
|
|
|
|
rev = version;
|
2023-07-15 17:15:38 +00:00
|
|
|
sha256 = "sha256-IAoz4f4XrX8bgesWL4yLK6m5F+c75WNIMFgKBj+W61Q=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
dbus
|
|
|
|
cmake
|
2021-02-05 17:12:51 +00:00
|
|
|
pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
bash-completion
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = with lib; [
|
|
|
|
gsl
|
|
|
|
popt
|
|
|
|
upower
|
|
|
|
clightd
|
|
|
|
systemd
|
|
|
|
geoclue2
|
|
|
|
libconfig
|
|
|
|
libmodule
|
|
|
|
] ++ optional withGeoclue geoclue2
|
|
|
|
++ optional withUpower upower;
|
|
|
|
|
2021-02-13 14:23:35 +00:00
|
|
|
cmakeFlags = [
|
2023-07-15 17:15:38 +00:00
|
|
|
"-DSESSION_BUS_DIR=${placeholder "out"}/share/dbus-1/services"
|
2021-02-13 14:23:35 +00:00
|
|
|
"-DBASH_COMPLETIONS_DIR=${placeholder "out"}/share/bash-completions/completions"
|
|
|
|
"-DZSH_COMPLETIONS_DIR=${placeholder "out"}/share/zsh/site-functions"
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A C daemon that turns your webcam into a light sensor";
|
|
|
|
homepage = "https://github.com/FedeDP/Clight";
|
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = with maintainers; [
|
|
|
|
eadwu
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|