From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id KMWoHkPWw2TrnwAASxT56A (envelope-from ) for ; Fri, 28 Jul 2023 16:52:51 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id EPmmHUPWw2QtOwEAG6o9tA (envelope-from ) for ; Fri, 28 Jul 2023 16:52:51 +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 01BBF471B8 for ; Fri, 28 Jul 2023 16:52:51 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=disroot.org header.s=mail header.b=A4hSbiW8; 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=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1690555971; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: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=Enq/gBB39mevFoc7FppS77ZCb42aR5/RiEzmC4IxBAE=; b=Ojbu4C1oegVByd81yQ46P9CkoFbMV+KplQetgFF2hajIR5XwqSwn3fceOP4PId3y8MgNiq d/lTT90CmJypTC5SpSdnqZb79KGBGOWuA3KfUuxFfnmJhd04iR/gupQiFRsTlxn+wect23 EXJosyXFZCPy1Zr86OQNXRixEkxq85FQRrJ7JMTU77nOlgH/Pb8He0zIzbg7eaml2g68gH q4irO2MGwoHX63hCZHE+Tkrx90OVS1jQgyrQVBmmizws/kmiX7PgKwS5gwqn2D5qRJbbB2 zaauoA87VV2ngpNQ3o6xVcdWrbSk1PxtXgc/3PT6CTLaUsCTi3UKVxHVcTdSXw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1690555971; a=rsa-sha256; cv=none; b=okbaJkYP4KoX5LLMQJ/27LY7q2VsvPd43Jo/SDSqCvX5jvuzj/8vE58Oey0NghCw0wL7qh /no2d7NjBplkbC7WAwpDKvVl6OaucJwbTR7+GS2/eWaV5q8aecMAjlNp31RLEGmwsM6ccv vKgt5E8Xwa7DXYjJ0vj0x5zhWngoXytEBchmwOGov9YXSubj57S0DtWfYK2uUNi+RFCGsi PtSYPwBFwXnIRDCi5Gg3zQ7QZ7RSsF5J6ErkYrLVArknN/vYEgm+s56zcAkchwmdKqjJad lpQzpRPr38OwIjaO8AznsNpGncxHRLwTZHh+xbvR63W2MAQ+liUDsg/MDwaiOg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=disroot.org header.s=mail header.b=A4hSbiW8; 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=pass (policy=none) header.from=gnu.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qPOMx-0000uT-To; Fri, 28 Jul 2023 10:23:03 -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 1qPOMw-0000u9-FN for guix-patches@gnu.org; Fri, 28 Jul 2023 10:23:02 -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 1qPOMw-0003kB-5C for guix-patches@gnu.org; Fri, 28 Jul 2023 10:23:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qPOMw-0002ds-1M for guix-patches@gnu.org; Fri, 28 Jul 2023 10:23:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64891] [PATCH] gnu: Add hare Resent-From: "(" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 28 Jul 2023 14:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64891 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ekaitz Zarraga Cc: 64891@debbugs.gnu.org X-Debbugs-Original-Cc: 64891@debbugs.gnu.org, guix-patches@gnu.org Received: via spool by 64891-submit@debbugs.gnu.org id=B64891.169055414110085 (code B ref 64891); Fri, 28 Jul 2023 14:23:02 +0000 Received: (at 64891) by debbugs.gnu.org; 28 Jul 2023 14:22:21 +0000 Received: from localhost ([127.0.0.1]:45845 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qPOMH-0002cb-Bt for submit@debbugs.gnu.org; Fri, 28 Jul 2023 10:22:21 -0400 Received: from knopi.disroot.org ([178.21.23.139]:53770) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qPOMF-0002cO-VO for 64891@debbugs.gnu.org; Fri, 28 Jul 2023 10:22:20 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 1F4954100B; Fri, 28 Jul 2023 16:22:15 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LD7UFjYlQTfN; Fri, 28 Jul 2023 16:22:13 +0200 (CEST) References: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1690554133; bh=/3223tYMH0nXfNNU0VS9OJR9T8eZM5HKUSeFz2yAkKM=; h=References:From:To:Cc:Subject:Date:In-reply-to; b=A4hSbiW8ZW5I2i0axzOdKPbuHeyWKOgojEkkumvPbPLh2AQlWdE83GvZM3rWXWmyP cZ/iLdL4sjG48rgMjsIiBlwJSJVFXpq+ZDCTyVjbkpW2mBa1bhSU27GcAQZQifn7s8 8WkwRxpBhvy8MWm2L48bWzSzH25B24FscfQhWPN61t6vVKEPo+CeX4FhnMivmJacIC UAxuXxUnV6wF/p/7vhhUZP0/61Q7Eff9HyNG1IbDuihdjaidpAYqzxPKbmfhzgkmWh RPXY6CJr5bmKHYuIEYYHKxYxj+wVuetXsZTf/BtnUm28qILI+uzhFwcIvuRcd0nXRB Y9dERXakdcCkg== Date: Fri, 28 Jul 2023 14:14:46 +0100 In-reply-to: Message-ID: <87ila4t8tq.fsf@disroot.org> MIME-Version: 1.0 Content-Type: text/plain 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: "\(" X-ACL-Warn: , "\( via Guix-patches" From: "\( via Guix-patches" via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx2.migadu.com X-Migadu-Spam-Score: -6.64 X-Spam-Score: -6.64 X-Migadu-Queue-Id: 01BBF471B8 X-TUID: QpQnPdOJ7CYy Hi! Ekaitz Zarraga writes: > * gnu/packages/hare.scm (hare, harec): New variable. > * gnu/local.mk: Add hare.scm :) > + (sha256 > + (base32 "1xdf9pdwy5dvxhgvw6hqkpnjl8z76xc413vsnbbqfvwmfing53yn")))) ^ Odd spacing here. > + (build-system gnu-build-system) > + (arguments > + `(#:phases Please use gexps and LIST for any new packages. > + (modify-phases %standard-phases > + (add-before 'configure 'setenv > + (lambda _ > + (setenv "CC" ,(cc-for-target)))) Hmm. In my version of the package[1], I also have: (setenv "AR" #$(ar-for-target)) (setenv "LD" #$(ld-for-target)) Not sure why I added those, though. Maybe try cross-compiling both packages? Perhaps these lines are needed for that... > + (add-after 'configure 'configure-better > + (lambda* (#:key outputs #:allow-other-keys) > + (invoke "./configure" > + (string-append "--prefix=" (assoc-ref outputs "out"))))) > + (delete 'configure)))) You could just (replace 'configure ...) instead :) > +simple, stable, and robust. Hare uses a static type system, manual memory s/Hare/It/ in this line, maybe? > +(define-public hare Each package should have its own commit, remember. > + (let ((revision "1") > + (commit "112b75eb56d98c442094966fe59cbf3cd5feb909")) ^ Rouge space. > + (sha256 > + (base32 "0ilnz56757k4v0ggdc2v4xsjw0c944y8r289nfmqhw4hwzsrvb4j")))) ^ Another. > + (inputs (list scdoc)) scdoc should be a native-input. > + (propagated-inputs (list qbe harec)) Might be an idea to make QBE and harec regular inputs, using substitute* to replace any invocations of their binaries within the code with the full /gnu/store/.../bin/blah path. Propagated inputs should be avoided where possible, even if it makes the package definition a little more complex. > + (arguments > + `(#:make-flags `("HARECACHE=./cache" > + ,(string-append "PREFIX=" (assoc-ref %outputs "out"))) Again, please use gexps within LIST, and replace ``(assoc-ref %outputs "out")'' with ``#$output''. > + #:phases > + (modify-phases %standard-phases > + (add-before 'configure 'configure-make > + (lambda _ > + ;; NOTE: We are not really using this because overwriting it via > + ;; `make-flags` is way easier with our tooling. > + ;; Maybe we should? No, I think what you do here is fine. > + (copy-file "config.example.mk" "config.mk"))) You can use RENAME-FILE rather than COPY-FILE here. > + (delete 'configure)))) Again, please just use REPLACE; it's simpler. > + (synopsis "Hare build driver") Maybe "Build driver for the Hare language"? "Hare build driver" is almost a bit *too* short, IMO. > + (description "Hare is a systems programming language designed to be > +simple, stable, and robust. Hare uses a static type system, manual memory > +management, and a minimal runtime. It is well-suited to writing operating > +systems, system tools, compilers, networking software, and other low-level, > +high performance tasks.") Perhaps trim the language description down a bit and add a sentence or two about what *this specific tool* does. -- (