From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id SOWLMoBluGM+cwAAbAwnHQ (envelope-from ) for ; Fri, 06 Jan 2023 19:16:32 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id qAZvMoBluGMECAEAauVa8A (envelope-from ) for ; Fri, 06 Jan 2023 19:16:32 +0100 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 707783AF48 for ; Fri, 6 Jan 2023 19:16:32 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pDrG7-0006Cg-H3; Fri, 06 Jan 2023 13:16:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pDrG6-0006CH-FW for bug-guix@gnu.org; Fri, 06 Jan 2023 13:16:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pDrG6-0004UX-7e for bug-guix@gnu.org; Fri, 06 Jan 2023 13:16:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pDrG5-0007C0-Sd for bug-guix@gnu.org; Fri, 06 Jan 2023 13:16:01 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#50329: [PATCH v2 1/2] gnu: emacs-lsp-treemacs: Remove unclearly licensed icons. References: In-Reply-To: Resent-From: r0man Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 06 Jan 2023 18:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50329 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 50329@debbugs.gnu.org Cc: Maxime Devos , Nicolas Goaziou , Roman Scherer Received: via spool by 50329-submit@debbugs.gnu.org id=B50329.167302890627551 (code B ref 50329); Fri, 06 Jan 2023 18:16:01 +0000 Received: (at 50329) by debbugs.gnu.org; 6 Jan 2023 18:15:06 +0000 Received: from localhost ([127.0.0.1]:55826 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDrFC-0007AD-6D for submit@debbugs.gnu.org; Fri, 06 Jan 2023 13:15:06 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:42795) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDrFA-000793-7K for 50329@debbugs.gnu.org; Fri, 06 Jan 2023 13:15:04 -0500 Received: by mail-wr1-f68.google.com with SMTP id w13so748476wrk.9 for <50329@debbugs.gnu.org>; Fri, 06 Jan 2023 10:15:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:cc:to:subject:date:from:from:to:cc:subject :date:message-id:reply-to; bh=r+LNKezmCNfxpyCeg2olBvHzgzoUFKskyF2ChDXoenw=; b=FVHvAXFAWOvJ3tDZ4IAMbdZWLNZaZgwEBItJMU8/lfZAndyn5bXGg6DvqNPywyH8df zW6mJaw/sSI9FofTeL/xk5ahnpfuyh0YAqBMdFFP9CxnQAJJBja1mIxYAuy51hZqnLpn 4mIGHe2SgwKyqMjlwn5vKHvrOj/T2ltCp5zY3KPv+KmR20sKT1GsNHML5imJrm40EyC1 1l16Q8gwao9DU/8DeCJQfgQPXmDBeCaXiweOoj/6Oy/aVh41Nwd3KkMEQxmnNHGPy/JP KC5el7PtiJsP3U3Bk7CqOzag+khehtJdw9AvoeU0WbcZSjEVQhtiFrwXWpIYOzHAbCLz 6lwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:cc:to:subject:date:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=r+LNKezmCNfxpyCeg2olBvHzgzoUFKskyF2ChDXoenw=; b=G3wZl3M0E8VgAaY4vBHLexURGm3Gpz60NjtXlrHpithZHO8rbL1yMFA0wBxfP7CrV7 MPqlAVRNjmTjl/RHFo7Zxlp+Oy6ZJONAgSu7JqnY808t3kB1U3LdeeiWjnVc2XHWzIvj oGc7KoqtJfN3xzSu20xnyeN/pHk3fakr/WLY24+iXQbFx2LS2ZGrdzK8Tfkp7+zG7oXi Pcn9FoPuQUDf6StVUT5xVocnpqvo9yvXYYam18YKkS7lRYE1Q+6dkVNrqxX6JvTKFOdo nZYJSJX0bRbcrFa67PH9C4W75HUDT4KcyUKAYlL7V00vj1Dl1RuIhF+CcIIq2Y3pv9gD wgHQ== X-Gm-Message-State: AFqh2kpEh9eSKnRXO/8sSJhteWzPUBfVqGXjiNHsUpMhZkrpSZEHoh90 ORuCjkJvveOaQndefIi6AyePOX9cXC8= X-Google-Smtp-Source: AMrXdXvYVJfUlAQli2RJcyovWN6YLRZwAyYYLMbNo465in4KK9UtZ49NKrsIAEBy9K+bFfsrXTnlJw== X-Received: by 2002:a5d:4e4a:0:b0:2a1:aa5f:8675 with SMTP id r10-20020a5d4e4a000000b002a1aa5f8675mr8353077wrt.31.1673028897323; Fri, 06 Jan 2023 10:14:57 -0800 (PST) Received: from lumine.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id z16-20020a5d4d10000000b00242209dd1ffsm1784414wrt.41.2023.01.06.10.14.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Jan 2023 10:14:56 -0800 (PST) From: r0man X-Google-Original-From: r0man Date: Sat, 19 Mar 2022 15:33:24 +0100 Message-ID: <4bee3a29d44d2711e85be65dbb288e751c7fa315.camel@burningswell.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1673028992; a=rsa-sha256; cv=none; b=SydBHf/rwQQ+DQ4/KqKhEAKMxqKTpFFPQpgRZL+pJbOkR8zHZ1+CFlPI2OeIAspzPr78A6 FX4q7Suq3e3vZ/7kQ2V+Nq2Wjws/143QXFxg6JIxZaOXAw70gJhbY0ZBMUEtyrTSuRVUQ3 /zRPAQHP0Kbn7d+C7A28+iwZeKq5GdjeEWJC8zOsW27LP8iPQIjp58DxnWpI0/ImkogU8N 1vlWTtx3m12+DCF2iI9YDAa5QX2s8ItPuCtJIvS7Z9Pj6kqk75mDgNVZO/gZq+j+qLBW+M TIFeSNj4pxx/liFTlDub0+WVk/R/pRdAk+Tke6d9d+CXpaSqcAgHzJJTwXM8oA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=FVHvAXFA; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1673028992; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: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=r+LNKezmCNfxpyCeg2olBvHzgzoUFKskyF2ChDXoenw=; b=QXdl6cNn97zUudQ7eaYql0tFwvblgsKK4l+wcy51/dAs6IymT/C8i5aak3QfZZZ2Nz3pss hZUZ0sIHkkWEKKgHHfGO1DX2k8bJnOW/GD777WBtyGW39UYf7+LB63rvfsCjewMIo2XBMO NcYUFC7oQh3rAnMOsIm6gdiNfFACgOlcpeOxHEQRvQyb1GCNVgeESC4EibHInqqRVlVlxI 4/2Vf736RH5B2f48Vpj318jqqGdiVF+ECtXGXnMWaKZX5gYFshqolCE2e1gTRUCr5KR9LF ydjzP5wHnO4Wh0eO23I/klsn6R/+BRXpRhtkSrzQuARjpHpZ0arDJFunNgm2Hw== X-Spam-Score: -1.96 X-Migadu-Queue-Id: 707783AF48 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=FVHvAXFA; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -1.96 X-TUID: 9JVLx3kbHCNg emacs-lsp-treemacs bundles icons with unclear licenses. See also . * gnu/packages/emacs-xyz.scm (%emacs-lsp-treemacs-upstream-source): New variable. (emacs-treemacs)[source]: Use a computed origin to remove unclearly licensed icons. Also remove source code which mentions said icons. Signed-off-by: Liliana Marie Prikler --- gnu/packages/emacs-xyz.scm | 72 ++++++++++++++++++++++++++++++++++---- 1 file changed, 65 insertions(+), 7 deletions(-) diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index b5c2c011db..caa9b4ca6e 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -27305,19 +27305,77 @@ (define-public emacs-lsp-mode and Projectile.") (license license:gpl3+)))) +(define* (%emacs-lsp-treemacs-upstream-source #:key commit version hash) + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/emacs-lsp/lsp-treemacs") + (commit commit))) + (file-name (git-file-name "emacs-lsp-treemacs" version)) + (hash hash))) + (define-public emacs-lsp-treemacs (package (name "emacs-lsp-treemacs") (version "0.4") (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/emacs-lsp/lsp-treemacs") - (commit version))) - (file-name (git-file-name name version)) - (sha256 - (base32 "05ivqa5900139jzjhwc3nggwznhm8564dz4ydcxym2ddd63571k0")))) + (method (@@ (guix packages) computed-origin-method)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 #f) + (uri + (delay + (with-imported-modules '((guix build emacs-utils) + (guix build utils)) + #~(begin + (use-modules (guix build utils) + (guix build emacs-utils)) + (let* ((dir (string-append "emacs-lsp-treemacs-" #$version))) + + (set-path-environment-variable + "PATH" '("bin") + (list #+emacs-minimal + #+(canonical-package bash) + #+(canonical-package coreutils) + #+(canonical-package gzip) + #+(canonical-package tar))) + + ;; Copy the upstream source + (copy-recursively + #+(%emacs-lsp-treemacs-upstream-source + #:commit version #:version version + #:hash + (content-hash + "05ivqa5900139jzjhwc3nggwznhm8564dz4ydcxym2ddd63571k0")) + dir) + + (with-directory-excursion dir + ;; The icons are unclearly licensed and possibly non-free, + ;; see + (with-directory-excursion "icons" + (for-each delete-file-recursively + '("eclipse" "idea" "netbeans"))) + + ;; Also remove any mentions in the source code. + (make-file-writable "lsp-treemacs-themes.el") + (emacs-batch-edit-file "lsp-treemacs-themes.el" + '(progn + (while (search-forward-regexp + "(treemacs-create-theme \"\\([^\"]*\\)\"" + nil t) + (pcase (match-string 1) + ("Iconless" nil) + (_ (beginning-of-line) + (kill-sexp))) + (basic-save-buffer))))) + + (invoke "tar" "cvfa" #$output + "--mtime=@0" + "--owner=root:0" + "--group=root:0" + "--sort=name" + "--hard-dereference" + dir)))))))) (build-system emacs-build-system) (propagated-inputs (list emacs-lsp-mode emacs-treemacs)) base-commit: 8be0a97a8139fdd4d196092008b98668f1a8b2bb -- 2.38.1