From patchwork Tue Nov 15 04:49:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: jgart X-Patchwork-Id: 44520 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 B21FC27BBEB; Tue, 15 Nov 2022 04:50:21 +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=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=ham 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 4E8FD27BBE9 for ; Tue, 15 Nov 2022 04:50:20 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ountc-0001di-59; Mon, 14 Nov 2022 23:50:04 -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 1ounta-0001dQ-MB for guix-patches@gnu.org; Mon, 14 Nov 2022 23:50: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 1ounta-0000z0-9q for guix-patches@gnu.org; Mon, 14 Nov 2022 23:50:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ountZ-0002yO-S3 for guix-patches@gnu.org; Mon, 14 Nov 2022 23:50:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59276] [PATCH] gnu: Add smem. Resent-From: jgart Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 15 Nov 2022 04:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 59276 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 59276@debbugs.gnu.org Cc: jgart X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.166848778811384 (code B ref -1); Tue, 15 Nov 2022 04:50:01 +0000 Received: (at submit) by debbugs.gnu.org; 15 Nov 2022 04:49:48 +0000 Received: from localhost ([127.0.0.1]:52510 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ountM-0002xY-Ct for submit@debbugs.gnu.org; Mon, 14 Nov 2022 23:49:48 -0500 Received: from lists.gnu.org ([209.51.188.17]:35804) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ountL-0002xN-0U for submit@debbugs.gnu.org; Mon, 14 Nov 2022 23:49:47 -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 1ountK-0001cd-RJ for guix-patches@gnu.org; Mon, 14 Nov 2022 23:49:46 -0500 Received: from mx1.dismail.de ([78.46.223.134]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ountI-0000y8-Dn for guix-patches@gnu.org; Mon, 14 Nov 2022 23:49:46 -0500 Received: from mx1.dismail.de (localhost [127.0.0.1]) by mx1.dismail.de (OpenSMTPD) with ESMTP id 037df9c1 for ; Tue, 15 Nov 2022 05:49:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=dismail.de; h=from:to:cc :subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=20190914; bh=DUHEKRRO48mCdhWVUJL4E MeZjJ4m0jnVhHU1bJMKpRU=; b=jhkUD6nOirB8225GluwiI+6tE1x910fAFVumG cNBaRelH1WMco86cGaVHDPtoOkuyTkIMHUrFHT6oXGtWx0ueUh2f2S7j8bLplv8D 3j4PFGwYF0hVG9fzGZp2LJzTSIa9u3X57UfHN088rWWdthTYJFruxrjWf3w3+3dt VZ7cCfEi6txSeSM7nrDdKIM1+SOlOveNVbRUTSgKE3ooMdw6dUBW+G9vXjc9HvA8 /obt6997R4GamtAvSzGFNhw3UbQnaf+xTXmDPHmqKt6GW6a9wQJSWDrJk9T28wYy 1FXLMXHyMmZb13SfPLm+NaqJLjhpbZY1DfJ0KsncAumV/RbVQ== Received: from smtp1.dismail.de ( [10.240.26.11]) by mx1.dismail.de (OpenSMTPD) with ESMTP id 534b1c67 for ; Tue, 15 Nov 2022 05:49:39 +0100 (CET) Received: from smtp1.dismail.de (localhost [127.0.0.1]) by smtp1.dismail.de (OpenSMTPD) with ESMTP id 1428b60d for ; Tue, 15 Nov 2022 05:49:39 +0100 (CET) Received: by dismail.de (OpenSMTPD) with ESMTPSA id 994b078b (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 15 Nov 2022 05:49:38 +0100 (CET) Date: Mon, 14 Nov 2022 22:49:28 -0600 Message-Id: <20221115044928.9926-1-jgart@dismail.de> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Received-SPF: pass client-ip=78.46.223.134; envelope-from=jgart@dismail.de; helo=mx1.dismail.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, 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: , Reply-to: jgart X-ACL-Warn: , jgart via Guix-patches X-Patchwork-Original-From: jgart via Guix-patches via From: jgart Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/admin.scm (smem): New variable. --- gnu/packages/admin.scm | 44 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index ee730ac8e3..f493140ca7 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -54,6 +54,7 @@ ;;; Copyright © 2022 Andreas Rammhold ;;; Copyright © 2022 ( ;;; Copyright © 2022 Matthew James Kraai +;;; Copyright © 2022 jgart ;;; ;;; This file is part of GNU Guix. ;;; @@ -730,6 +731,49 @@ (define-public btop and processes.") (license license:asl2.0))) +(define-public smem + (package + (name "smem") + (version "1.5") + (source (origin + (method url-fetch) + (uri (string-append "https://selenic.com/repo/smem/archive/" + version ".tar.bz2")) + (sha256 + (base32 + "19ibv1byxf2b68186ysrgrhy5shkc5mc69abark1h18yigp3j34m")))) + (build-system gnu-build-system) + (arguments + (list #:tests? #f ; There is no test suite. + #:make-flags #~(list "smemcap") + #:phases + #~(modify-phases %standard-phases + (delete 'configure) + (replace 'build + (lambda _ + (let* ((system #$(cond ((target-x86?) "X86") + ((target-arm?) "ARM") + ((target-powerpc?) "POWER") + (else "CROSS_FINGERS")))) + (format #t "Building for ~a~%" system) + (invoke #$(cc-for-target) "-o" "smemcap" "smemcap.c" + "-g" "-Wall" "-D" system)))) + (replace 'install + (lambda _ + (let ((bin (string-append #$output "/bin")) + (man1 (string-append #$output "/share/man/man8"))) + (install-file "smemcap" bin) + (install-file "smem" bin) + (mkdir-p man1) + (copy-file "smem.8" (string-append man1 "/smem.8")))))))) + (native-inputs (list python-minimal-wrapper)) + (home-page "http://smem.sourceforge.net") + (synopsis "Memory reporting tool") + (description +"This package provides a command line tool that can give numerous reports +on memory usage on GNU/Linux systems.") + (license license:gpl2+))) + (define-public htop (package (name "htop")