From patchwork Mon Dec 24 09:21:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Nam Nguyen X-Patchwork-Id: 532 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id C5C2B16980; Mon, 24 Dec 2018 09:22:11 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mira.cbaines.net (Postfix) with ESMTP id 2B3C316944 for ; Mon, 24 Dec 2018 09:22:11 +0000 (GMT) Received: from localhost ([127.0.0.1]:33997 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gbMR8-0001Tk-JK for patchwork@mira.cbaines.net; Mon, 24 Dec 2018 04:22:10 -0500 Received: from eggs.gnu.org ([208.118.235.92]:42941) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gbMR4-0001Sj-O9 for guix-patches@gnu.org; Mon, 24 Dec 2018 04:22:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gbMR0-0001Me-MU for guix-patches@gnu.org; Mon, 24 Dec 2018 04:22:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:58258) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gbMR0-0001MU-FS for guix-patches@gnu.org; Mon, 24 Dec 2018 04:22:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gbMQz-0001U5-SL for guix-patches@gnu.org; Mon, 24 Dec 2018 04:22:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#33753] [PATCH 1/3] gnu: Add stumpwm modules. References: <20181215020600.2713-1-namn@berkeley.edu> In-Reply-To: <20181215020600.2713-1-namn@berkeley.edu> Resent-From: Nam Nguyen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 24 Dec 2018 09:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33753 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 33753@debbugs.gnu.org Received: via spool by 33753-submit@debbugs.gnu.org id=B33753.15456433155680 (code B ref 33753); Mon, 24 Dec 2018 09:22:01 +0000 Received: (at 33753) by debbugs.gnu.org; 24 Dec 2018 09:21:55 +0000 Received: from localhost ([127.0.0.1]:34280 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gbMQt-0001TX-6x for submit@debbugs.gnu.org; Mon, 24 Dec 2018 04:21:55 -0500 Received: from mail-pg1-f194.google.com ([209.85.215.194]:41257) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gbMQr-0001TI-0p for 33753@debbugs.gnu.org; Mon, 24 Dec 2018 04:21:53 -0500 Received: by mail-pg1-f194.google.com with SMTP id m1so5391499pgq.8 for <33753@debbugs.gnu.org>; Mon, 24 Dec 2018 01:21:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=icIXtK6iU8eKm3bCawuV5AIddmeue6kUiRWUTK0X9LU=; b=QiuVQReONK18nWx3cMwoyhUPkZVfGEAX8iLSFbuCeGlnsDoQT4ZQFjlo1hE11tLhWi hoC4cAPe5LQPUWe1nqVck0o2j6yJz6cYoslZySG1L80fuNRNrnKYK0A+GQiQ2ayRe7xm bkHZlcV3dpBvCP/3SWrKFWY1K6JnasHX/+vEWtk8pmG11YEe3UXdCotgJ1uDmeMoeO7R VB7n8iKvB69MoW8XdgPN+AppNJAT8CUml4CGYdn58ujIDpxImJPpu05f1gua1rkWZZyY 5NmMqG+RRzoHauQyn9yw5Ou+aA9Dh+CzE6W6HK7z7gS9beYLLWQoLj+dUptNyzsHjKBG xfdA== X-Gm-Message-State: AA+aEWYcAJeSVUM/8AAeN/QUBktNAiLYGRxgkrvG4iyvvrBrnnTTOtbO PlXzDF0l5CHdtfLMSnLdGyWDbfPKb5g= X-Google-Smtp-Source: ALg8bN56nT/GutMttMr4di/+jDXFe/jwNI9GWgBa/9NgY6EB87lnZTNJ/8ICandODEBNgOVN8vpOgQ== X-Received: by 2002:a62:1e45:: with SMTP id e66mr12385652pfe.152.1545643306697; Mon, 24 Dec 2018 01:21:46 -0800 (PST) Received: from localhost.localdomain ([24.5.139.14]) by smtp.googlemail.com with ESMTPSA id w3sm44902308pge.8.2018.12.24.01.21.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Dec 2018 01:21:46 -0800 (PST) From: Nam Nguyen Date: Mon, 24 Dec 2018 01:21:23 -0800 Message-Id: <20181224092125.17182-1-namn@berkeley.edu> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nam Nguyen Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/lisp.scm (stumpwm-contrib, stumpwm-module) (stumpwm-cpu, stumpwm-mem, stumpwm-hostname, stumpwm-battery-portable) (stumpwm-winner-mode, stumpwm-swm-gaps) (stumpwm-pinentry): New variables. --- gnu/packages/lisp.scm | 111 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index 261e720e2..711c57cbc 100644 --- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -12,6 +12,7 @@ ;;; Copyright © 2018 Alex Vong ;;; Copyright © 2018 Pierre Neidhardt ;;; Copyright © 2018 Pierre Langlois +;;; Copyright © 2018 Nam Nguyen ;;; ;;; This file is part of GNU Guix. ;;; @@ -1032,6 +1033,116 @@ productive, customizable lisp based systems.") (inherit (sbcl-package->cl-source-package stumpwm)) (name "cl-stumpwm"))) +(define stumpwm-contrib + (let ((commit "bd47cec14f7299711ac29468d2e1364d38a81bee") + (revision "1")) + (package + (name "stumpwm-contrib") + (version (git-version "0.0.1" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/stumpwm/stumpwm-contrib.git") + (commit commit))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "0kh9vpmxssjvxgvl6ihpn0qh4l660n64iq80ivhagdvr8s045ddj")))) + (inputs + `(("stumpwm" ,stumpwm "lib"))) + (build-system asdf-build-system/sbcl) + (arguments + '(#:tests? #f ; No tests exist. + #:phases + (modify-phases %standard-phases + ;; Delete all sources. + (add-after 'check 'delete-modules + (lambda* (#:key outputs #:allow-other-keys) + (delete-file-recursively + (string-append (assoc-ref outputs "out") + "/share/common-lisp/sbcl-source")) + #t))))) + (home-page "https://github.com/stumpwm/stumpwm-contrib") + (synopsis "Collection of StumpWM modules") + (description "Modules are a way to extend StumpWM using Lisp +code.") + (license (list license:gpl2+ ; TODO: swm-gaps Missing license? + license:gpl3+ ; cpu, mem, battery-portable, + ; winner-mode, pinentry + license:bsd-2))))) ; hostname + +(define* (stumpwm-module mod cat syn desc) + (package (inherit stumpwm-contrib) + (name (string-append "stumpwm-" mod)) + (arguments + (substitute-keyword-arguments (package-arguments stumpwm-contrib) + ((#:asd-file _ "") (string-append cat "/" mod "/" mod ".asd")) + ((#:asd-system-name _ #f) mod) + ((#:phases phases) + `(modify-phases ,phases + ;; Keep module's sources. + (add-before 'delete-modules 'copy-module-sources + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (clisp (string-append out "/share/common-lisp")) + (source (string-append clisp "/sbcl-source/" + ,mod "/" ,cat "/" ,mod)) + (dest (string-append clisp "/stumpwm-contrib/" + ,mod))) + (mkdir-p dest) + (copy-recursively source dest)) + #t)))))) + (synopsis syn) + (description desc))) + +(define-public stumpwm-cpu + (stumpwm-module "cpu" "modeline" + "Display CPU info" + "Display CPU info in the StumpWM modeline.")) + +(define-public stumpwm-mem + (stumpwm-module "mem" "modeline" + "Display memory info" + "Display memory info in the StumpWM modeline.")) + +(define-public stumpwm-hostname + (stumpwm-module "hostname" "modeline" + "Display hostname" + "Display hostname in the StumpWM modeline.")) + +(define-public stumpwm-battery-portable + (stumpwm-module "battery-portable" "modeline" + "Display laptop battery info" + "Display laptop battery info in the StumpWM +modeline.")) + +(define-public stumpwm-winner-mode + (stumpwm-module "winner-mode" "util" + "Emacs' winner-mode for StumpWM" + "Winner mode records changes in the window +configuration so that changes can be undone. It hooks into StumpWM to +dump layouts. This only works per group.")) + +(define-public stumpwm-swm-gaps + (stumpwm-module "swm-gaps" "util" + "Pretty (useless) gaps for StumpWM" + "Add gaps to StumpWM running along various borders.")) + +(define-public stumpwm-pinentry + (let ((pinentry (stumpwm-module "pinentry" "util" + "Integrate GnuPG Agent with StumpWM" + "GnuPG Agent uses +@code{stumpwm-pinentry} to ask for your password."))) + (package (inherit pinentry) + (inputs + `(("sbcl-cffi" ,sbcl-cffi) + ("sbcl-usocket-server" ,sbcl-usocket-server) + ("sbcl-percent-encoding" ,sbcl-percent-encoding) + ,@(package-inputs stumpwm-contrib))) + (propagated-inputs + `(("netcat" ,netcat)))))) + ;; The slynk that users expect to install includes all of slynk's contrib ;; modules. Therefore, we build the base module and all contribs first; then ;; we expose the union of these as `sbcl-slynk'. The following variable