From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 06 14:11:26 2022 Received: (at submit) by debbugs.gnu.org; 6 Jan 2022 19:11:26 +0000 Received: from localhost ([127.0.0.1]:42339 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n5YAT-0007ap-9W for submit@debbugs.gnu.org; Thu, 06 Jan 2022 14:11:25 -0500 Received: from lists.gnu.org ([209.51.188.17]:52032) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n5YAP-0007aV-Gy for submit@debbugs.gnu.org; Thu, 06 Jan 2022 14:11:19 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44318) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n5YAO-0000wr-Rn for guix-patches@gnu.org; Thu, 06 Jan 2022 14:11:16 -0500 Received: from [2a00:1450:4864:20::329] (port=46673 helo=mail-wm1-x329.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n5YAN-0007PR-0k for guix-patches@gnu.org; Thu, 06 Jan 2022 14:11:16 -0500 Received: by mail-wm1-x329.google.com with SMTP id d187-20020a1c1dc4000000b003474b4b7ebcso1051992wmd.5 for ; Thu, 06 Jan 2022 11:11:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=oStRKOLB+sfu4ATCEmMi4WHMlGUqV+ZqyTgbgh7oCXc=; b=e5nbIl2TNoMLti4gatJMSNHdcxS7650OBZ46nuR2SR+V1yOnIkIBxy/+l3B0TbZZpD 48PTPNygctvWQrvdKtGYCnvvTmL4tRBuoPqJxzzVxC/juAqRXcxwJR1duYaEEMF3F6hR APhKyyagU4G58vLYi6mphTIVwWEU0Qs1kbXsdtey8d6dP9xNTE5Rl4SpcKGCwzOV1XLw HNOoTFgz5qt5KCOz4d4TS8HMTlLedEnK1+696E+FeOHDTbX9EmTuQlGVgBOSEMRsOflC V12B0VLV4gsWBM3oGAZNeqdMZ9y0A36tV9ZjQTjgVK3khJFSLyzvRSARrBMbuX2Tm0Rj sQrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=oStRKOLB+sfu4ATCEmMi4WHMlGUqV+ZqyTgbgh7oCXc=; b=J1jyE/qODL6JYA3yr+9Mq33PGTJPwAMe8w7debnoyKdDHw9LjAqCzykk6/LLF2bgwS EliHgKpogNmVzqOEDrPTW6pmoJYEg/Su4Dt9MaiY6daBw6RAMbn0mMugvKh1UZ6S3Qyi RBHpYLI23yw+cBkZYB5OrFiy6ca5LYUhyCy1VXhdvzmG9WzYrxVLLxUBMUKmleNdRhwJ tzc8XOd/4P12XhRNF+wOjIz8E8U6dc9m4/Xw/F2VVc5L/aA8zuULc2LgYakoSjeTVwqh wKsBd1OVZOt3yDANSiJ9imR52fgkA2UkOnWK1eXWZMwXPMq/El0gCry1hU6G6EZ07jeL hppA== X-Gm-Message-State: AOAM5312+D+oqfMQqJllPFPdWuTpd9d+PFmrRiUjrsSY+33kEFJUOwow otKfrQGX92Cm4e2DHYxa++VI21hTo38= X-Google-Smtp-Source: ABdhPJy94o44u/7hgjCYJ/CcL6okgzHafZJlEKdqRcNaftqzjjSCxcbseWeHsqqCnCuE1XZh2XVcaw== X-Received: by 2002:a1c:2b42:: with SMTP id r63mr8068809wmr.80.1641496272999; Thu, 06 Jan 2022 11:11:12 -0800 (PST) Received: from mbp.home ([92.186.167.53]) by smtp.gmail.com with ESMTPSA id k10sm2726230wrz.113.2022.01.06.11.11.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jan 2022 11:11:12 -0800 (PST) From: Jorge Acereda To: guix-patches@gnu.org Subject: [PATCH] gnu: Add gpu-switch. Date: Thu, 6 Jan 2022 20:11:08 +0100 Message-Id: <79655b434893691c6647f28087652f162aad80de.1641496236.git.jacereda@gmail.com> X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 Content-Type: text/plain; charset=yes Content-Transfer-Encoding: 8bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::329 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=jacereda@gmail.com; helo=mail-wm1-x329.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * gnu/packages/graphics.scm (gpu-switch): New variable. --- gnu/packages/graphics.scm | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index fe35aaad2d..b5b50f6192 100644 --- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm @@ -27,6 +27,7 @@ ;;; Copyright � [...] Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (jacereda[at]gmail.com) 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.51.188.17 listed in wl.mailspike.net] -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [209.51.188.17 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 1.3 SPOOFED_FREEMAIL No description available. 1.5 SPOOF_GMAIL_MID From Gmail but it doesn't seem to be... X-Debbugs-Envelope-To: submit Cc: Jorge Acereda X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) * gnu/packages/graphics.scm (gpu-switch): New variable. --- gnu/packages/graphics.scm | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index fe35aaad2d..b5b50f6192 100644 --- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm @@ -27,6 +27,7 @@ ;;; Copyright © 2021 Andy Tai ;;; Copyright © 2021 Ekaitz Zarraga ;;; Copyright © 2021 Vinicius Monego +;;; Copyright © 2022 Jorge Acereda ;;; ;;; This file is part of GNU Guix. ;;; @@ -113,6 +114,7 @@ (define-module (gnu packages graphics) #:use-module (guix build-system meson) #:use-module (guix build-system python) #:use-module (guix build-system qt) + #:use-module (guix build-system trivial) #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix hg-download) @@ -2011,3 +2013,39 @@ (define-public monado such as VR and AR on mobile, PC/desktop, and any other device. Monado aims to be a complete and conforming implementation of the OpenXR API made by Khronos.") (license license:boost1.0))) + +(define-public gpu-switch + (package + (name "gpu-switch") + (version "2017-04-28") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/0xbb/gpu-switch") + (commit "a365f56d435c8ef84c4dd2ab935ede4992359e31"))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1jnh43nijkqd83h7piq7225ixziggyzaalabgissyxdyz6szcn0r")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils)) + (let ((out (assoc-ref %outputs "out")) + (gpu-switch (search-input-file %build-inputs "gpu-switch")) + (readme (search-input-file %build-inputs "README.md"))) + (install-file gpu-switch (string-append out "/bin")) + (install-file readme (string-append out "/share/doc/gpu-switch-" ,version)) + #t)))) + (home-page "https://github.com/0xbb/gpu-switch") + (synopsis "GPU switcher for dual-GPU MacBook Pro models") + (description + "Switch between the integrated and dedicated GPU of dual-GPU MacBook Pro +models for the next reboot. + +It aims to remove the need of booting into OS X and running gfxCardStatus +v2.2.1 to switch to the integrated card.") + (license license:expat))) + -- 2.34.0