From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37758) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gYeAA-0006Cu-GI for guix-patches@gnu.org; Sun, 16 Dec 2018 16:41:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gYdvG-0005ZH-Dw for guix-patches@gnu.org; Sun, 16 Dec 2018 16:26:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:46384) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gYdvG-0005Yw-7u for guix-patches@gnu.org; Sun, 16 Dec 2018 16:26:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gYdvG-0000Q9-2b for guix-patches@gnu.org; Sun, 16 Dec 2018 16:26:02 -0500 Subject: [bug#33756] [PATCH] gnu: Add sct. References: <20181215070959.2260-1-namn@berkeley.edu> In-Reply-To: <20181215070959.2260-1-namn@berkeley.edu> Resent-Message-ID: From: Nam Nguyen Date: Sun, 16 Dec 2018 13:25:11 -0800 Message-Id: <20181216212511.8998-1-namn@berkeley.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 33756@debbugs.gnu.org * gnu/packages/xdisorg.scm (sct): New variable. --- gnu/packages/xdisorg.scm | 55 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm index 82ed065a3..dedff620d 100644 --- a/gnu/packages/xdisorg.scm +++ b/gnu/packages/xdisorg.scm @@ -24,6 +24,7 @@ ;;; Copyright © 2018 Thomas Sigurdsen ;;; Copyright © 2018 Rutger Helling ;;; Copyright © 2018 Pierre Neidhardt +;;; Copyright © 2018 Nam Nguyen ;;; ;;; This file is part of GNU Guix. ;;; @@ -52,6 +53,8 @@ #:use-module (guix build-system python) #:use-module (gnu packages) #:use-module (gnu packages documentation) + #:use-module (gnu packages admin) + #:use-module (gnu packages base) #:use-module (gnu packages algebra) #:use-module (gnu packages autotools) #:use-module (gnu packages check) @@ -1555,3 +1558,55 @@ to automatically turn it on on login.") (description "This package provides a small utility for inverting the colors on all monitors attached to an XRandR-capable X11 display server.") (license license:gpl3+))) + +(define-public sct + (package + (name "sct") + (version "0.4") + (source + (origin + (method url-fetch) + (uri + (string-append "https://www.umaxx.net/dl/sct-" + version ".tar.gz")) + (sha256 + (base32 + "0r57z9ki8pvxhawfxys0v5h85z2x211sqxki0xvk1bga88ryldlv")))) + (build-system gnu-build-system) + (arguments + '(#:make-flags (list "CC=gcc") + #:tests? #f + #:phases + (modify-phases %standard-phases + (delete 'configure) + (delete 'check) + (add-after 'unpack 'fix-sctd-paths + (lambda* (#:key outputs inputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (coreutils (assoc-ref inputs "coreutils")) + (inetutils (assoc-ref inputs "inetutils"))) + (substitute* "sctd.sh" + (("\\$\\(which sct\\)") (string-append out "/bin/sct")) + (("date") (string-append coreutils "/bin/date")) + (("printf") (string-append coreutils "/bin/printf")) + (("sleep") (string-append coreutils "/bin/sleep")) + (("logger") (string-append inetutils "/bin/logger")))))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (install-file "sct" (string-append out "/bin")) + (install-file "sctd.sh" (string-append out "/bin")) + (install-file "sct.1" (string-append out "/man/man1")) + (install-file "sctd.1" (string-append out "/man/man1")) + (rename-file (string-append out "/bin/sctd.sh") + (string-append out "/bin/sctd")) + #t)))))) + (inputs + `(("coreutils" ,coreutils) ; sctd uses "date", "printf" and "sleep" + ("inetutils" ,inetutils) ; sctd uses "logger" + ("libxrandr" ,libxrandr))) + (home-page "https://www.umaxx.net") + (synopsis "Set the color temperature of the screen") + (description "@code{sct} is a lightweight utility to set the color +temperature of the screen.") + (license license:bsd-3))) -- 2.20.0