Merge pull request #176563 from somasis/sct

sct: unstable-2015-11-16 -> 0.5
This commit is contained in:
7c6f434c 2022-06-06 19:36:53 +00:00 committed by GitHub
commit da01abc1d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 22 deletions

View File

@ -12012,6 +12012,12 @@
githubId = 26806;
name = "Scott Olson";
};
somasis = {
email = "kylie@somas.is";
github = "somasis";
githubId = 264788;
name = "Kylie McClain";
};
SomeoneSerge = {
email = "sergei.kozlukov@aalto.fi";
matrix = "@ss:someonex.net";

View File

@ -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);

View File

@ -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;
};