From patchwork Wed Jun 16 06:43:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Brice Waegeneire X-Patchwork-Id: 30317 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 15FEF27BC81; Wed, 16 Jun 2021 07:45:17 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id A3ED627BC78 for ; Wed, 16 Jun 2021 07:45:16 +0100 (BST) Received: from localhost ([::1]:38300 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ltPIZ-0005Pe-P3 for patchwork@mira.cbaines.net; Wed, 16 Jun 2021 02:45:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38258) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ltPIM-0005OM-MC for guix-patches@gnu.org; Wed, 16 Jun 2021 02:45:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39772) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ltPIM-00053i-C4 for guix-patches@gnu.org; Wed, 16 Jun 2021 02:45:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ltPIM-0003Um-8q for guix-patches@gnu.org; Wed, 16 Jun 2021 02:45:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49058] [PATCH] gnu: Add duc. Resent-From: Brice Waegeneire Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 16 Jun 2021 06:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 49058 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49058@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.162382585013357 (code B ref -1); Wed, 16 Jun 2021 06:45:02 +0000 Received: (at submit) by debbugs.gnu.org; 16 Jun 2021 06:44:10 +0000 Received: from localhost ([127.0.0.1]:51316 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ltPHO-0003Sl-CU for submit@debbugs.gnu.org; Wed, 16 Jun 2021 02:44:10 -0400 Received: from lists.gnu.org ([209.51.188.17]:52976) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ltPHM-0003SL-HA for submit@debbugs.gnu.org; Wed, 16 Jun 2021 02:44:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38116) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ltPHM-0004ew-8g for guix-patches@gnu.org; Wed, 16 Jun 2021 02:44:00 -0400 Received: from relay10.mail.gandi.net ([217.70.178.230]:33855) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ltPHK-0004RO-26 for guix-patches@gnu.org; Wed, 16 Jun 2021 02:44:00 -0400 Received: (Authenticated sender: brice@waegenei.re) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 54F2724000A for ; Wed, 16 Jun 2021 06:43:55 +0000 (UTC) From: Brice Waegeneire Date: Wed, 16 Jun 2021 08:43:52 +0200 Message-Id: <20210616064352.13688-1-brice@waegenei.re> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Received-SPF: pass client-ip=217.70.178.230; envelope-from=brice@waegenei.re; helo=relay10.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=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" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/disk.scm (duc): New variable. --- gnu/packages/disk.scm | 53 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm index ccda71b268..ab9c29f081 100644 --- a/gnu/packages/disk.scm +++ b/gnu/packages/disk.scm @@ -20,6 +20,7 @@ ;;; Copyright © 2020 Raghav Gururajan ;;; Copyright © 2021 Michael Rohleder ;;; Copyright © 2021 Mathieu Othacehe +;;; Copyright © 2021 Brice Waegeneire ;;; ;;; This file is part of GNU Guix. ;;; @@ -46,6 +47,7 @@ #:use-module (gnu packages compression) #:use-module (gnu packages crypto) #:use-module (gnu packages cryptsetup) + #:use-module (gnu packages databases) #:use-module (gnu packages docbook) #:use-module (gnu packages documentation) #:use-module (gnu packages elf) @@ -1303,3 +1305,54 @@ like raw system image files, can be copied or flashed a lot faster and more reliably with @code{bmaptool} than with traditional tools, like @code{dd} or @code{cp}.") (license license:gpl2))) + +(define-public duc + (package + (name "duc") + (version "1.4.4") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/zevv/duc") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1i7ry25xzy027g6ysv6qlf09ax04q4vy0kikl8h0aq5jbxsl9q52")))) + (build-system gnu-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out"))) + (substitute* "src/duc/cmd-ui.c" + (("ncursesw/ncurses.h") "ncurses.h")) + (substitute* "examples/index.cgi" + (("/usr/local/bin/duc") + (string-append out "/bin/duc"))) + #t))) + (add-after 'install 'install-examples + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (doc (string-append out "/share/doc/" ,name "-" ,version))) + (copy-recursively "examples" (string-append doc "/examples")))))))) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("libtool" ,libtool) + ("pkg-config" ,pkg-config))) + (inputs + `(("cairo" ,cairo) + ("pango" ,pango) + ("tokyocabinet" ,tokyocabinet) + ("ncurses" ,ncurses))) + (synopsis "Library and suite of tools for inspecting disk usage") + (description " Duc maintains a database of accumulated sizes of +directories of the file system, and allows you to query this database with +some tools, or create fancy graphs showing you where your bytes are. + +Duc comes with console utilities, ncurses and X11 user interfaces and a CGI +wrapper for disk usage querying and visualisation.") + (license license:lgpl3+) + (home-page "http://duc.zevv.nl")))