nixpkgs/pkgs/applications/misc/clight/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

54 lines
1.2 KiB
Nix
Raw Normal View History

2019-07-04 16:34:40 +00:00
{ lib, stdenv, fetchFromGitHub
, dbus, cmake, pkg-config, bash-completion
2019-10-02 01:37:58 +00:00
, gsl, popt, clightd, systemd, libconfig, libmodule
2019-07-04 16:34:40 +00:00
, withGeoclue ? true, geoclue2
, withUpower ? true, upower }:
stdenv.mkDerivation rec {
pname = "clight";
2024-03-10 00:58:16 +00:00
version = "4.11";
2019-07-04 16:34:40 +00:00
src = fetchFromGitHub {
owner = "FedeDP";
repo = "Clight";
rev = version;
2024-03-10 00:58:16 +00:00
sha256 = "sha256-Fu38HRP83Yn2jsq9xnCWOXNlV/0hJKD1/cOOp3EV45Q=";
2019-07-04 16:34:40 +00:00
};
nativeBuildInputs = [
dbus
cmake
pkg-config
2019-07-04 16:34:40 +00:00
bash-completion
];
buildInputs = with lib; [
gsl
popt
upower
clightd
systemd
geoclue2
libconfig
2019-10-02 01:37:58 +00:00
libmodule
2019-07-04 16:34:40 +00:00
] ++ optional withGeoclue geoclue2
++ optional withUpower upower;
2021-02-07 02:59:39 +00:00
cmakeFlags = [
2023-06-13 12:50:13 +00:00
"-DSESSION_BUS_DIR=${placeholder "out"}/share/dbus-1/services"
2021-02-07 02:59:39 +00:00
"-DBASH_COMPLETIONS_DIR=${placeholder "out"}/share/bash-completions/completions"
"-DZSH_COMPLETIONS_DIR=${placeholder "out"}/share/zsh/site-functions"
];
2019-07-04 16:34:40 +00:00
meta = with lib; {
description = "C daemon that turns your webcam into a light sensor";
homepage = "https://github.com/FedeDP/Clight";
2019-07-04 16:34:40 +00:00
platforms = platforms.linux;
license = licenses.gpl3;
maintainers = with maintainers; [
eadwu
];
2024-02-11 02:19:15 +00:00
mainProgram = "clight";
2019-07-04 16:34:40 +00:00
};
}