From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id wLK/BOPbeGEGbwAAgWs5BA (envelope-from ) for ; Wed, 27 Oct 2021 06:56:03 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id iImTAOPbeGG3NQAAB5/wlQ (envelope-from ) for ; Wed, 27 Oct 2021 04:56:03 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id BBACC900F for ; Wed, 27 Oct 2021 06:56:02 +0200 (CEST) Received: from localhost ([::1]:40508 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mfayn-0004Hf-Ut for larch@yhetil.org; Wed, 27 Oct 2021 00:56:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52628) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mfawz-0001xE-HZ for guix-patches@gnu.org; Wed, 27 Oct 2021 00:54:09 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36626) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mfawy-0003pQ-TC for guix-patches@gnu.org; Wed, 27 Oct 2021 00:54:09 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mfawy-0005AI-S0 for guix-patches@gnu.org; Wed, 27 Oct 2021 00:54:08 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#51428] [PATCH core-update-frozen 17/20] profiles: Add a gdk-pixbuf-loaders-cache-file hook. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 27 Oct 2021 04:54:08 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51428 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 51428@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 51428-submit@debbugs.gnu.org id=B51428.163531041819678 (code B ref 51428); Wed, 27 Oct 2021 04:54:08 +0000 Received: (at 51428) by debbugs.gnu.org; 27 Oct 2021 04:53:38 +0000 Received: from localhost ([127.0.0.1]:48150 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mfawT-00057E-Vv for submit@debbugs.gnu.org; Wed, 27 Oct 2021 00:53:38 -0400 Received: from mail-qk1-f178.google.com ([209.85.222.178]:33639) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mfawA-00054J-WF for 51428@debbugs.gnu.org; Wed, 27 Oct 2021 00:53:19 -0400 Received: by mail-qk1-f178.google.com with SMTP id a132so282134qkg.0 for <51428@debbugs.gnu.org>; Tue, 26 Oct 2021 21:53:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=J6kpl8m7pAL17Q+AfNXk/lzscmckgjBZtLjSVUJVWps=; b=hHzw1zInF+iuxt5jzOqgHJWhQ7ztZTk3ZOuurjetf/T1j8yr66s8m9X6TptxKlsz1m vOm2CFggHOKlXjWOJ0jZAygWluaqW/COHRZ9yGF2l+IugSa32MEfORCA7SQ2ms3oFekK eBCal1NyETYIQvepZfbzVU6AXqSpJf5z3tfqJWwym1JNmEMa1qs6+UblzbYUEo0uFur6 3Ip12fSBzY0t2tp1MngqNmhEGnYfIfhETavYJTRsicrTiql4wFNZS0xU1qJS5uSWGA9V 2loqPblIm0TWHdr425uaekj6x1zAC7l3KaPrvNKrtH4it4RO7Dwt+JuTpNvxyAjiDoLK 8kkg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=J6kpl8m7pAL17Q+AfNXk/lzscmckgjBZtLjSVUJVWps=; b=J+DTyyhNtZdiiXzMx2y2zSA6mUqTy6XSYJu7P1mDb1b0Ee+feVzi12fNIqayKsVWEf PMpWFF/LJhgnVDM2CyC/avxQQc4hA7gwomw6nW3Pcaj8ts5JUe5S3KZsACm4qxbBvxXg JCHvdW4RbN/vmXABcx1Oo8w29/4GJxkGSjH3fCmaFT9gJjN8QL/j2KFEY6bhZZLq/rzm i28t2Z/utIzyaA4MpGeI+9EB8GvQIoLoEidTCZbqpA6AePfmukCTgEUGpbW0AH31WUIR xHeVSS8Xhehj5taZ5VKTItTXnhKWFwRtwy3vFD7WmwWZmsKyyEXeSKFtOyJftHdZVZPV swFw== X-Gm-Message-State: AOAM531p+2/2xiT18eWguqk6eKm1PtnGhaeu2YDlanjxUvdP9aTyMZR1 d7XPOMEuO1cYK2AHGJQVt3j4ruf6LME= X-Google-Smtp-Source: ABdhPJz5Ei2tPoRhuOpY0PjjmlFN0YH5BI5U+bZul8LudOTAilj8veU75YDSXKU86XB3mcEPFZFhWQ== X-Received: by 2002:a37:6412:: with SMTP id y18mr5757468qkb.293.1635310393319; Tue, 26 Oct 2021 21:53:13 -0700 (PDT) Received: from localhost.localdomain (dsl-10-133-98.b2b2c.ca. [72.10.133.98]) by smtp.gmail.com with ESMTPSA id bk13sm11868197qkb.58.2021.10.26.21.53.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Oct 2021 21:53:12 -0700 (PDT) From: Maxim Cournoyer Date: Wed, 27 Oct 2021 00:51:48 -0400 Message-Id: <20211027045151.9889-17-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211027045151.9889-1-maxim.cournoyer@gmail.com> References: <20211027045151.9889-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1635310562; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=J6kpl8m7pAL17Q+AfNXk/lzscmckgjBZtLjSVUJVWps=; b=k+F/fFjsb5zfTNMDV5yh1YUw3Ud5TwbRaUwQkSo8HKK+q4+/CNaVzBz7knA/w7p+2JkZ4S jTMtI+yH1JXV8IRFt13xTGWIJmw17T84GQ5PBYLWegXyqT34frCj3+ePNbcq5U6MnK345X 3HanTZvub+gbO8gZZkk9rVdJbO2pyC48RMbC7b1M5Sfu3B4FBcU4EvrMYUI9XzIVn4rLGv /JzvvhUwoYWlKo3gtxdcP713p6fFHksFhCIBKnijGO7Gy1wdoqB7+vgxoP6qkEHfCXLlCN q0r+0JFDM6SSQMJCbfmb9AviT+0z188zP/61mGIVQkuzNFnzRI8tBJG2KACy+w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1635310562; a=rsa-sha256; cv=none; b=M+Ug/ufkNiXsCnSlF1jYDZg/IDFyNdLo2oI2incscXNmgheKrJbVN9McBN6OMVuOYyduBL uFLxGIGTqqGxyGLYbOct3ONWv65B1sm5xX6ZoMtryNFK2V7rhZ//OMxuYuWX7erS5IU82P 2DogZlUDJa35Gs6EhhxKJDK60L27ZJC7Vl+0L5aZGrOZXBqGbdf76Flik6ejce5HcYC9vH 3LdXaqLkUv3Xh/suKMUCQgV56tsW6X+j/tj7UA3rxa1p/cxajoIn3KuauJz+2ZUCnY484t uHf11fiECJZ7V4XzhbieCC9HiMHQLEX1gAVFj5r+llCWPPw4ea6ROKpcSY7d5g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=hHzw1zIn; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 0.17 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=hHzw1zIn; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: BBACC900F X-Spam-Score: 0.17 X-Migadu-Scanner: scn0.migadu.com X-TUID: mdUH2vLAGfjE This paves the way toward properly fixing https://issues.guix.gnu.org/50957. * guix/profiles.scm (gdk-pixbuf-loaders-cache-file): Add procedure... (%default-profile-hooks): ... and register it as a profile hook. --- guix/profiles.scm | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/guix/profiles.scm b/guix/profiles.scm index 9494684228..bdc0d52626 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -7,7 +7,7 @@ ;;; Copyright © 2016, 2018, 2019, 2021 Ricardo Wurmus ;;; Copyright © 2016 Chris Marusich ;;; Copyright © 2017 Huang Ying -;;; Copyright © 2017 Maxim Cournoyer +;;; Copyright © 2017, 2021 Maxim Cournoyer ;;; Copyright © 2019 Kyle Meyer ;;; Copyright © 2019 Mathieu Othacehe ;;; Copyright © 2020 Danny Milosavljevic @@ -1161,6 +1161,32 @@ (define build `((type . profile-hook) (hook . emacs-subdirs)))) +(define (gdk-pixbuf-loaders-cache-file manifest) + "Return a derivation that produces a loaders cache file for every gdk-pixbuf +loaders discovered in MANIFEST." + (define gdk-pixbuf ;lazy reference + (module-ref (resolve-interface '(gnu packages gtk)) 'gdk-pixbuf)) + + (mlet %store-monad ((%gdk-pixbuf (manifest-lookup-package + manifest "gdk-pixbuf")) + (gdk-pixbuf-bin -> (file-append gdk-pixbuf "/bin"))) + (define build + (with-imported-modules (source-module-closure + '((guix build glib-or-gtk-build-system))) + #~(begin + (use-modules (guix build glib-or-gtk-build-system)) + (setenv "PATH" (string-append #$gdk-pixbuf-bin ":" (getenv "PATH"))) + (generate-gdk-pixbuf-loaders-cache '#$(manifest-inputs manifest) + (list #$output))))) + (if %gdk-pixbuf + (gexp->derivation "gdk-pixbuf-loaders-cache-file" build + #:local-build? #t + #:substitutable? #f + #:properties + '((type . profile-hook) + (hook . gdk-pixbuf-loaders-cache-file))) + (return #f)))) + (define (glib-schemas manifest) "Return a derivation that unions all schemas from manifest entries and creates the Glib 'gschemas.compiled' file." @@ -1672,6 +1698,7 @@ (define %default-profile-hooks ghc-package-cache-file ca-certificate-bundle emacs-subdirs + gdk-pixbuf-loaders-cache-file glib-schemas gtk-icon-themes gtk-im-modules -- 2.33.1