From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id aA6RDLZgS2JcCAAAgWs5BA (envelope-from ) for ; Mon, 04 Apr 2022 23:18:46 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id +OsMCrZgS2IJYgEA9RJhRA (envelope-from ) for ; Mon, 04 Apr 2022 23:18:46 +0200 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 BD0EA2F959 for ; Mon, 4 Apr 2022 23:18:45 +0200 (CEST) Received: from localhost ([::1]:60958 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nbU60-0007PL-No for larch@yhetil.org; Mon, 04 Apr 2022 17:18:44 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53840) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nbU5o-0007Lr-6r for help-guix@gnu.org; Mon, 04 Apr 2022 17:18:32 -0400 Received: from [2607:f8b0:4864:20::22c] (port=44975 helo=mail-oi1-x22c.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nbU5k-0001qO-8c for help-guix@gnu.org; Mon, 04 Apr 2022 17:18:31 -0400 Received: by mail-oi1-x22c.google.com with SMTP id t21so11387305oie.11 for ; Mon, 04 Apr 2022 14:18:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WhhIi0FuxB2t3YuXal3H65UZjUDKKhdw1/7I2IiZQpw=; b=i6j2aevlChsAr86wV5cKSKORr5PRHPwhhAM0VmTPlTGVs8lsCwX5iZwM+gylmRyI2E ns4kHnghS5n+X5WBB4I2QWgVRV2e9tsViIGAtiTyOAg/zpgq938JlKMrXOBSph2VrhiG w6WkMLw5da7ifmeqsoyJY5VwyofpNEF230jvsmsQ6fPz0JCxzjS86W9h7J2hoUwK4T91 rBbmHUqE28ZiMMA8ULyMMDxL1AfkTJ2vHqij4inKDa9d1P9FOowrXg5B7EKu4ZBMjjGq r83QvtxEAwSawDeb4yGvjRySNd5OPoqJTWMgaxKThlweVSOMxAqi3Koalz6EQ93VGZu9 zEeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WhhIi0FuxB2t3YuXal3H65UZjUDKKhdw1/7I2IiZQpw=; b=nMXnjnRtJTNTyC3IXoVvQnJl2lk98ejo2LKWZeb5baYVX2bOoQiyXXw9V4JSpJOhF7 M/nTC93PzS6huM/i1VzvJTFpCtRTgLkGb4Gz+Q+dbB+wzb7AQkcz+vdmMkfxQfXx8yay kBNzVxI9KwUFBqNGD6eTk62g4oAXrVSTzNkzjRuLu9Z87pcAFVLx3D8PjtSZWKDKw6mj GHOHxOgnyGNg/xApHNEjJlWLHhyo8+9ISFntRNYAfxtlOqegBKak5fnSF3j5nF5oqGl0 DH0XplayXc52iVww0+uU1/fu06lfktTNS2NjLfRqZxVNjsL0RrtQcUD0qExCNNPBqgFW vMbg== X-Gm-Message-State: AOAM533L44NXpLG1M3JvY2EiujVCpIvt+dCcr6TNQwRpSQItL5H7ZG3n 0onN5UVi/pKf3FpLM6dPPok9X1f0rvsuTUjz0Wp6ad5yUZo= X-Google-Smtp-Source: ABdhPJysNNRq8WDoj8r2QAA8zbY6MpeqJ6fesA8ttImA7EbD1NPz5V8b8wcxqAlpgtyejcAQPZ3Ut0IL5Jv34t//vPI= X-Received: by 2002:a54:4186:0:b0:2ec:cf1c:9a39 with SMTP id 6-20020a544186000000b002eccf1c9a39mr63392oiy.143.1649107106572; Mon, 04 Apr 2022 14:18:26 -0700 (PDT) MIME-Version: 1.0 References: <875ynw8zra.fsf@elephly.net> In-Reply-To: <875ynw8zra.fsf@elephly.net> From: =?UTF-8?Q?C=C3=A1ssio_Tavares?= Date: Mon, 4 Apr 2022 21:17:50 +0000 Message-ID: Subject: Re: Packaging existing software for Guix To: Ricardo Wurmus X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::22c (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::22c; envelope-from=cassio.ufg@gmail.com; helo=mail-oi1-x22c.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: , Cc: help-guix@gnu.org Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1649107125; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=zDbb0jQ3ZHJ8/S2gDfFjszgeFzM3ULzoQn24KDJMbS8=; b=pb5J1eeRuuCLg7hegHETt74tKN1hAYARr3sixkhzltwZAFB6tPPAUgeLelPLliLtlO4F92 qyyViJ89whOF/RUNLYWvtFGY/TUanSsuxzbnFeP/WSLO3M/hsJL44qs8/wP3mjNbl6jVbr STaXWJcTSSH3b+ZNcXM1wowt+JPgsbXrJbI7+jvRXP/b3TCvSzdltdR3AdLWrWkfllCJ/w 0SZnRKNfOGzjqd50ZYl5xlW4ZyhzCz8p6w626FdqKqfy0DWa1OJkNs0jrWSGDnsjyl3SoB pVpNpEOUZKfqQExdpGcfpZ3rQl6LkPDU4D9QJYjY+Zrla9ZVgrfHHGuHnieAaA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1649107125; a=rsa-sha256; cv=none; b=RwOl46zyMOnzi+gsz5g5DXGmI3UEGOVMphNs9e8oRCoCLYlzDIjiQzljf4+jGuW7UzUGLw nOf6FPUjbO2/ArHhlvplYduVHcktEIeQ+RquaPmwHlY3u09TeacE7ZTavSUJMZjx3TrcF6 IJCVvdlX/9wP3ejwoSkJFRSybOrEGAtu4BDNpm6ApaNhjRz+Wakxmwe83W1cUa8fgkHIVI sEdMvf5IXqVzAVwCBffaeET8oLxRZD24u6twXRR9CjsPyHfnbvTtK/XICP/gEXypwU97oa lv6Due/AeaJlfsD9bw184QcS6u9BBDf3AGWMUjcH6tf88zmoedGV6cl5wHXaEw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20210112 header.b=i6j2aevl; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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" X-Migadu-Spam-Score: 5.32 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20210112 header.b=i6j2aevl; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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" X-Migadu-Queue-Id: BD0EA2F959 X-Spam-Score: 5.32 X-Migadu-Scanner: scn0.migadu.com X-TUID: 0QmmwxZzLXPB Hi, and thanks for your patient guidance, Ricardo! So . . . My progress I'm trying to follow your (and @Vagrant Cascadia= n 's) suggestions, looking into the ` guix.git/gnu/packages/*` files for examples of package definitions, reading the development versions of the manual and the cookbook, and also experimenting on my own. With that I could find out, for the package I'm trying to port, what build-system to use, how to specify the origin and the commit, and how to get the hash for that commit. So, some progress, but there are still things to debug. Your challenge > 5. Is there a relatively simple way to port packages from other distro= s > > into Guix? Could this be an automated process? > > Not from other distros but from upstream repositories; see =E2=80=9Cguix = import=E2=80=9D. I'm looking into `guix import`, and made a few experiments with it. And ..= . > If you want a fun project you could work on extending =E2=80=9Cguix > import=E2=80=9D to import from distro archives. Interesting challenge =E2=94=80 I'd like to be able to accept it. *But* (a = *big* *but*) I think I'm hundreds of miles away from being capable of doing that =E2=94=80 just look at the picture you're painting: Nixpkgs is often not a good template, because more often than not they > are cutting corners when it comes to bootstrapping or building from sourc= e. > Tricky, isn't it? But just for brainstorming, does any other distro package its applications in a way that is more descriptive of the build process, so that it could be more easily translated into Scheme for Guix? And, redirecting a bit the problem =E2=94=80 would it be useful to have an = importer for NodeJS packages? (I know that most Node packages are defined per-project in a package.json file, but there are those that can be used as a stand-alone App) And that would be simpler or more complex than an importer for a distro (assuming a carefully chosen, favorable distro)? Just to be clear, this is just for the sake of exploring possibilities =E2= =94=80 I'm not committing to undertaking this project. Anyway, I was touched by your availability: You are welcome to send me issue numbers with your patches and > I=E2=80=99ll review them more quickly. > Your offer makes me feel very much encouraged to proceed with my attempts to package things for Guix, and, in doing so, contribute in a more concrete way to the Free Software movement. But... Failed attempts (help needed) I want to install and use TiddlyMap , which extends TiddlyWiki5 , which is then its dependency. So to isolate things, I started by writing a package definition for the latter, which didn't work. At first debugging was easy, because guix informs that some `use-module` expression is missing. But then I got stuck. So, maybe you would be willing to take a look at how far I've got up to now, and give me some guidance? Here it is: (define-module (gnu packages tiddlywiki) #:use-module (guix packages) #:use-module (guix git-download) #:use-module (guix build-system node) #:use-module (guix licenses) #:use-module (gnu packages node)) (define-public tiddlywiki (package (name "tiddlywiki") (version "5.2.2") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/Jermolene/TiddlyWiki5") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0ji5c3bqhjaign101fjy13bfhq1i804cxaibs61xmnfync6g1pf7")))) (build-system node-build-system) (home-page "https://tiddlywiki.com") (synopsis "A non-linear web-browser based personal notebook app") (description "TiddlyWiki is a complete interactive wiki in JavaScript. It can be used as a single HTML file in the browser or as a powerful Node.js application. It is highly customisable: the entire user interface is itself implemented in hackable WikiText.") (license bsd-3))) # This last line is so that this file returns a package definition tiddlywiki Then I tried to install it with: `guix shell --pure -f /path/to/tiddlywiki.scm`, but it failed. This is the relevant information (I think) inside the log-file: starting phase `set-SOURCE-DATE-EPOCH' phase `set-SOURCE-DATE-EPOCH' succeeded after 0.0 seconds starting phase `set-paths' environment variable `PATH' set to `/gnu/store/akwqc82xg9l0g873hh7ia81pdwkf2sm6-node-14.18.3/bin:/gnu/store/g2= ajyl8xk9aarxrgjbng2hkj3qm2v0z2-tar-1.34/bin:/gnu/store/iixwcv3k49ks1rf34pjg= fzmzyhhgwng3-gzip-1.10/bin:/gnu/store/s3hl12jxz9ybs7nsy7kq7ybzz7qnzmsg-bzip= 2-1.0.8/bin:/gnu/store/c8isj4jq6knv0icfgr43di6q3nvdzkx7-xz-5.2.5/bin:/gnu/s= tore/4ic6244i3ca4b4rxc2wnrgllsidyishv-file-5.39/bin:/gnu/store/ahmmvw21p11i= k80lg1f953y7fd8bqkjm-diffutils-3.8/bin:/gnu/store/z39hnrwds1dgcbpfgj8dnv2cn= gjb2xbl-patch-2.7.6/bin:/gnu/store/39rsx3nl4c31952jybbjb8d6idr5hx7r-finduti= ls-4.8.0/bin:/gnu/store/690qz3fg334dpwn3pn6k59n4wc943p2b-gawk-5.1.0/bin:/gn= u/store/wxgv6i8g0p24q5gcyzd0yr07s8kn9680-sed-4.8/bin:/gnu/store/xjwp2hsd925= 6icjjybfrmznppjicywf6-grep-3.6/bin:/gnu/store/d251rfgc9nm2clzffzhgiipdvfvzk= vwi-coreutils-8.32/bin:/gnu/store/55cbpsi18mahg131nmiya6km5b4mscfa-make-4.3= /bin:/gnu/store/4y5m9lb8k3qkb1y9m02sw9w9a6hacd16-bash-minimal-5.1.8/bin:/gn= u/store/s2pg5k98fl2g2szg9dykxyd9zl3xihv9-ld-wrapper-0/bin:/gnu/store/rc781v= 4k0drhaqn90xfwwpspki5x0bvf-binutils-2.37/bin:/gnu/store/069aq2v993kpc41yabp= 5b6vm4wb9jkhg-gcc-10.3.0/bin:/gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-gl= ibc-2.33/bin:/gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/sbin' environment variable `NODE_PATH' set to `/gnu/store/akwqc82xg9l0g873hh7ia81pdwkf2sm6-node-14.18.3/lib/node_modules' environment variable `BASH_LOADABLES_PATH' unset environment variable `C_INCLUDE_PATH' set to `/gnu/store/akwqc82xg9l0g873hh7ia81pdwkf2sm6-node-14.18.3/include:/gnu/stor= e/ri34iqiy08wn7k6czq43g5wl24ghsk97-libuv-1.42.0/include:/gnu/store/s3hl12jx= z9ybs7nsy7kq7ybzz7qnzmsg-bzip2-1.0.8/include:/gnu/store/c8isj4jq6knv0icfgr4= 3di6q3nvdzkx7-xz-5.2.5/include:/gnu/store/4ic6244i3ca4b4rxc2wnrgllsidyishv-= file-5.39/include:/gnu/store/690qz3fg334dpwn3pn6k59n4wc943p2b-gawk-5.1.0/in= clude:/gnu/store/55cbpsi18mahg131nmiya6km5b4mscfa-make-4.3/include:/gnu/sto= re/rc781v4k0drhaqn90xfwwpspki5x0bvf-binutils-2.37/include:/gnu/store/069aq2= v993kpc41yabp5b6vm4wb9jkhg-gcc-10.3.0/include:/gnu/store/5h2w4qi9hk1qzzgi1w= 83220ydslinr4s-glibc-2.33/include:/gnu/store/6mjww4iz4xdan74d5bbjfh7il8rngf= kk-linux-libre-headers-5.10.35/include' environment variable `CPLUS_INCLUDE_PATH' set to `/gnu/store/akwqc82xg9l0g873hh7ia81pdwkf2sm6-node-14.18.3/include:/gnu/stor= e/ri34iqiy08wn7k6czq43g5wl24ghsk97-libuv-1.42.0/include:/gnu/store/s3hl12jx= z9ybs7nsy7kq7ybzz7qnzmsg-bzip2-1.0.8/include:/gnu/store/c8isj4jq6knv0icfgr4= 3di6q3nvdzkx7-xz-5.2.5/include:/gnu/store/4ic6244i3ca4b4rxc2wnrgllsidyishv-= file-5.39/include:/gnu/store/690qz3fg334dpwn3pn6k59n4wc943p2b-gawk-5.1.0/in= clude:/gnu/store/55cbpsi18mahg131nmiya6km5b4mscfa-make-4.3/include:/gnu/sto= re/rc781v4k0drhaqn90xfwwpspki5x0bvf-binutils-2.37/include:/gnu/store/069aq2= v993kpc41yabp5b6vm4wb9jkhg-gcc-10.3.0/include/c++:/gnu/store/069aq2v993kpc4= 1yabp5b6vm4wb9jkhg-gcc-10.3.0/include:/gnu/store/5h2w4qi9hk1qzzgi1w83220yds= linr4s-glibc-2.33/include:/gnu/store/6mjww4iz4xdan74d5bbjfh7il8rngfkk-linux= -libre-headers-5.10.35/include' environment variable `LIBRARY_PATH' set to `/gnu/store/akwqc82xg9l0g873hh7ia81pdwkf2sm6-node-14.18.3/lib:/gnu/store/ri= 34iqiy08wn7k6czq43g5wl24ghsk97-libuv-1.42.0/lib:/gnu/store/s3hl12jxz9ybs7ns= y7kq7ybzz7qnzmsg-bzip2-1.0.8/lib:/gnu/store/c8isj4jq6knv0icfgr43di6q3nvdzkx= 7-xz-5.2.5/lib:/gnu/store/4ic6244i3ca4b4rxc2wnrgllsidyishv-file-5.39/lib:/g= nu/store/690qz3fg334dpwn3pn6k59n4wc943p2b-gawk-5.1.0/lib:/gnu/store/rc781v4= k0drhaqn90xfwwpspki5x0bvf-binutils-2.37/lib:/gnu/store/5h2w4qi9hk1qzzgi1w83= 220ydslinr4s-glibc-2.33/lib:/gnu/store/4jdghmc65q7i7ib89zmvq66l0ghf7jc4-gli= bc-2.33-static/lib:/gnu/store/fnr1z6xsan0437r0yg48d0y8k32kqxby-glibc-utf8-l= ocales-2.33/lib' environment variable `GUIX_LOCPATH' set to `/gnu/store/fnr1z6xsan0437r0yg48d0y8k32kqxby-glibc-utf8-locales-2.33/lib/lo= cale' phase `set-paths' succeeded after 0.0 seconds starting phase `install-locale' using 'en_US.utf8' locale for category "LC_ALL" phase `install-locale' succeeded after 0.0 seconds starting phase `unpack' *... (very long list of unpacked files, with the indication of where to)* phase `unpack' succeeded after 0.6 seconds starting phase `set-home' set HOME to "/tmp/guix-build-tiddlywiki-5.2.2.drv-0/npm-home-0" phase `set-home' succeeded after 0.0 seconds starting phase `bootstrap' no 'configure.ac' or anything like that, doing nothing phase `bootstrap' succeeded after 0.0 seconds starting phase `patch-usr-bin-file' phase `patch-usr-bin-file' succeeded after 0.0 seconds starting phase `patch-source-shebangs' *... (list of shebangs patches)* phase `patch-source-shebangs' succeeded after 0.5 seconds starting phase `patch-dependencies' phase `patch-dependencies' succeeded after 0.0 seconds starting phase `delete-lockfiles' phase `delete-lockfiles' succeeded after 0.0 seconds starting phase `configure' npm ERR! code ENOTCACHED npm ERR! request to https://registry.npmjs.org/eslint failed: cache mode is 'only-if-cached' but no cached response available. npm ERR! A complete log of this run can be found in: npm ERR! /tmp/guix-build-tiddlywiki-5.2.2.drv-0/npm-home-0/.npm/_logs/2022-04-02T17_= 48_43_558Z-debug.log error: in phase 'configure': uncaught exception: %exception #<&invoke-error program: "/gnu/store/akwqc82xg9l0g873hh7ia81pdwkf2sm6-node-14.18.3/bin/npm" arguments: ("--offline" "--ignore-scripts" "install") exit-status: 1 term-signal: #f stop-signal: #f> phase `configure' failed after 0.6 seconds command "/gnu/store/akwqc82xg9l0g873hh7ia81pdwkf2sm6-node-14.18.3/bin/npm" "--offline" "--ignore-scripts" "install" failed with status 1 I have no idea what this means. Can you deduce anything useful from that? What do I need to know to fix this? Thanks again, C=C3=A1ssio