From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id aJNmDPOcAmXKIAEAG6o9tA:P1 (envelope-from ) for ; Thu, 14 Sep 2023 07:41:07 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id aJNmDPOcAmXKIAEAG6o9tA (envelope-from ) for ; Thu, 14 Sep 2023 07:41:07 +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 7910B4D8C3 for ; Thu, 14 Sep 2023 07:41:05 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mg.wilsonb.com header.s=krs header.b=JdHmdiiF; dkim=fail ("headers rsa verify failed") header.d=wilsonb.com header.s=201703 header.b=XTMKZrUh; 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=1694670067; 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: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=7WbK7TDocjeVIHehWozTfUj8OJzIE8FP7UObiEhHO7Y=; b=deHyf8NcpdL5GH9q12feE1cyaWLx12+y6BDva5EZY04PGQ7r7AFKD29hREAY4jIluu/oAP R4KQ9Ty2p8orZKJOcCIK/AsHNSj+pI4uVRhGJBX5+E2LpAv8hH/JGmsCXY7FC+fnjWp7Ks cmnAURfyCjPES/kHG7OrAp+BaC396umsUZKyRb80LyurNJG1P4wIJ5kvBKWUozsQ6r9xxO lg40eXaARJPl8TJAYT9dPGB8EF985izhAKDwsbEHx3afSmhnyclXbOeousWJ+Emm3PAelJ WtDiOjO3YbfqyZhzuhgmYcB8qwa4IkpY6R7QssLGMnDfBdwI5udg2ws217x75A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mg.wilsonb.com header.s=krs header.b=JdHmdiiF; dkim=fail ("headers rsa verify failed") header.d=wilsonb.com header.s=201703 header.b=XTMKZrUh; 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-Seal: i=1; s=key1; d=yhetil.org; t=1694670067; a=rsa-sha256; cv=none; b=tHTUPa80mALfxz+v0+c9vxy2TI3fs43RZzDGx99NK1g1tEleLaKOoBPp67aMHI57tH5M+f xCC1KS4wXXFBkyNvrGWSz44mUo5KsbuViRbkghCQY78mcIyffi+XaboC7YzHGKazk3NzUD WJN2TwTyxJoVh1CLb/q+5Lzzn7Tc6mpWpqOJbng97JHDkWkMlhMh+N8zM5rbbbsvjGKHn2 dh6YZZbV79KCCd8rcjdWAZdWjMGJIBtHrSYvPfqxLPE9O2C/+vrotgcMksiPYIHOZS6SSl CuRxKGe2HHx/G/85ycXRH+unCLR7meVBwnHVZm2uiZXuDlT+vVS2YoVwudn+HA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qgf62-0006sT-7n; Thu, 14 Sep 2023 01:40:58 -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 1qgf60-0006s4-HF for guix-patches@gnu.org; Thu, 14 Sep 2023 01:40:56 -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 1qgf60-0007tE-9L for guix-patches@gnu.org; Thu, 14 Sep 2023 01:40:56 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qgf65-0001iS-S3 for guix-patches@gnu.org; Thu, 14 Sep 2023 01:41:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65935] [PATCH] gnu: Add ngn-k. Resent-From: "B. Wilson" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 14 Sep 2023 05:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 65935 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 65935@debbugs.gnu.org Cc: "B. Wilson" X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16946700396558 (code B ref -1); Thu, 14 Sep 2023 05:41:01 +0000 Received: (at submit) by debbugs.gnu.org; 14 Sep 2023 05:40:39 +0000 Received: from localhost ([127.0.0.1]:36566 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qgf5j-0001hi-7W for submit@debbugs.gnu.org; Thu, 14 Sep 2023 01:40:39 -0400 Received: from lists.gnu.org ([2001:470:142::17]:33150) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qgf5d-0001hR-G1 for submit@debbugs.gnu.org; Thu, 14 Sep 2023 01:40:37 -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 1qgf5S-0006dg-DG for guix-patches@gnu.org; Thu, 14 Sep 2023 01:40:22 -0400 Received: from m42-5.mailgun.net ([69.72.42.5]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qgf5K-0007cm-NS for guix-patches@gnu.org; Thu, 14 Sep 2023 01:40:22 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.wilsonb.com; q=dns/txt; s=krs; t=1694670011; x=1694677211; h=Content-Transfer-Encoding: Content-Type: MIME-Version: Message-ID: Date: Subject: Subject: Cc: To: To: From: From: Sender: Sender; bh=7WbK7TDocjeVIHehWozTfUj8OJzIE8FP7UObiEhHO7Y=; b=JdHmdiiF0gNP6quVEIoRN/OOiCaR5jf4PmmzuhsvzCBDrYtja8JNrEswKO9c/yBlxFcqIw6c884ktBsVa3CKbSWAZ8dJuDogRQ4+65toEbGf3NLb4AsSh/hueBDkWdMgwUvHBL18YyMdaR5zYtuRp6UJB57ZPOuwj1qerWmnzju4NmObRjXe4hDdBkMUanNDIY6zioZjc0KafaOYlc0MeIn/uzkmpuFeoWnZPr9iuV14YQXTsNMzqVWYeSHoZe3L1GDZSDloqn8pd1r6VTUTFzUDzxSa8MvvKW/MLcXK5J034WE/p7ungQ/nW7uG1mvM9ZXl0sKlWXsO1Pb9at87Eg== X-Mailgun-Sending-Ip: 69.72.42.5 X-Mailgun-Sid: WyI5MmEzMyIsImd1aXgtcGF0Y2hlc0BnbnUub3JnIiwiMDg1NDdhIl0= Received: from wilsonb.com (wilsonb.com [104.199.203.42]) by 23c026529696 with SMTP id 65029cbb0f6a57f81a24a987 (version=TLS1.3, cipher=TLS_AES_128_GCM_SHA256); Thu, 14 Sep 2023 05:40:11 GMT Received: from localhost (199.147.145.153.ap.dti.ne.jp [153.145.147.199]) by wilsonb.com (Postfix) with ESMTPSA id 2B137A0586; Thu, 14 Sep 2023 05:40:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wilsonb.com; s=201703; t=1694670009; bh=7WbK7TDocjeVIHehWozTfUj8OJzIE8FP7UObiEhHO7Y=; h=From:To:Cc:Subject:Date:From; b=XTMKZrUhxEzjM8BfAPl2LGP9hrpgzrzEkl70DsLs6hCAST7cq3z9MGJvvz6hnQNPc ZJdXJdUBm8pAfE/axXrwzh3EnCG8YRv5KWKGz6szCLnSwF112tWjdFNe8Te7jXmjLX ErxBEYQAUKMmwF01WB0aZgHfLeN5Z8ECCqJEG7Pui0IitPXFgrLJalfUzkG+i4Rw5X a5vVyDcnavXasaOMKDXu0NXB3UGBZ+dDnWVtwmScBfOv+8VMEwc1WpPC6ckkVE7rQK 6EOrHwWFzTtjJNmkHpd/LLJmXI6YEg+BAS1ULkuewYqeBg5PMlQ0VqiUrn+QU1VOkZ 4TGptmvzbjUUrkWAeLzwdhR719WvnCz/YBBM8Ny/83Ay+0MobGPD50LtT3+cMaQhZd 2/yARJFfYQHJZg9xJd4ICA70CpCrz7nqPY8Ztjuz/RquXYZnmHtMBV69BYEckj+LGe pamB7H86Ui/PhMnu2wN2oXgrTrOqBwuKIMOrusRMpnvosgeLEgwolCLeYWmNmEorx3 0WGUED9HAB63h7JYHHCVODMZw4NojQtp6U/5RPvm87WbC5vCvrd9HbHeqUizWVBMbC qKh7mexJHwOdlPt+B1oLn91Z4uCsrV9E3kX5LJpuWpxUCdsCVvV83Dlt5NFnTET1BK 16k8/wQ7ClpaLdudA58dx0D0= Date: Thu, 14 Sep 2023 14:39:54 +0900 Message-ID: <20230914054006.18356-1-elaexuotee@wilsonb.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=69.72.42.5; envelope-from=bounce+686de0.08547a-guix-patches=gnu.org@mg.wilsonb.com; helo=m42-5.mailgun.net 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, RCVD_IN_BL_SPAMCOP_NET=1.347, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=0.01 autolearn=no autolearn_force=no X-Spam_action: no action 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: "B. Wilson" X-ACL-Warn: , "B. Wilson via Guix-patches" From: "B. Wilson 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: mx1.migadu.com X-Migadu-Spam-Score: -0.41 X-Spam-Score: -0.41 X-Migadu-Queue-Id: 7910B4D8C3 X-TUID: 3LUVjpoMGIw9 * gnu/packages/k-lang.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. --- gnu/local.mk | 1 + gnu/packages/k-lang.scm | 89 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+) create mode 100644 gnu/packages/k-lang.scm diff --git a/gnu/local.mk b/gnu/local.mk index 924d497057..a4c2c8cda9 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -362,6 +362,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/julia-jll.scm \ %D%/packages/julia-xyz.scm \ %D%/packages/jupyter.scm \ + %D%/packages/k-lang.scm \ %D%/packages/kawa.scm \ %D%/packages/kde.scm \ %D%/packages/kde-frameworks.scm \ diff --git a/gnu/packages/k-lang.scm b/gnu/packages/k-lang.scm new file mode 100644 index 0000000000..0c49168639 --- /dev/null +++ b/gnu/packages/k-lang.scm @@ -0,0 +1,89 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2023 B. Wilson +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages k-lang) + #:use-module (gnu packages readline) + #:use-module (guix build-system gnu) + #:use-module (guix git-download) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages) + #:use-module (guix utils)) + +(define-public ngn-k + (let ((commit "cb36213657b6c5b2fe3bb1c88c4de7fe975f84ed") + (revision "1")) + (package + (name "ngn-k") + (version (git-version "0.0.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://codeberg.org/ngn/k.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1140avqsqaa1pyh937rcd04snbkcgngmkg3dkmsbj6kw0jnrgf1z")))) + (build-system gnu-build-system) + (inputs (list rlwrap)) + (arguments + `(#:make-flags (list (string-append "CC=" ,(cc-for-target))) + #:test-target "t" + #:phases + (modify-phases %standard-phases + (replace 'configure + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (k (string-append out "/k"))) + (substitute* "repl.k" + (("^#!k") (string-append "#!" k "\n")))))) + (replace 'build + (lambda* (#:key make-flags #:allow-other-keys) + (let ((build-target "k")) + (apply invoke "make" `(,@make-flags ,build-target))))) + (replace 'install + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (k (string-append bin "/k")) + (rlwrap (string-append + (assoc-ref inputs "rlwrap") + "/bin/rlwrap"))) + + (define* (rlwrap-prog prog #:key rlwrap (sh (which "bash"))) + (let* ((real-prog (string-append (dirname prog) "/." + (basename prog) "-real")) + (prog-tmp (string-append real-prog "-tmp"))) + (link prog real-prog) + (call-with-output-file prog-tmp + (lambda (port) + (format port + "#!~a~%exec -a \"$0\" \"~a\" \"~a\" \"$@\"~%" + sh rlwrap (canonicalize-path real-prog)))) + (chmod prog-tmp #o755) + (rename-file prog-tmp prog))) + + (mkdir-p bin) + (copy-file "repl.k" (string-append bin "/krepl")) + (copy-file "k" k) + (rlwrap-prog k #:rlwrap rlwrap))))))) + (home-page "https://codeberg.org/ngn/k") + (synopsis "Implementation of the K6 vector programming language") + (description "ngn/k is a simple fast vector programming language, an +implementation of the K6 dialect of K.") + (license license:agpl3)))) -- 2.41.0