From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id yFBsAq5udGamtAAAe85BDQ:P1 (envelope-from ) for ; Thu, 20 Jun 2024 18:02:22 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id yFBsAq5udGamtAAAe85BDQ (envelope-from ) for ; Thu, 20 Jun 2024 20:02:22 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=EXIbxaFw; 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"; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1718906541; 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: content-transfer-encoding:content-transfer-encoding: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:dkim-signature; bh=ZTpVwpvEIZU3TyeOdvar7wFViDrq9uAG4/V1bm37QQU=; b=JIe8ovdZlb0hRFwP6b+6JB0VEaBw76QdgTvBuQ5ujSnhaMDDYSSY5Eg/vniAizZ3EZ/VsN hacujKVD7H3iRlANq/fIrHnyK1/tkJcwKf2gNMTRQpf9Xl6FwSze0KacYaRMVdD7VdR2Y+ 5u9cyMmLdETZW18dG3RYXJa7K6FYDnRYcBOlZdA2NcHRxhDu0nGBQu4OcQVyKCDVzIX2SG RXmdFWwbNKKPO2fB6L3gqpfhYhzKu3s1j21Xy8wtdO7QpmJGdUzUvY4TADmJ7HMeWyU0pf 6oJ3OZxDuj9oBnFTiE7BGvB8lpmknRzwoVz3doFDz4SUBCTz+D4u5s/Jp7pWmA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=EXIbxaFw; 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"; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1718906541; a=rsa-sha256; cv=none; b=l9Hs9KxkAuMH84Mv4uJ73hb9klDPfgybuA2rozxwTeVz2nC7La6TYgmaDzzNuv9cR5dbLX Xmmo2P+Hoh1bMulWgHz+dr5E1v8FXHOYwT1Jvhkdkmbd/ywSPeUFOBhQGcOVgT1Eizpy3z vNourB+dre3E4C/ZHZ3VR16Dxnv8bauOF3aAsGsWcERbx9seZD9rBj0FqHXmT/t4WeaRVE BTSttBkmtzeU5oovsE77J5Mc8VlzdbphhODcqoF8ognJwqymwXwSBdWRJLOfpNIS6lfAw/ 2iBbWA4Ls6NQ6Xd74XqB+bo+4Uohkc1lFKhGW67vnzJc2VHn0A3k2Arcb3hqnw== 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 65A3F66BDA for ; Thu, 20 Jun 2024 20:02:21 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sKM6k-0005hS-Kv; Thu, 20 Jun 2024 14:02:02 -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 ) id 1sKM6g-0005gh-3G for guix-patches@gnu.org; Thu, 20 Jun 2024 14:01:58 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sKM6f-0006Nd-QK for guix-patches@gnu.org; Thu, 20 Jun 2024 14:01:57 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sKM6j-0004Rl-OX for guix-patches@gnu.org; Thu, 20 Jun 2024 14:02:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#71659] [PATCH] gnu: Add fastfetch. Resent-From: Dariqq Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 20 Jun 2024 18:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71659 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Richard Sent Cc: 71659@debbugs.gnu.org Received: via spool by 71659-submit@debbugs.gnu.org id=B71659.171890646416982 (code B ref 71659); Thu, 20 Jun 2024 18:02:01 +0000 Received: (at 71659) by debbugs.gnu.org; 20 Jun 2024 18:01:04 +0000 Received: from localhost ([127.0.0.1]:38697 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sKM5n-0004Pp-Of for submit@debbugs.gnu.org; Thu, 20 Jun 2024 14:01:04 -0400 Received: from mout02.posteo.de ([185.67.36.66]:51793) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sKM5k-0004P7-Uo for 71659@debbugs.gnu.org; Thu, 20 Jun 2024 14:01:02 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id C7036240103 for <71659@debbugs.gnu.org>; Thu, 20 Jun 2024 20:00:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1718906450; bh=XCm50Ga7SAvTgnZ/psbgW2/YPd/EoMEA4YbhY9JI0Bs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:From:Content-Type: Content-Transfer-Encoding:From; b=EXIbxaFwlqTgQYOexL/tvUXHic4oQ1iFlJ2ao7ze38mh2UBkodmeOEQPMMHj4EBzG +vNfJsoCZtAzCXiHoVNCxl0vvN+eQ5CE/9JLFplH7mFvxYwF2QBai6mogUFNt6vPxN /Dn+EbFnuIhNdKP0J9LS3O0iiWRdWsbLJkbp3TE8UWwfwxsHkJpaLinIlkYAhfJiJJ oipzPw01h+gv9NdQ5xaaf+XDRibnsiOUFnoxoIgmNSF+yZTnPUYUXUaY9v1iYGtY+j EOl42ihjpn/F+Nl7nWaQe0s5rZJ513RfUWQBxLC2WQ5bxBBustHQzTZOTkCmUQZD4d jtT07K8JZnAgg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4W4pFD6Lbrz9rxF; Thu, 20 Jun 2024 20:00:48 +0200 (CEST) Message-ID: Date: Thu, 20 Jun 2024 18:00:45 +0000 MIME-Version: 1.0 References: <22c0522a-858c-48cc-91f6-c744d95af042@posteo.net> <87r0crr4ex.fsf@freakingpenguin.com> Content-Language: en-US From: Dariqq In-Reply-To: <87r0crr4ex.fsf@freakingpenguin.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: 65A3F66BDA X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -5.46 X-Spam-Score: -5.46 X-TUID: OnHlTljsYAjb Hi Richard, On 20.06.24 17:59, Richard Sent wrote: > Hi Dariqq, > > Dariqq writes: > >> - For LM detection with logind "/var/run/systemd/sessions/" is used, >> however on (my) guix system that directory does not exist but is at >> "/run/systemd/sessions/" instead. Currently i have an extra >> substitute* to fix this in src/detection/lm/lm_linux.c but this >> might worth reporting to upstream. I havent got around to do this >> yet. > > As implemented would this hurt fastfetch's login manager detection on > foreign distros? If so I think reporting to upstream would be ideal. > On my fedora and debian systems /run is symlinked to /var/run. Not sure on other systems. Sounds like this should be moved upstream. >> Thoughts? > > Sounds like yours is a lot more complete. I think it is best to merge > your version. What else is left to do? > I would not really like hijacking the patch like this from you. But i'll happily share what I have so far: my yyjson package: I am not sure where to put this? just c.scm? or somewhere else? In the debian package they also build html docs. Tried that but they were not automatically installed with the standard phases and i am not sure if they are worth it. (maybe in a seperate output?) #+begin_src scheme (define-public yyjson (package (name "yyjson") (version "0.9.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/ibireme/yyjson") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 "169rqh7mh01g5j4qkqjgfmgnyqjf9r8qxiywf4jkgcb7ln4j64w9")))) (arguments (list #:configure-flags #~(list "-DBUILD_SHARED_LIBS=ON" "-DYYJSON_BUILD_TESTS=ON"))) (build-system cmake-build-system) (home-page "https://github.com/ibireme/yyjson") (synopsis "A high performance JSON library written in ANSI C.") (description "A high performance JSON library written in ANSI C. Some features iclude @itemize @item Fast: can read or write gigabytes per second JSON data on modern CPUs. @item Portable: complies with ANSI C (C89) for cross-platform compatibility. @item Strict: complies with RFC 8259 JSON standard, ensuring strict number format and UTF-8 validation. @item Extendable: offers options to allow comments, trailing commas, NaN/Inf, and custom memory allocator. @item Accuracy: can accurately read and write int64, uint64, and double numbers. @item Flexible: supports unlimited JSON nesting levels, \u0000 characters, and non null-terminated strings. @item Manipulation: supports querying and modifying using JSON Pointer, JSON Patch and JSON Merge Patch. @item Developer-Friendly: easy integration with only one .h and one .c file. @end itemize") (license license:expat))) #+end_src my fastfetch package: For fastfetch i am following the nixos package to enable everything but mesa and directx. Also these are a lot of them and with the wrapper guix install fastfetch would need to also download all of the other libraries. It would be great to create more modular packages for something like this as enabling everything like this will e.g now always pull in xfconf (only needed when using xfce), the x11/wayland libraries even if one is on a headless server, etc. I guess that is a beneift for dlopen but does not really work well on guix system. Feel free to steal some things. #+begin_src scheme (define-public fastfetch (package (name "fastfetch") (version "2.16.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/fastfetch-cli/fastfetch") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 "112dvfx7gvp6n20i1lkd0jbh897jf7bxjxq96bj4099j3x313y3m")) (modules '((guix build utils))) (snippet '(begin (delete-file-recursively "src/3rdparty"))))) (arguments (list #:configure-flags #~(list "-DBUILD_TESTS=ON" "-DINSTALL_LICENSE=OFF" "-DENABLE_SYSTEM_YYJSON=YES" "-DENABLE_PROPRIETARY_GPU_DRIVER_API=OFF" "-DENABLE_DIRECTX_HEADERS=false" "-DENABLE_OSMESA=false" (string-append "-DCUSTOM_PCI_IDS_PATH=" #$(this-package-input "hwdata") "/share/hwdatay/pci.ids") (string-append "-DCUSTOM_AMDGPU_IDS_PATH=" #$(this-package-input "libdrm") "/share/libdrm/amdgpu.ids")) #:phases #~(modify-phases %standard-phases (add-after 'unpack 'fix-logind-session-path (lambda* _ (substitute* "src/detection/lm/lm_linux.c" (("/var/run/systemd/sessions/") "/run/systemd/sessions/")))) (add-after 'install 'wrap-programs (lambda* _ (let ((ld-libs '#$(map (lambda (label) (file-append (this-package-input label) "/lib")) '("chafa" "dbus" "dconf" "ddcutil" "glib" "imagemagick" "libdrm" "libglvnd" "libx11" "libxcb" "libxrandr" "network-manager" "ocl-icd" "opencl-headers" "pulseaudio" "rpm" "sqlite" "vulkan-loader" "wayland" "xfconf" "zlib")))) (for-each (lambda (prog) (wrap-program (string-append #$output "/bin/" prog) `("LD_LIBRARY_PATH" prefix ,ld-libs))) '("fastfetch" "flashfetch")))))))) (native-inputs (list pkg-config python)) (inputs (list bash-minimal ;; for wrap-program chafa dbus dconf ddcutil glib hwdata imagemagick libdrm libglvnd libx11 libxcb libxrandr network-manager ocl-icd opencl-headers pulseaudio rpm sqlite vulkan-loader wayland xfconf yyjson zlib)) (build-system cmake-build-system) (home-page "https://github.com/fastfetch-cli/fastfetch") (synopsis "Fast neofetch-like system information tool") (description "Fast neofetch-like system information tool.") (license license:expat))) #+end_src > Is there anything I can help with? I have built with "-DBINARY_LINK_TYPE=dynamic" to dynamically link the dependencies instead. There was an error due to fastfetch wanting a newer version of ddcutil. Havent looked into how complicated that is to update yet. On a related note dynamically linking would avoid the (kind of awkward) wrapper. Are there benefits/downsides to using that instead? I hope the formating turned out ok for the code blocks