From patchwork Thu Jan 27 14:22:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: phodina X-Patchwork-Id: 36846 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 8146027BBEA; Thu, 27 Jan 2022 14:46:59 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id F38D227BBE9 for ; Thu, 27 Jan 2022 14:46:58 +0000 (GMT) Received: from localhost ([::1]:33054 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nD637-00035j-Vv for patchwork@mira.cbaines.net; Thu, 27 Jan 2022 09:46:58 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55050) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nD5gx-00007D-Dq for guix-patches@gnu.org; Thu, 27 Jan 2022 09:24:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:33471) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nD5gw-0003Wl-MW for guix-patches@gnu.org; Thu, 27 Jan 2022 09:24:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nD5gw-000402-F8 for guix-patches@gnu.org; Thu, 27 Jan 2022 09:24:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53583] [PATCH] gnu: Add ncdu-ng. Resent-From: phodina Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 27 Jan 2022 14:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 53583 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53583@debbugs.gnu.org X-Debbugs-Original-To: Guix Patches Received: via spool by submit@debbugs.gnu.org id=B.164329339415295 (code B ref -1); Thu, 27 Jan 2022 14:24:02 +0000 Received: (at submit) by debbugs.gnu.org; 27 Jan 2022 14:23:14 +0000 Received: from localhost ([127.0.0.1]:54604 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nD5g6-0003yY-7D for submit@debbugs.gnu.org; Thu, 27 Jan 2022 09:23:14 -0500 Received: from lists.gnu.org ([209.51.188.17]:51634) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nD5g3-0003yP-TI for submit@debbugs.gnu.org; Thu, 27 Jan 2022 09:23:09 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54910) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nD5g2-0008Ee-NF for guix-patches@gnu.org; Thu, 27 Jan 2022 09:23:07 -0500 Received: from mail-40133.protonmail.ch ([185.70.40.133]:45633) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nD5fz-0003TI-3F for guix-patches@gnu.org; Thu, 27 Jan 2022 09:23:06 -0500 Date: Thu, 27 Jan 2022 14:22:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail2; t=1643293380; bh=MPgfII7BzIm55q7PRTnhE6Dmyfefql98nFSuG2Lmt+g=; h=Date:To:From:Reply-To:Subject:Message-ID:From:To:Cc; b=eelz8jts4ORf2/S0S+7IJAQZUpQQ0BQp/DPCzeqfaCZ/oi8uTBsmBsJeueHmmPuQ+ zTBrocFdzN0CH5j5NmrcgdngzvSjRu6kZD2N4ntJ/XT4TGueyQNtm2JiWE7Edq0eoq FILoMp4vkAHCqMmsKkEqGjL0pOyvcOnZ4VcPRSmWVKfdjZPkEoNT9CHPZOzpxtk5QR 4u5LhoC3xczOdii2gmRd44VqqsuB9rKepcU0eWY2zwyizd5EJB6jGVexitKiVRQ7N+ W8g/FHwNWMz9x4ph4jummgpZ7i4z7/9sXFdaBk4kij+6x8Jn8CkXWB66yr4aAf+y4F rsEVN7Y43rvzg== Message-ID: <6vXo33nNBkLPCf4VQTY3L-RrWG8JHPVjtgprEQk8vcmVXfDXty5cr6Dyj_qkc21iYmzHrVTKJukBnNWkx6FebmPZJyUZk3KBHaG5b2DksCM=@protonmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=185.70.40.133; envelope-from=phodina@protonmail.com; helo=mail-40133.protonmail.ch 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, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: phodina X-ACL-Warn: , phodina via Guix-patches X-Patchwork-Original-From: phodina via Guix-patches via From: phodina X-getmail-retrieved-from-mailbox: Patches Hello, 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. 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 since the previous versions are just plain C. If you think there is no need to do this and we can just simply update let me know and I'll send updated patch. ---- 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. * gnu/packages/ncdu.scm (ncdu-ng): New variable. 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 © 2014 John Darrington ;;; Copyright © 2018–2021 Tobias Geerinckx-Rice +;;; Copyright © 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)) @@ -49,3 +52,32 @@ (define-public ncdu (string-append "https://g.blicky.net/ncdu.git/plain/COPYING?id=v" 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=" + (assoc-ref %outputs "out")) + ,(string-append "CC=" + (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)))) -- 2.34.0