sct: unstable-2015-11-16 -> 0.5
Switch to using umaxx maintained version, the same version provided in OpenBSD's ports, the same version linked in tedu@'s original blog post at the end.
This commit is contained in:
parent
3c11b2df70
commit
a42cdc07fc
@ -1,10 +0,0 @@
|
||||
--- a/sct.c 2017-09-22 00:44:20.270421881 +0000
|
||||
+++ b/sct.c 2017-09-26 10:50:38.964562740 +0000
|
||||
@@ -36,6 +36,7 @@
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
Display *dpy = XOpenDisplay(NULL);
|
||||
+ if (!dpy) exit(1);
|
||||
int screen = DefaultScreen(dpy);
|
||||
Window root = RootWindow(dpy, screen);
|
||||
|
@ -1,26 +1,26 @@
|
||||
{ lib, stdenv, fetchurl, libX11, libXrandr }:
|
||||
{ lib, stdenv, fetchzip, libX11, libXrandr, xorgproto }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "sct";
|
||||
version = "unstable-2015-11-16";
|
||||
version = "0.5";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.tedunangst.com/flak/files/sct.c";
|
||||
sha256 = "01f3ndx3s6d2qh2xmbpmhd4962dyh8yp95l87xwrs4plqdz6knhd";
|
||||
src = fetchzip {
|
||||
url = "https://www.umaxx.net/dl/sct-0.5.tar.gz";
|
||||
sha256 = "sha256-nyYcdnCq8KcSUpc0HPCGzJI6NNrrTJLAHqPawfwPR/Q=";
|
||||
};
|
||||
|
||||
unpackPhase = "cat ${src} > sct.c";
|
||||
patches = [ ./DISPLAY-segfault.patch ];
|
||||
buildInputs = [ libX11 libXrandr xorgproto ];
|
||||
|
||||
buildInputs = [ libX11 libXrandr ];
|
||||
buildPhase = "cc sct.c -o sct -lm -lX11 -lXrandr";
|
||||
preInstall = ''
|
||||
mkdir -p $out/bin $out/share/man/man1
|
||||
'';
|
||||
|
||||
installPhase = "install -Dt $out/bin sct";
|
||||
makeFlags = [ "PREFIX=$(out)" ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.tedunangst.com/flak/post/sct-set-color-temperature";
|
||||
homepage = "https://www.umaxx.net/";
|
||||
description = "A minimal utility to set display colour temperature";
|
||||
maintainers = [ maintainers.raskin ];
|
||||
maintainers = with maintainers; [ raskin somasis ];
|
||||
license = licenses.publicDomain;
|
||||
platforms = with platforms; linux ++ freebsd ++ openbsd;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user