depot/third_party/nixpkgs/pkgs/tools/X11/sct/default.nix
Default email ce641f4048 Project import generated by Copybara.
GitOrigin-RevId: bc5d68306b40b8522ffb69ba6cff91898c2fbbff
2021-12-06 17:07:01 +01:00

27 lines
817 B
Nix

{ lib, stdenv, fetchurl, libX11, libXrandr }:
stdenv.mkDerivation rec {
pname = "sct";
version = "unstable-2015-11-16";
src = fetchurl {
url = "http://www.tedunangst.com/flak/files/sct.c";
sha256 = "01f3ndx3s6d2qh2xmbpmhd4962dyh8yp95l87xwrs4plqdz6knhd";
};
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 lib; {
homepage = "https://www.tedunangst.com/flak/post/sct-set-color-temperature";
description = "A minimal utility to set display colour temperature";
maintainers = [ maintainers.raskin ];
license = licenses.publicDomain;
platforms = with platforms; linux ++ freebsd ++ openbsd;
};
}