Merge pull request #176563 from somasis/sct

sct: unstable-2015-11-16 -> 0.5

authored by

7c6f434c and committed by
GitHub
da01abc1 81fa7091

+18 -22
+6
maintainers/maintainer-list.nix
··· 12012 12012 githubId = 26806; 12013 12013 name = "Scott Olson"; 12014 12014 }; 12015 + somasis = { 12016 + email = "kylie@somas.is"; 12017 + github = "somasis"; 12018 + githubId = 264788; 12019 + name = "Kylie McClain"; 12020 + }; 12015 12021 SomeoneSerge = { 12016 12022 email = "sergei.kozlukov@aalto.fi"; 12017 12023 matrix = "@ss:someonex.net";
-10
pkgs/tools/X11/sct/DISPLAY-segfault.patch
··· 1 - --- a/sct.c 2017-09-22 00:44:20.270421881 +0000 2 - +++ b/sct.c 2017-09-26 10:50:38.964562740 +0000 3 - @@ -36,6 +36,7 @@ 4 - main(int argc, char **argv) 5 - { 6 - Display *dpy = XOpenDisplay(NULL); 7 - + if (!dpy) exit(1); 8 - int screen = DefaultScreen(dpy); 9 - Window root = RootWindow(dpy, screen); 10 -
+12 -12
pkgs/tools/X11/sct/default.nix
··· 1 - { lib, stdenv, fetchurl, libX11, libXrandr }: 1 + { lib, stdenv, fetchzip, libX11, libXrandr, xorgproto }: 2 2 3 3 stdenv.mkDerivation rec { 4 4 pname = "sct"; 5 - version = "unstable-2015-11-16"; 5 + version = "0.5"; 6 6 7 - src = fetchurl { 8 - url = "http://www.tedunangst.com/flak/files/sct.c"; 9 - sha256 = "01f3ndx3s6d2qh2xmbpmhd4962dyh8yp95l87xwrs4plqdz6knhd"; 7 + src = fetchzip { 8 + url = "https://www.umaxx.net/dl/sct-0.5.tar.gz"; 9 + sha256 = "sha256-nyYcdnCq8KcSUpc0HPCGzJI6NNrrTJLAHqPawfwPR/Q="; 10 10 }; 11 11 12 - unpackPhase = "cat ${src} > sct.c"; 13 - patches = [ ./DISPLAY-segfault.patch ]; 12 + buildInputs = [ libX11 libXrandr xorgproto ]; 14 13 15 - buildInputs = [ libX11 libXrandr ]; 16 - buildPhase = "cc sct.c -o sct -lm -lX11 -lXrandr"; 14 + preInstall = '' 15 + mkdir -p $out/bin $out/share/man/man1 16 + ''; 17 17 18 - installPhase = "install -Dt $out/bin sct"; 18 + makeFlags = [ "PREFIX=$(out)" ]; 19 19 20 20 meta = with lib; { 21 - homepage = "https://www.tedunangst.com/flak/post/sct-set-color-temperature"; 21 + homepage = "https://www.umaxx.net/"; 22 22 description = "A minimal utility to set display colour temperature"; 23 - maintainers = [ maintainers.raskin ]; 23 + maintainers = with maintainers; [ raskin somasis ]; 24 24 license = licenses.publicDomain; 25 25 platforms = with platforms; linux ++ freebsd ++ openbsd; 26 26 };