2017-09-26 13:04:27 +02:00
|
|
|
{ stdenv, fetchurl, libX11, libXrandr }:
|
|
|
|
|
2015-11-16 23:49:01 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "sct";
|
2017-09-26 13:04:27 +02:00
|
|
|
|
2015-11-16 23:49:01 +01:00
|
|
|
src = fetchurl {
|
2020-04-01 03:11:51 +02:00
|
|
|
url = "http://www.tedunangst.com/flak/files/sct.c";
|
2016-07-28 09:21:21 +02:00
|
|
|
sha256 = "01f3ndx3s6d2qh2xmbpmhd4962dyh8yp95l87xwrs4plqdz6knhd";
|
2015-11-16 23:49:01 +01:00
|
|
|
};
|
2017-09-26 13:04:27 +02:00
|
|
|
|
|
|
|
unpackPhase = "cat ${src} > sct.c";
|
|
|
|
patches = [ ./DISPLAY-segfault.patch ];
|
|
|
|
|
|
|
|
buildInputs = [ libX11 libXrandr ];
|
|
|
|
buildPhase = "cc sct.c -o sct -lm -lX11 -lXrandr";
|
|
|
|
|
|
|
|
installPhase = "install -Dt $out/bin sct";
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://www.tedunangst.com/flak/post/sct-set-color-temperature";
|
2017-09-26 13:04:27 +02:00
|
|
|
description = "A minimal utility to set display colour temperature";
|
|
|
|
maintainers = [ maintainers.raskin ];
|
|
|
|
license = licenses.publicDomain;
|
|
|
|
platforms = with platforms; linux ++ freebsd ++ openbsd;
|
2015-11-16 23:49:01 +01:00
|
|
|
};
|
|
|
|
}
|