From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id eFFQHeoT+WHSBQAAgWs5BA (envelope-from ) for ; Tue, 01 Feb 2022 12:05:14 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id kNmeGuoT+WF6swAA9RJhRA (envelope-from ) for ; Tue, 01 Feb 2022 12:05:14 +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 A8C942A530 for ; Tue, 1 Feb 2022 12:05:13 +0100 (CET) Received: from localhost ([::1]:48188 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nEqyG-00053a-GG for larch@yhetil.org; Tue, 01 Feb 2022 06:05:12 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54808) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nEqy6-00050S-OP for guix-patches@gnu.org; Tue, 01 Feb 2022 06:05:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:48920) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nEqy6-0002Av-Dv for guix-patches@gnu.org; Tue, 01 Feb 2022 06:05:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nEqy6-0002Nh-AB for guix-patches@gnu.org; Tue, 01 Feb 2022 06:05:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53583] [PATCH] gnu: Add ncdu-ng. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 01 Feb 2022 11:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53583 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: phodina Cc: 53583@debbugs.gnu.org Received: via spool by 53583-submit@debbugs.gnu.org id=B53583.16437134699106 (code B ref 53583); Tue, 01 Feb 2022 11:05:02 +0000 Received: (at 53583) by debbugs.gnu.org; 1 Feb 2022 11:04:29 +0000 Received: from localhost ([127.0.0.1]:41823 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nEqxU-0002Mg-G1 for submit@debbugs.gnu.org; Tue, 01 Feb 2022 06:04:29 -0500 Received: from flashner.co.il ([178.62.234.194]:37256) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nEqxQ-0002MQ-LI for 53583@debbugs.gnu.org; Tue, 01 Feb 2022 06:04:23 -0500 Received: from localhost (unknown [31.210.177.79]) by flashner.co.il (Postfix) with ESMTPSA id 32D3240023; Tue, 1 Feb 2022 11:04:14 +0000 (UTC) Date: Tue, 1 Feb 2022 13:03:41 +0200 From: Efraim Flashner Message-ID: Mail-Followup-To: Efraim Flashner , phodina , 53583@debbugs.gnu.org References: <6vXo33nNBkLPCf4VQTY3L-RrWG8JHPVjtgprEQk8vcmVXfDXty5cr6Dyj_qkc21iYmzHrVTKJukBnNWkx6FebmPZJyUZk3KBHaG5b2DksCM=@protonmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="qUSymrHyc4qWVKNJ" Content-Disposition: inline In-Reply-To: <6vXo33nNBkLPCf4VQTY3L-RrWG8JHPVjtgprEQk8vcmVXfDXty5cr6Dyj_qkc21iYmzHrVTKJukBnNWkx6FebmPZJyUZk3KBHaG5b2DksCM=@protonmail.com> X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 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 X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1643713514; 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: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; bh=Sfg87PEfK6HYIV7kGkWqfmudph4DZZjX49MFCd1Gs7Q=; b=SEhm6n1wCVV26CfnW7TiVX62BPlvGYTrzH7gdXa/E+Fn0xIKp4zuFvKDG6dLOH16OyDNgf wDxEvI/UfOpiXRoQmaZT8Pk4ntS8LZLxYF7kqtVHZ7mh1o5lxPF/cUCQNcnmcWK4+oYjrA apjmO4WDFW/kxrOXdDsU/bE1yRcA+4f07aLBCmv96e/4aJHcOh3zVucEdOH/N062CqG9mV 3Ewf1hsxfXSfZBTjW/aoji9Rl0nW5qQxi/h/dwTP5l3FqE2ZmpD6BsXf0uK3UcE5xIpNMU UQEoMvtv2PKXP+MVLY9L35XoTGm1tgqPFx/4HjlyIekUiN9E/F8rwOo6N5vH7Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1643713514; a=rsa-sha256; cv=none; b=p/JD7cH1YJO6Ee7yyb2CM32bOn0+VhyMiPvXEHmv3M5iKaG7KDZZXPER4O5C4KqfmpM7Pw GXDmhm0JkR+S6WPUy2XnsMpqmJ1ZHisjPMeGkzZ+32mx8tsfdFs6FEp2+ph9sIVDuewc/T ao6UYqRpxrCC+JLu+7uiZLqfrT7xNH+NvRktDHXYzMM+nX3JacQueF5swoc2wXMn+47G4y mI00jICxffoBGRLmv47HsEyVIPQ3FhD+6mNC/XoDiquUBHGMwj7dxHJLgAk1EO4f6CAyDD HzQMvXuL8ta5+gWd8Qq9Dzt6mvm6DGl6zIyAwpqPyGZSMvECdz2MIi0JDMMTsA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -6.03 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: A8C942A530 X-Spam-Score: -6.03 X-Migadu-Scanner: scn0.migadu.com X-TUID: otfpXj6qFF7D --qUSymrHyc4qWVKNJ Content-Type: multipart/mixed; boundary="Xh0iedGU7L3w2v5v" Content-Disposition: inline --Xh0iedGU7L3w2v5v Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 27, 2022 at 02:22:58PM +0000, phodina via Guix-patches via wrot= e: > Hello, >=20 > here is a patch for the ncdu. As version 2.0.* are based on Zig I decided= to create a new variable instead of updating the old one. >=20 > FIY this is my first encounter with Zig and I just briefly swept through = the documentation and I don't know if cross-compilation won't be an issue s= ince the previous versions are just plain C. >=20 > If you think there is no need to do this and we can just simply update le= t me know and I'll send updated patch. I also packaged ncdu@2 locally, to try out packaging a zig program. I was unable to build zig for aarch64 due to the memory requirements during the linking stage, so for now I agree it makes sense to have a separate zig version and not just upgrade to the new version. Also I'm attaching my copy if you want to take a look and see about merging the two. > ---- > Petr > From 3e6ad4ef4f928314bd69cae18a05be317e1b26ab Mon Sep 17 00:00:00 2001 > From: Petr Hodina > Date: Thu, 27 Jan 2022 14:56:39 +0100 > Subject: [PATCH] gnu: Add ncdu-ng. >=20 > * gnu/packages/ncdu.scm (ncdu-ng): New variable. >=20 > diff --git a/gnu/packages/ncdu.scm b/gnu/packages/ncdu.scm > index d6e4522bf0..01084976f0 100644 > --- a/gnu/packages/ncdu.scm > +++ b/gnu/packages/ncdu.scm > @@ -1,6 +1,7 @@ > ;;; GNU Guix --- Functional package management for GNU > ;;; Copyright =C2=A9 2014 John Darrington > ;;; Copyright =C2=A9 2018=E2=80=932021 Tobias Geerinckx-Rice > +;;; Copyright =C2=A9 2022 Petr Hodina > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -20,8 +21,10 @@ > (define-module (gnu packages ncdu) > #:use-module (gnu packages) > #:use-module (gnu packages ncurses) > + #:use-module (gnu packages zig) > #:use-module (guix licenses) > #:use-module (guix packages) > + #:use-module (guix utils) > #:use-module (guix download) > #:use-module (guix build-system gnu)) > =20 > @@ -49,3 +52,32 @@ (define-public ncdu > (string-append "https://g.blicky.net/ncdu.git/plain/COPYIN= G?id=3Dv" > version))) > (home-page "https://dev.yorhel.nl/ncdu"))) > + > +(define-public ncdu-ng > + (package > + (inherit ncdu) > + (name "ncdu-ng") > + (version "2.0.1") > + (source (origin > + (method url-fetch) > + (uri (string-append "https://dev.yorhel.nl/download/ncdu-" > + version ".tar.gz")) > + (sha256 > + (base32 > + "0j3w8xixz1zkzcpk0xrh6y3r7sii3h3y31lbvs5iqc5q7q6day9g"))= )) > + (arguments > + `(#:tests? #f > + #:make-flags > + (list (string-append "PREFIX=3D" > + (assoc-ref %outputs "out")) > + ,(string-append "CC=3D" > + (cc-for-target))) > + #:phases > + (modify-phases %standard-phases > + (add-after 'unpack 'set-home-dir > + (lambda* _ > + ;; Zig caches build > + (setenv "HOME" "/tmp"))) > + (delete 'configure)))) > + (native-inputs (list zig)) > + (inputs (list ncurses)))) > --=20 > 2.34.0 >=20 --=20 Efraim Flashner =D7=A8=D7=A0=D7=A9=D7=9C=D7=A4 = =D7=9D=D7=99=D7=A8=D7=A4=D7=90 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --Xh0iedGU7L3w2v5v Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename="ncdu.scm" Content-Transfer-Encoding: quoted-printable ;;; Copyright =C2=A9 2022 Efraim Flashner ;;; ;;; This file is an addendum to GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . (define-module (dfsg main ncdu) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix utils) #:use-module (guix gexp) #:use-module (gnu packages ncdu) #:use-module (gnu packages perl) #:use-module (gnu packages zig)) (define-public ncdu-2 (package (inherit ncdu) (name "ncdu2") ; only to prevent it from being installed by accide= nt (version "2.0.1") (source (origin (method url-fetch) (uri (string-append "https://dev.yorhel.nl/download/ncdu-" version ".tar.gz")) (sha256 (base32 "0j3w8xixz1zkzcpk0xrh6y3r7sii3h3y31lbvs5iqc5q7q6day9g")))) (arguments (list #:make-flags #~(list (string-append "PREFIX=3D" #$output) (string-append "CC=3D" #$(cc-for-target))) #:phases #~(modify-phases %standard-phases (delete 'configure) ; No configure script. (add-before 'build 'pre-build (lambda _ (setenv "ZIG_GLOBAL_CACHE_DIR" (mkdtemp "/tmp/zig-cache-XXXXXX")))) (add-after 'build 'build-manpage (lambda _ (delete-file "ncdu.1") (invoke "make" "doc"))) (replace 'check (lambda* (#:key tests? #:allow-other-keys) (when tests? (invoke "zig" "test" "build.zig"))))))) (native-inputs (list perl zig)))) --Xh0iedGU7L3w2v5v-- --qUSymrHyc4qWVKNJ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmH5E4sACgkQQarn3Mo9 g1FvOA//dE82l02yIesgvHx+mGxmzNpHlWK7zSlH45bLl7UZA/loKRScGTYXWqA3 OYtz/+FEAls1L8+mGTsOySarJoITLdRX+Rktn7/Pv/dRNPhguW9KaC4lNvr41g/v ct7C3PkpxxJJURdLSJO+A4x6CAIhY41cX9eRNvF2OjxHmJiQ6StYhi3I0QvRlInQ 8lKbrF397UOCWLNCYvkvmjUZk1A27fYiOQYFP3iA7oY/9qbGkzhBTjKHHHUSEOdb KQ8nB/EgfI3NUfmzUGyeAx/sQGGziOcrTLGMcWdJAh8Ya78jKuFwx0F+VtuxAx1l 6CT63n7k2cH7/of38PsaRxaPxkGfA05mOdno+Y5leClY6yth+l6VwNcscX0cFbKR 6yvkN08q77VRI4IfYk4NuxGczsPoXQOH4VxV0WbervMB+uWATP+HsozvGj23+Tsd zZUfLrUuZGf7F6lHFj7X3DO1UxxByw61Z9OxGNYemmDXctysdKdl7uYWsO8LFPVa 3qevcnebrgLY9X4z8WVbxmQmj5ZAQlft/bTSLno31U5YvQeDZzc8+5dbeU70PUi2 DIwJgN4tOL507ZxhcOBkdB5OEmf1SuBzWetOclAXmexP0qbTCpJ8Y9n7dEzEgJy0 nSBwTmgdUpK4tPkaleceRBBP1m+fhlelqZDOS5/BUAWuE/Z/Aa8= =pPI0 -----END PGP SIGNATURE----- --qUSymrHyc4qWVKNJ--