From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id WBdUAOBdLl9YQgAA0tVLHw (envelope-from ) for ; Sat, 08 Aug 2020 08:10:08 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id KIOaN99dLl9DXAAAbx9fmQ (envelope-from ) for ; Sat, 08 Aug 2020 08:10:07 +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 732CE94028F for ; Sat, 8 Aug 2020 08:10:07 +0000 (UTC) Received: from localhost ([::1]:39850 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k4JvZ-0004UW-Tv for larch@yhetil.org; Sat, 08 Aug 2020 04:10:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43922) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k4JvW-0004U7-FK for guix-patches@gnu.org; Sat, 08 Aug 2020 04:10:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46458) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k4JvW-0001tt-2a for guix-patches@gnu.org; Sat, 08 Aug 2020 04:10:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k4JvV-0007Jq-Sk for guix-patches@gnu.org; Sat, 08 Aug 2020 04:10:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#42758] [PATCH] gnu: foo2zjs: Fix install phase. Resent-From: "Boris A. Dekshteyn" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 08 Aug 2020 08:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 42758 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 42758@debbugs.gnu.org Cc: "Boris A. Dekshteyn" X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.159687419228112 (code B ref -1); Sat, 08 Aug 2020 08:10:01 +0000 Received: (at submit) by debbugs.gnu.org; 8 Aug 2020 08:09:52 +0000 Received: from localhost ([127.0.0.1]:58004 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k4JvM-0007JM-6f for submit@debbugs.gnu.org; Sat, 08 Aug 2020 04:09:52 -0400 Received: from lists.gnu.org ([209.51.188.17]:42282) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k4JvJ-0007JE-SX for submit@debbugs.gnu.org; Sat, 08 Aug 2020 04:09:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43856) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k4JvJ-0004Rf-NT for guix-patches@gnu.org; Sat, 08 Aug 2020 04:09:49 -0400 Received: from mail-lj1-x22c.google.com ([2a00:1450:4864:20::22c]:44007) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k4JvH-0001rk-Nf for guix-patches@gnu.org; Sat, 08 Aug 2020 04:09:49 -0400 Received: by mail-lj1-x22c.google.com with SMTP id v12so4521523ljc.10 for ; Sat, 08 Aug 2020 01:09:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=TrSg4SzeraxX9Xg3e02pj77MqXbqtKSbjBLWmCzr8pI=; b=m1le57/wbHzpe1fTSe0LHjCP32v/NuN870aRJNVDVTUajncNeNsvN1veTzPIBcitLY ueKx0ejsSUnFJmCdDm0DauqqoGwP2DffiLg6LIRAv9DdJOYb4Qe2KF0BVRW424FPc78I p/sYvzJLdjXOyI2utSJJDJkuumB+MpPYIs8iUS89M/33tQHUzU52icauKu0Igh9lERxh V86J4wlmdp04Mau166Y5e8nXvyjxeLOXO+J4iR8UzUrjEydaoJIwC8kRIqII9IOEfVJM fuT29gxdeu0EoHduVKDt/8y+982bRz5yH0r8TGMqVJAPjYJZ2eTTxv0P0i/wkUb4yatQ H2ew== 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=TrSg4SzeraxX9Xg3e02pj77MqXbqtKSbjBLWmCzr8pI=; b=OaVvI+dwJppFKckCt4YFkKq5VrwTGp9Vq2OFJ8mz5kEjxnWdw5HPbjvJcWHtwbkanu H3PJXfobIvRvBk+zFl5YyBPryimBcq6AuWNkWGdVfLVwuWmBoLu4GVvdIYjBk/S5vi0G qx4ElqNFNFLr66jy9FnnCmD6gpufyaTsRIS5RD1ZaB49nOEZDhGWBkURp6EPzN73Fe+v vOJLHUm+mesF3Q3iCVsl+dVrQdruk/9GasHe3mOotgXaqvDJZLHR89muMaCdw+01qHF2 1tiE8aXdUaDv/+4hWWk0Mu5WJ2TeiAfc4x58NRLXgHfubewLcpo58V6mtPoTybrLEfGC 4NSQ== X-Gm-Message-State: AOAM530fePnKS6dllpUdDdSDU2EXJTNFjcze30OvYPH9XM161rHKg2g5 5lFSP+bXeL7ZZiCgO4SEimcnvLO/kyg= X-Google-Smtp-Source: ABdhPJzUB11mCkq213ol51EnmACtxUX4L9KyMm5eQBNz1j0Sxhgy/9rUTXehLoFYpeMRKCPuHJmLaQ== X-Received: by 2002:a2e:6e06:: with SMTP id j6mr7939073ljc.431.1596874184833; Sat, 08 Aug 2020 01:09:44 -0700 (PDT) Received: from localhost ([2001:470:24:e81:e248:c95d:b39b:cf51]) by smtp.gmail.com with ESMTPSA id v9sm5205097lja.81.2020.08.08.01.09.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Aug 2020 01:09:44 -0700 (PDT) From: "Boris A. Dekshteyn" Date: Sat, 8 Aug 2020 20:09:18 +1200 Message-Id: <20200808080918.21304-1-boris.dekshteyn@gmail.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::22c; envelope-from=boris.dekshteyn@gmail.com; helo=mail-lj1-x22c.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -2.3 (--) 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-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=gmail.com header.s=20161025 header.b=m1le57/w; 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-Spam-Score: 5.59 X-TUID: iAZz2DhaXYxZ * gnu/packages/cups.scm (foo2zjs): Fix install phase Existed package definition builds fine, but de-facto it doesn't work as expected. This quick and dirty patch make it's functional (tested with HP LJ M1005, at least i'am able to add printer, configure, and print test page through cups web interface), but needs some further work (fix and install udev rules and hotplug helper) to make it fully functional. --- gnu/packages/cups.scm | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm index 281c2718e8..899ea594f3 100644 --- a/gnu/packages/cups.scm +++ b/gnu/packages/cups.scm @@ -28,6 +28,7 @@ #:use-module (gnu packages algebra) #:use-module (gnu packages autotools) #:use-module (gnu packages avahi) + #:use-module (gnu packages base) #:use-module (gnu packages compression) #:use-module (gnu packages fonts) ; font-dejavu #:use-module (gnu packages fontutils) @@ -716,6 +717,40 @@ printer/driver specific, but spooler-independent PPD file.") (("^MODTIME[[:blank:]]*=.*$") "MODTIME = echo Thu Jan 01 01:00:00 1970\n")) #t)) + (add-before 'install 'make-install-dirs + (lambda* (#:key outputs #:allow-other-keys) + ;; Make missing install dirs + (let ((out (assoc-ref outputs "out")) + (dirs '("/share/cups/model" + "/share/foomatic/db/source/opt" + "/share/foomatic/db/source/printer" + "/share/foomatic/db/source/driver" + "/lib/cups/filter"))) + (for-each (lambda (dir) + (mkdir-p (string-append out dir))) + dirs)))) + (add-after 'install 'wrap-wrappers + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (ghostscript (assoc-ref inputs "ghostscript")) + (coreutils (assoc-ref inputs "coreutils")) + (sed (assoc-ref inputs "sed"))) + (for-each (lambda (file) + (wrap-program file + `("PATH" ":" prefix + (,(string-append ghostscript "/bin:" + coreutils "/bin:" + sed "/bin"))))) + (find-files (string-append + out "/bin") "wrapper$"))))) + (add-after 'install 'install-cups-filters-symlinks + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (for-each + (lambda (file) + (symlink file + (string-append out "/lib/cups/filter/" (basename file)))) + (find-files (string-append out "/bin")))))) (add-after 'install 'remove-pdf (lambda* (#:key outputs #:allow-other-keys) ;; Remove 'manual.pdf' which is (1) useless (it's a @@ -729,7 +764,9 @@ printer/driver specific, but spooler-independent PPD file.") #:tests? #f ;no tests #:make-flags '("CC=gcc"))) (inputs - `(("ghostscript" ,ghostscript) + `(("coreutils" ,coreutils) + ("sed" ,sed) + ("ghostscript" ,ghostscript) ("foomatic-filters" ,foomatic-filters))) ;for 'foomatic-rip' (native-inputs `(("bc" ,bc) -- 2.28.0