From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id SPecBYDMCmZBkgAAe85BDQ:P1 (envelope-from ) for ; Mon, 01 Apr 2024 17:02:24 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id SPecBYDMCmZBkgAAe85BDQ (envelope-from ) for ; Mon, 01 Apr 2024 17:02:24 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=wolfsden.cz header.s=mail header.b=OP2c1qeb; dkim=pass header.d=wolfsden.cz header.s=mail header.b=kIpaKG9Z; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=wolfsden.cz ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1711983743; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=czaL2ZdTiysnr/I1hbOzUUQ5YOgrHwwASzJZVfQ4CvU=; b=dSOF7Sn9Uu8XRH56W7GoXGnNTD8eXF0zASeG5RslHaRJaaudTxvnJD5H+QAX7+TkpGwk8t 55Pcyy7NF5k49p/zTihl1JuBb6WPVwqCQyIIB9LIv79q0Cl7J0+qcY8m2BwahZWOvr4wIg dV6/AZ4FbhwmgrfbeSob1/MOZ6ZuVRId0wfVxsl8YN0JPNeeiZtOgU03Xt5YdMzDBs+jef VRt7VmPC7poFobcr/pZ0jFJKa3HEzLRUc38L12Mv+K5UL7RvLfkT0FiZ2otuEsAmxzToHU h0VfJloMsmInsyWEdwM41PlWcpgycyKmv9SyA1ibkFEV7SbZG3LywmNPBR12Zg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=wolfsden.cz header.s=mail header.b=OP2c1qeb; dkim=pass header.d=wolfsden.cz header.s=mail header.b=kIpaKG9Z; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=wolfsden.cz ARC-Seal: i=1; s=key1; d=yhetil.org; t=1711983743; a=rsa-sha256; cv=none; b=UkO5NK6pUBMKbRPzAEM4BfwKBKkvfDljZHPlLMysLmOWslZu93IPge5ND9kv5qy7UKNvYY lGl2FN8HH9TM3P//Jw7ahnBPOgLaqhKjt4DXKvMR/sveRGMnyd2VjaYntLcfZuPuFNmlyV g206iAk4wLeTTYceg5epgbtRH5UwlvO6ST6Mawx1H8R8leZcKY1w0ST0/W30tFgbTynDEB i8/wcB6dpc1a/USe2cpnPFABPs/Pnj7YBIe65nDcHEY1n4rkKCRpwETDWI+vvsXXBHwhb4 2WqOh1ou5XhexWydi3Kyxt+mpBkIaRK/9tlmmYFys763R6nnNmBgUwAbr2oRvA== 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 74D4768AA1 for ; Mon, 1 Apr 2024 17:02:23 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rrJAV-00046y-Eu; Mon, 01 Apr 2024 11:01:52 -0400 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 <~@wolfsden.cz>) id 1rrJAM-00045t-M7 for help-guix@gnu.org; Mon, 01 Apr 2024 11:01:46 -0400 Received: from wolfsden.cz ([37.205.8.62]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <~@wolfsden.cz>) id 1rrJAG-0006Iw-9X for help-guix@gnu.org; Mon, 01 Apr 2024 11:01:40 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 3A3A42A11C4; Mon, 1 Apr 2024 15:01:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1711983692; bh=3T/xWCprErjvbO7F2tHFTDGVK73Sow6d03AfFiUVy9k=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=OP2c1qebVNsPpRw53qfU3wVYs77yogI9relQw0SoZlDZiY1Wz2os/0iRTh93yXeED ZN4Zj+MCPQKbTv1v1JhkD1sq+weDOqHPYUbD5m9NRm+9fsvlk4BIQq541Nn8ZNsZGI vfao+Reexd/CUq9i0tvwqtQckuDVrfJ4me6NXOlD24ssWIPDZPxYGDzXxL51UH6EDN XFifwVGrP98CqQ6bDInOK73vEv1TFnGaddINF+Up+1Fk4NEJXfd42V0zcVUS+DjmbT jl8PYjAGPeFAqpGTY0IT4Gnshf4HmCWzQQt1I8uKsK3mSXlM5ButbiGGHW/MRF+qA9 jLZFJmYzIfDspygNVVdGlMXxz/oSldB76P7dLx+SMlwGehxAoL4ktb35dywcM5Wp5U +UpijHD1c5aDsGHbXSq4N6ePTmlDyG8pjOpi97CcKKqpa5t6ajdc44+OykyMWFr3tz Guw0RKzvR61N2IeLU2PIwgThPHsFOAk0+p68q9NEGR58GesOlwDGPf5dm6XdiEiST/ Y75ls7BFLZNtTmFeqmjktM03Tb5uce/Ar+lh9QZLDDbF/S9RKLOjiix1ZmqsQr8vFa 0RYPFN4Fq89KPyu0+FTD1110xjdfUC53eE7YKKZxFIE73hD3PjxVe50DwwLty6S8yQ thOaBn389VtOdKCpBeKatIaQ= Received: from localhost (unknown [193.32.127.157]) by wolfsden.cz (Postfix) with ESMTPSA id D2F8D2A03B0; Mon, 1 Apr 2024 15:01:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1711983691; bh=3T/xWCprErjvbO7F2tHFTDGVK73Sow6d03AfFiUVy9k=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=kIpaKG9ZncmM0GB1Yb4D343FrO65ocahzRjSgoy7hc/KrIalCh0FjLOVpk6tUovm2 eWemGIh9C4tSzu3+O0DS0bUDsUa/ydcXB2/KM/J1tyZxZsz3z3cWGUJ2ZOfRL+LYW5 8u0DqpSilNhDtauc7mV5s/oW3TkFqeyXtS7MQSgqQgVgQbok76FbZrzAarv2CmsXJE bEvwmsZL5ww9z+I/8tOe8M22KJ3sULZr0CuM34wp8b0bjfFjQ861A1uTeOOEicZ+fx VQpvhkXAqi3jMCaWXPDcbrqVl146n8bJnB53lXS9lN6bYAK5hICMkhfW9M2gNuGTb2 UQn6aqRw+Ya5E1R8cd3z1Bt+Rb93+FySZzNAPx2GmIRJ3vvYZ7QnKkmX9MGyt1n3Ph amF4FNLDjU8p+tDWKQCfAGU3M8OJmdH287ma3BlSkd4nq3d00zvPZ7hAef0yaBQ/W/ POjW5sD8KowyhfqOPA6V8AIX0Cigyxsp6FHqCPICy16B+Zi2FEc45gSR4EeYuaqUWb 7miYouXG3ng3AjCCpSO82VYmHlZAOTDqGMGfvxV0a5abW3eAxakkSqIhc+Gy2yrDCa /zJB/SGSu1tvoXS5ke1eV3Aap8U1X9+6ySliHHMbtQq0M9ydYTIvVFW5kxnusImERR SRMCgoxulAMMI0jeijZoglbw= Date: Mon, 1 Apr 2024 17:01:31 +0200 From: Tomas Volf <~@wolfsden.cz> To: Greg Hogan Cc: Spencer Skylar Chan , help-guix@gnu.org Subject: Re: guix size with manifest? Message-ID: Mail-Followup-To: Greg Hogan , Spencer Skylar Chan , help-guix@gnu.org References: <20653029-ef2c-49be-8a44-3608837e161d@terpmail.umd.edu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="uK5589QYuS9lDnv6" Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=37.205.8.62; envelope-from=~@wolfsden.cz; helo=wolfsden.cz 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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: 74D4768AA1 X-Spam-Score: -10.55 X-Migadu-Spam-Score: -10.55 X-Migadu-Scanner: mx10.migadu.com X-TUID: zI2/P6ypkUIG --uK5589QYuS9lDnv6 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2024-04-01 10:18:09 -0400, Greg Hogan wrote: > On Sun, Mar 31, 2024 at 5:39=E2=80=AFPM Spencer Skylar Chan > wrote: > > > > Dear Guix, > > > > How do I run guix size with a manifest? Most guix shell commands use -m > > for a manifest file, but guix size uses -m for map-file. Right now I'm = using > > > > grep -F \" manifest.scm | cut -d \" -f 2 | xargs guix size > > > > but this would only work for autogenerated manifests from > > guix shell --export-manifest and not manifests written by hand. > > > > Thanks, > > Skylar > > I am interested to hear other ideas, I hope you will not regret this sentence once you see my "one-liner": $ cat manifest.scm ;; What follows is a "manifest" equivalent to the command line you gave. ;; You can store it in a file that you may then pass to any 'guix' command ;; that accepts a '--manifest' (or '-m') option. (specifications->manifest (list "gcc-toolchain")) $ printf '(use-modules (guix packages) (guix derivations) (guix store) (gui= x profiles) (guix scripts environment) (guix scripts size)) ((@@ (guix scri= pts size) display-profile) (run-with-store (open-connection) ((@@ (guix scr= ipts size) store-profile) (map (=CE=BB (entry) (derivation->output-path (ru= n-with-store (open-connection) (package->derivation (manifest-entry-item en= try))))) (manifest-entries (load-manifest "manifest.scm"))))))' | guix repl= /dev/stdin store item total s= elf /gnu/store/i3x1cr4b0f20r8pkcfq7sxmwv6261b0y-gcc-toolchain-13.2.0 423.3 = 0.1 0.0% /gnu/store/vjjk375kysja1jz0837lypd09rdgs47c-gcc-13.2.0 304.5 = 178.0 42.1% /gnu/store/v5aqhqxjqdvh9fhi64ifxnfji562j178-ld-wrapper-0 189.1 = 0.1 0.0% /gnu/store/ksx7y5947h14pdv09ah704lkkibw1qp0-guile-3.0.9 134.0 = 53.1 12.5% /gnu/store/bnw209k5cvbyi04kngddlk2ir77x8yii-binutils-2.38 95.5 = 54.9 13.0% /gnu/store/gdy0b065fk8wwxv49ln0c7892pam78z1-isl-0.24 83.2 = 5.2 1.2% /gnu/store/w55122b226ss928lxxg58plalah3xl9h-mpc-1.3.1 80.6 = 0.5 0.1% /gnu/store/4vn8m606saf5i3nvksgvl958c0i0nvsn-mpfr-4.2.0 80.2 = 2.2 0.5% /gnu/store/m57d52krll9vlzmc0cqfg6dwn7n0p52j-gcc-13.2.0-lib 80.0 = 39.4 9.3% /gnu/store/dpvr7rj89j7xdnzpjhhll8dpqh3fizz5-gmp-6.2.1 78.0 = 2.7 0.6% /gnu/store/sbigf12hsr3ciyvc5pdymlbd5ji4xmv4-libunistring-1.0 77.8 = 2.5 0.6% /gnu/store/bvqbwh04lfacmsifh4gnfx1z8pmpjls0-pkg-config-0.29.2 76.4 = 1.1 0.3% /gnu/store/ag3azcwi1r94j9i6bzgqxhk9n40v1ma5-libgc-8.2.2 76.1 = 0.8 0.2% /gnu/store/hl6lb3irs8wrfv49fnirxshsq590pi9v-zlib-1.2.13 75.5 = 0.2 0.1% /gnu/store/f62ci08wpcyx4x5drvhpk831ydjmh73j-libffi-3.4.4 75.5 = 0.2 0.0% /gnu/store/6ncav55lbk5kqvwwflrzcr41hp5jbq0c-gcc-11.3.0-lib 75.3 = 34.7 8.2% /gnu/store/v9p25q9l5nnaixkhpap5rnymmwbhf9rp-bash-minimal-5.1.16 41.6 = 1.0 0.2% /gnu/store/ln6hxqjvz6m9gdd9s97pivlqck7hzs99-glibc-2.35 40.6 = 38.8 9.2% /gnu/store/5iklcps70c0sfkxvlrhg8jhf3q4h18bj-linux-libre-headers-5.15.49 = 5.9 5.9 1.4% /gnu/store/zzyywykw7kriln18rxqd82f0k5kidla7-bash-static-5.1.16 1.8 = 1.8 0.4% total: 423.3 MiB The code is based on the "hack at it until it works" approach, not on the "= ok so I should first try to understand store monads" approach, so I am sure there= are issues with it. But on my simple example it seems to work. The path ("manifest.scm") is hard-coded though. Tomas -- There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors. --uK5589QYuS9lDnv6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEt4NJs4wUfTYpiGikL7/ufbZ/wakFAmYKzEsACgkQL7/ufbZ/ wamXMw/+NhCZd7CXEA4qtmmOiiT+S1yY2OaZHEvlkkd1UKDy6ROhjaf+Ccpd5bFK Wmc+tzdrLF5Y8pmA1BCxOux7Mub16DsBSjzPMJjabNB49W23IrComzgBAseGmQ59 +IiVsSgA9LMHxbx+KRV+Gf0/eutEy5AtU+JlldZgJcCnQq6rPgtGbGXODurCpVTA /VrbDMRylVuoAglLduIuzpsHByfIFml4ZjmbxyrCWY/Sx4OdnvR+IBAiq4CR5Opl 3Lkxm1JQRnKP32NmvCWIInOAnR8I5nv7fEzXTs5XiQ0vfeZgY8AZoyvF8Gc3AOVr i5ba6FGYF1Mf2pvrKoYVIs7+LSQmWe19gG3aIOr43JzGoqSqWm8lHgfzV0UIpnAj rAElBfVbN5D3GqCqDRuG2bzyet9i7i2+ue5TFRg3EpeWWeoba/flBxdyuyWKhJ6D 3Gas5ErE7Tgbn68hn/ha/BhUyjkp8wwnxEY6FtYrrRxB+GKD5h6Jh6YbUx5by5OT tU2LPqs9INaOw6wq7mlFlRJ0O/mvHnBA3SKriIYmMH3WjH4TZuGiUV4CJTS/di+M BW2MflsNdEs+CRCw1DBGHHaTfw9liw3Vm7zmNXCdyaE/XjkrcmsTvC1ftTBgmlrd qZaBlw7fjwPQMgO3N82P7c8C1SV2aSDh1UWvnptZFyt0Op9fUa0= =c8dd -----END PGP SIGNATURE----- --uK5589QYuS9lDnv6--