diff options
author | Kylie McClain <kylie@somas.is> | 2022-03-08 00:01:53 -0500 |
---|---|---|
committer | Kylie McClain <kylie@somas.is> | 2022-06-06 11:11:01 -0400 |
commit | a42cdc07fc27ab4ed58485b927e6edbe1a4900ba (patch) | |
tree | f5ffe75333bb0de0cc3df8d563a5a93ce840f9a5 | |
parent | 3c11b2df706c4b8169bb1172035c48060a9188ba (diff) | |
download | nixpkgs-a42cdc07fc27ab4ed58485b927e6edbe1a4900ba.tar nixpkgs-a42cdc07fc27ab4ed58485b927e6edbe1a4900ba.tar.gz nixpkgs-a42cdc07fc27ab4ed58485b927e6edbe1a4900ba.tar.bz2 nixpkgs-a42cdc07fc27ab4ed58485b927e6edbe1a4900ba.tar.lz nixpkgs-a42cdc07fc27ab4ed58485b927e6edbe1a4900ba.tar.xz nixpkgs-a42cdc07fc27ab4ed58485b927e6edbe1a4900ba.tar.zst nixpkgs-a42cdc07fc27ab4ed58485b927e6edbe1a4900ba.zip |
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.
-rw-r--r-- | pkgs/tools/X11/sct/DISPLAY-segfault.patch | 10 | ||||
-rw-r--r-- | pkgs/tools/X11/sct/default.nix | 24 |
2 files changed, 12 insertions, 22 deletions
diff --git a/pkgs/tools/X11/sct/DISPLAY-segfault.patch b/pkgs/tools/X11/sct/DISPLAY-segfault.patch deleted file mode 100644 index 6b83afa332b..00000000000 --- a/pkgs/tools/X11/sct/DISPLAY-segfault.patch +++ /dev/null @@ -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); - diff --git a/pkgs/tools/X11/sct/default.nix b/pkgs/tools/X11/sct/default.nix index 5b361e924eb..821a1c6070e 100644 --- a/pkgs/tools/X11/sct/default.nix +++ b/pkgs/tools/X11/sct/default.nix @@ -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; }; |