From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id gG5tK23NxWI+1wAAbAwnHQ (envelope-from ) for ; Wed, 06 Jul 2022 19:59:09 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id yJslK23NxWJgtwAAauVa8A (envelope-from ) for ; Wed, 06 Jul 2022 19:59:09 +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 3C2138DAD for ; Wed, 6 Jul 2022 19:59:08 +0200 (CEST) Received: from localhost ([::1]:49966 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o99Io-0003wK-O0 for larch@yhetil.org; Wed, 06 Jul 2022 13:59:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35350) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o99HN-0002s9-A8 for help-guix@gnu.org; Wed, 06 Jul 2022 13:57:37 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:52613) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o99HK-0000DM-LF for help-guix@gnu.org; Wed, 06 Jul 2022 13:57:37 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 40D1D5C006D for ; Wed, 6 Jul 2022 13:57:32 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Wed, 06 Jul 2022 13:57:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trevdev.ca; h=cc :content-type:date:date:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to; s=fm1; t= 1657130252; x=1657216652; bh=ZjNJHOPfK1vTgVQ3rjuYwButLgoO5Iq26Em 1zgYB6dE=; b=iKhwBP1+rhjqsMe33MXeIZPz8oduRtT9Oxt3XeP5vDgqc3GEQUx QF708PH3daSedaDJhSIyIvBKtRTK0j/C3Hoy+V3LPGsI6N8jSvWz90d1HoLBf5/j saM7MYMoKs0nv+dIgt+dLyTbhJT7ExKEUYi/s96wrgKWt9PrNdcuXVeo7kifkv8X 8vM21DYq85XbUxVkcD8W+yGN5y99TqpT9SyiITn0yEMQ6uwtdoUnrKdz2GfYIYJb VtjVuV/4uaMj2mhG9uOX3rnDyQpnAVkoQ33d2VOK0bVmLPlOFpJHLurXDrPA5/aQ GsQvOVCi+9Br4rr/LTvLNezf6w7xZMYFVIw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:message-id:mime-version :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1657130252; x= 1657216652; bh=ZjNJHOPfK1vTgVQ3rjuYwButLgoO5Iq26Em1zgYB6dE=; b=p tRPjo0+4kgbganBO/QQT3u7hGaHOq+d1mKVmds7CDD+Yy/TeHiUvQNGJ8B6tb8wZ WdoMj0kRtCj0/Bm89SdxV1GVz8cOox180rh/9lCU9buveIfIesVEgU5xY5NHoP6A 5Qxedu4Yf1ax9YrE9cVaoysTJ1pP2SkSLavRPTezJ47lEXGX/lkLzYOXvIfugmMP QCaaGUKwAm1v0wia3tK1daeEXl9DkDCZR3Kq82ktc9B7kv89DF3WnRjzJzdmDkly lva1syT6y3pDf5U7Kch03NUivDA2/J04Ql0qC4PagSYQLcGeRJxfD6+gVvCgYtKq qzLXS18ly8D3UkIJxTUXQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudeifedguddukecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufgffkfggtgesghdtreertdertdenucfhrhhomhepvfhrvghvuceo thhrvghvsehtrhgvvhguvghvrdgtrgeqnecuggftrfgrthhtvghrnhepudeifeefffevve duvdeiudelveejueeuveeuheejheffuddvfeduudeiveeutdfgnecuffhomhgrihhnpehn ihhmqdhlrghnghdrohhrghdpghhithhhuhgsrdgtohhmpdhinhhsthgrlhhlrdhshhenuc evlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehtrhgvvhes thhrvghvuggvvhdrtggr X-ME-Proxy: Feedback-ID: i762946f9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Wed, 6 Jul 2022 13:57:31 -0400 (EDT) From: Trev To: GUIX Help Subject: Troubles building "nimble" with nim User-Agent: Notmuch/0.36 (https://notmuchmail.org) Emacs/29.0.50 (x86_64-pc-linux-gnu) Date: Wed, 06 Jul 2022 10:57:08 -0700 Message-ID: <87tu7uceff.fsf@codinator.mail-host-address-is-not-set> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="===-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Received-SPF: pass client-ip=66.111.4.28; envelope-from=trev@trevdev.ca; helo=out4-smtp.messagingengine.com 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , 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=1657130349; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=+6A/I5UgZgM2AN9IctRCy89wuWDybERZkdh2VOHgyl8=; b=AxEVimFRjhd+Anzif4bZHaIA4SZt1qYt2wBrkSnEnOdzflu2WScT4PfqSGD/6uLr4FtLGl /+WCWMbKwQwk7BWVyk/okXzov3WjA5g90zHATEgpkFj8t5jYxElKrLSIyDwLgcpGOTZjff 2eeEeGJinX/kdJp/q7Vc8rkUPREo3l7B3uTJyg3xgMC6cUluX0CILE21Q+XUhQgzd4U0iv N31urKMyCU1pmzJuiOOPT3icvRpQ1J8snCwo6tP6cF14Hq4Tld1hQXJSH6XVubvsTkrdSY 9vwmhsenvIpfJnhFQN7D9482cgjUfAO5FcTOiGuLRKWzCvI/fCNWB+bEZrpWvw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1657130349; a=rsa-sha256; cv=none; b=t9kFEtHqLS+LwxwmWbzT7r3cudv6vbl3lLw1CBt068yeb2tR/cgLVGsfHSsVAFUg7hNzF7 sOCBf/FMPK0/i7NK6TeQNzh+pgadhlN2bgeLDgbuVBZVcEQbGmH25vj8b75oyHXNMtCnXj 8wjHvIlMUuvaSc9ZDHYgUXt7yqfsiOOg1sG8iOj2pqpg3kisk57S8/3nZUhhcRqQnhmjTG ze42ihABXn2fIdHHwuHSOf+Iu37pbMRMLh95rBK5tk8zgCx5ieRs6PbGn0qnQh2LRpiD6N hPgayL8OcC1RvnTAEC5GoiZQxYnFNdy0wX8AV2WPw/7HbEO9cRX4W8yfMyfU+g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=trevdev.ca header.s=fm1 header.b=iKhwBP1+; dkim=fail ("body hash did not verify") header.d=messagingengine.com header.s=fm3 header.b="p tRPjo0"; dmarc=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: -0.75 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=trevdev.ca header.s=fm1 header.b=iKhwBP1+; dkim=fail ("body hash did not verify") header.d=messagingengine.com header.s=fm3 header.b="p tRPjo0"; dmarc=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: 3C2138DAD X-Spam-Score: -0.75 X-Migadu-Scanner: scn0.migadu.com X-TUID: DAWVO0ZYi7Sp --===-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hello Guix! I am in the weeds while trying to properly build "nimble", the package manager that is included with the nim programming language. The current guix package (gnu/packages/nim) completely misses this build step. I wonder if previous contributors also struggled with this. For some context I am attempting to directly replicate these steps from https://nim-lang.org/install_unix.html: #+BEGIN_QUOTE sh build.sh bin/nim c koch ./koch boot -d:release ./koch tools #+END_QUOTE My (and the current package record) can build the nim binary using gcc, no = problem. However when we get to the part where nim builds its own features = with the compiled compiler, something seems to be trying to call =3D/bin/sh= =3D directly, despite hard-coded references to that process having been bee= n substituted out. I have submitted a ticket with Nim here just so that I may ask some thought= ful questions. That conversation is here: https://github.com/nim-lang/Nim/i= ssues/19976 The error output is: #+BEGIN_SRC sh c_code/2_2/stdlib_browsers.nim.o c_code/2_2/@mnim.nim.o -ldl -lm -lrt : SUCCESS Hint: used config file '/tmp/guix-build-nim-1.6.6.drv-0/nim-1.6.6/config/ni= m.cfg' [Conf] Hint: used config file '/tmp/guix-build-nim-1.6.6.drv-0/nim-1.6.6/config/co= nfig.nims' [Conf] ...........................................................................= ........................................... CC: stdlib_digitsutils.nim Error: invocation of external compiler program failed. No such file or dire= ctory Additional info: Could not find command: '/bin/sh'. OS error: No such file = or directory 2 error: in phase 'build': uncaught exception: %exception #<&invoke-error program: "./bin/nim" arguments: ("c" "koch") exi= t-status: 1 term-signal: #f stop-signal: #f>=20 phase `build' failed after 96.6 seconds command "./bin/nim" "c" "koch" failed with status 1 #+END_SRC My current attempt at packaging this looks like this: #+BEGIN_SRC scheme (define-module (gnu packages nim) #:use-module (guix build-system gnu) #:use-module (guix gexp) #:use-module (guix download) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (gnu packages pcre) #:use-module (gnu packages tls) #:use-module (gnu packages cmake)) (define-public nim (package (name "nim") (version "1.6.6") (source (origin (method url-fetch) (uri (string-append "https://nim-lang.org/download/" name "-" version ".tar.xz")) (sha256 (base32 "0lm4450ig8k4l3rzxv6kcqji5l1lzicsw76ckwxm0q9qdz713cb7")))) (build-system gnu-build-system) (native-inputs (list pcre openssl cmake)) (arguments `(#:tests? #f ; No tests. #:phases (modify-phases %standard-phases (delete 'configure) ; no configure script (add-after 'unpack 'patch-installer (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) (substitute* "install.sh" (("/usr/") (string-append out "/usr/")) (("/etc/") (string-append out "/etc/")) (("/opt/") (string-append out "/opt/"))) #t))) (add-after 'patch-source-shebangs 'patch-more-shebangs (lambda _ (let ((sh (which "sh"))) (substitute* '("tests/stdlib/tosprocterminate.nim" "tests/stdlib/tstrscans.nim" "lib/pure/osproc.nim") (("/bin/sh") sh)) (substitute* (find-files "c_code" "stdlib_osproc.c") (("\"/bin/sh\", 7") (format #f "~s, ~s" sh (string-length = sh))))) #t)) (replace 'build (lambda _ (setenv "XDG_CACHE_HOME" "./cache-home") (mkdir-p "./cache-home") (invoke "sh" "build.sh") (invoke "./bin/nim" "c" "koch") (invoke "koch" "boot" "-d:release") (invoke "koch" "tools") #t)) (replace 'install (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) (mkdir-p (string-append out "/usr/bin")) (invoke "./install.sh" (string-append out "/usr/bin")) #t)))))) (home-page "https://nim-lang.org") (synopsis "Statically-typed, imperative programming language") (description "Nim (formerly known as Nimrod) is a statically-typed, imperative programming language that tries to give the programmer ultimate = power without compromises on runtime efficiency. This means it focuses on compil= e-time mechanisms in all their various forms.") (license license:expat))) #+END_SRC I have tried: 1. Symlinking (without any success) /bin/sh to (which "bash") 2. Exporting $SHELL to (which "bash") 3. Attempted (without much luck) to ~alias cc=3Dgcc~ to see if it's not the= shell that's missing, it's the command "cc", and adding cmake as a separat= e input 4. Grokking the Nim source code that I don't perfectly understand to see ho= w it could somehow decide to call something that isn't on path aside from a= string that's "/bin/sh". =20=20=20 If someone appreciates packaging this better than can share some wisdom, it= would be appreciated. --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable =2D-=20 Trev : 0FB7 D06B 4A2A F07E AD5B 1169 183B 6306 8AA1 D206 --=-=-=-- --===-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIYEARYIAC4WIQTXT7EGCbVt/Iwh9m+FRs+EoT3V7wUCYsXNBRAcdHJldkB0cmV2 ZGV2LmNhAAoJEIVGz4ShPdXv8x8A/joFM5O8O8OuIo1FAckUkyx3jnAT+vDXtuih GMDcO0kdAQCNG+bVNrcQh1eYaotdld22YLaGXhZzF8zzTNQWACCWBg== =/Z5j -----END PGP SIGNATURE----- --===-=-=--