From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id 8B8gEWLhIGfwfQAAqHPOHw:P1 (envelope-from ) for ; Tue, 29 Oct 2024 13:21:38 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id 8B8gEWLhIGfwfQAAqHPOHw (envelope-from ) for ; Tue, 29 Oct 2024 14:21:38 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=b8WdMEMZ; dkim=fail ("headers rsa verify failed") header.d=kolabnow.com header.s=dkim20240523 header.b=dVTI47bf; dmarc=none; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1730208098; a=rsa-sha256; cv=none; b=LCMfqHBywpbXDaUXC5usKb/IcCZiEwk30gEcnH+1+G8uXUyGDu6bUtKO7C1MUFcGPK5Q7J e9pA5kuIG+VULUGr32S6WO78GG5RuvqdZyjfmG1ke5II68gGuE8CoPhNi91+aMQFKBDIux zuzWJ4/ORgobZTsHyePFueRt1N40to2ghEO66BEKJX7gCceWxdFfSIBaC06Y4LPpWbtZQP eT6NvOChh+81xcy6f96STQvTn/xfKPT3onhpgU58/RjFRArufwz0t7Ba0roIOXRAvQr+Di tD5i0JHe3wlcbm/AAxSnDkqseYK8DSmEfz3xOEbTUker99cTryRGxVGxxmfZ2w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=b8WdMEMZ; dkim=fail ("headers rsa verify failed") header.d=kolabnow.com header.s=dkim20240523 header.b=dVTI47bf; dmarc=none; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1730208098; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: 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=wtDFzp6ud8xEd6DSSzZU/VhKpdW7RBU6iM5+kD9NoD8=; b=sqUdeMZF+pMhcm5SELlHEHlesqjM+rvSAD4cxH++MUUO3Vz1y5xL8bIoqVwidiPoCo1Fkx awQNHkP+2g56bOeqX5c14bmW7IkUCvIhAWmMLlUjrUmiI42ZtETigviAixOc5oNvFWnSJL kMQpzn4rl3L+su81vJ6TU6+JjsfYGug8rDx2ew3am53ML94jpBxplRnKxgkw1K8Siiq78d gaKjLti1FGnEQZGpf1R9SFjLuYD1m3jf1FzIav2UfukElN9TWgsG7MYUaH5sj6KTBwEb2n qvwgKlr+1lkHMQPlemL3h0eqUOWNwpry3ykBk9hjWVAvWbwUPSxXMAKDYBxcfg== 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 AEE028013E for ; Tue, 29 Oct 2024 14:21:37 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t5m9W-00007C-0O; Tue, 29 Oct 2024 09:20:54 -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 1t5dKt-00050p-5D for guix-patches@gnu.org; Mon, 28 Oct 2024 23:56:03 -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 1t5dKs-0002sq-Q6 for guix-patches@gnu.org; Mon, 28 Oct 2024 23:56:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=wtDFzp6ud8xEd6DSSzZU/VhKpdW7RBU6iM5+kD9NoD8=; b=b8WdMEMZoBJ20CJmrW0Mvlu9iUnh/jMIH1EwcWRt5YQerAFEurfOfG2fzf0+lPBPcBm3p7pSyzhvm5ttIcaKK1IAE+IYGuxvScQ3IgznzHIkM26aKo/mV7SKdB5/Qbkc6tC+orrF58ZWt3YNnM6gKnt3qt3o70IHm+mLgeMi7BFeVTp6ZBeUq7ScBgVYbBJ5e07lqSFc53t+WLewEqJA/6dMLIo172ka8U3mYM0QmZ7rChqY27XYr6a5hUh32J8E9AQdcq65eJNNDYUef9dgh2gZd3/N3hueHgh4buRKimivaUhbUMuXOLFcZvYpDeY7l4PthpN6JbmckVLA8OlA5g==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t5dKs-0006d8-Ao for guix-patches@gnu.org; Mon, 28 Oct 2024 23:56:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#74078] [PATCH] gnu: Add dart Resent-From: =?UTF-8?Q?J=C3=B8rgen?= Kvalsvik Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 29 Oct 2024 03:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 74078 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74078@debbugs.gnu.org Cc: =?UTF-8?Q?J=C3=B8rgen?= Kvalsvik X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.173017410325030 (code B ref -1); Tue, 29 Oct 2024 03:56:02 +0000 Received: (at submit) by debbugs.gnu.org; 29 Oct 2024 03:55:03 +0000 Received: from localhost ([127.0.0.1]:55464 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5dJs-0006VE-LD for submit@debbugs.gnu.org; Mon, 28 Oct 2024 23:55:02 -0400 Received: from lists.gnu.org ([209.51.188.17]:47060) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5WcJ-0003tS-Q3 for submit@debbugs.gnu.org; Mon, 28 Oct 2024 16:45:36 -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 1t5WcE-0007rw-5B for guix-patches@gnu.org; Mon, 28 Oct 2024 16:45:31 -0400 Received: from mx.kolabnow.com ([212.103.80.155]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5WcA-0001ZM-Sz for guix-patches@gnu.org; Mon, 28 Oct 2024 16:45:29 -0400 Received: from localhost (unknown [127.0.0.1]) by mx.kolabnow.com (Postfix) with ESMTP id 176A735752E1 for ; Mon, 28 Oct 2024 21:45:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= content-transfer-encoding:mime-version:message-id:date:date :subject:subject:from:from:received:received:received; s= dkim20240523; t=1730148311; x=1731962712; bh=wtDFzp6ud8xEd6DSSzZ U/VhKpdW7RBU6iM5+kD9NoD8=; b=dVTI47bfHnKeLDNGbhbbg1H3bLxJf57DyGb 9pRTuSnWq4kQg3dFJUIegWrz2p0Gniwrv9WZBuqqj2VQFPekVUC/ya+OkE6OCU/S R5gf82SUSJxK2eCV0fSEvTKmnblRdpX10Je9//W+v9PxFj8adVG6Bb9r7xmadnBp wzhHMrWsG+DfwVqk0R1sicmAIvfgG5mMRK+pomOGShPZKr22A/jmJUccrdpIJjuR qRLBeoGDjU1+R4CGxCiGNHBbPf3T+mFTLOZCbptFXmbpIaXs955zkM7E2UzQSN7/ nfny7z0OnJZHNT9E6qt8EMuqOBe/RwrrKN7o+skkB++zCa95/8Q== X-Virus-Scanned: amavis at mykolab.com Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out011.mykolab.com [127.0.0.1]) (amavis, port 10024) with ESMTP id BytgTdR26YUc for ; Mon, 28 Oct 2024 21:45:11 +0100 (CET) Received: from int-mx009.mykolab.com (unknown [10.9.13.9]) by mx.kolabnow.com (Postfix) with ESMTPS id 0546535752DF for ; Mon, 28 Oct 2024 21:45:10 +0100 (CET) Received: from ext-subm010.mykolab.com (unknown [10.9.6.10]) by int-mx009.mykolab.com (Postfix) with ESMTPS id B6EFF20CA5E7 for ; Mon, 28 Oct 2024 21:45:10 +0100 (CET) From: =?UTF-8?Q?J=C3=B8rgen?= Kvalsvik Date: Mon, 28 Oct 2024 21:45:04 +0100 Message-Id: <20241028204504.4172-1-j@lambda.is> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=212.103.80.155; envelope-from=j@lambda.is; helo=mx.kolabnow.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 28 Oct 2024 23:54:58 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Tue, 29 Oct 2024 09:20:50 -0400 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-Spam-Score: -4.12 X-Spam-Score: -4.12 X-Migadu-Queue-Id: AEE028013E X-Migadu-Scanner: mx10.migadu.com X-TUID: Ityoru/Eioed * gnu/packages/dart.scm: New file. * gnu/local.mk: Register it. Change-Id: Idbdcf4e30790b3225bf86a36a0a4c4b081b557aa --- gnu/local.mk | 1 + gnu/packages/dart.scm | 101 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 102 insertions(+) create mode 100644 gnu/packages/dart.scm --- Hello, This is a port of the nixpkgs Dart compiler package [1]. I am interested in it specifically because it is a transitive dependency of Hugo [2], and I figured I other people might be interested in these packages, too. The from-source build of Dart is quite the pain (nixpkgs seems to have given up, but I do not know the story there). I looked around and while I did not find a strict rule saying "source only", it does stand out by relying on prebuilt artifacts. For my current needs it is good enough, and I hope that in the future it could get a proper source build. I saw there was an effort a few years ago, but it appears to have stopped completely. [1] https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/compilers/dart/default.nix [2] https://gohugo.io/ diff --git a/gnu/local.mk b/gnu/local.mk index 6bd7c75090..925a561d45 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -224,6 +224,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/cvassistant.scm \ %D%/packages/cybersecurity.scm \ %D%/packages/cyrus-sasl.scm \ + %D%/packages/dart.scm \ %D%/packages/darwin.scm \ %D%/packages/data-language.scm \ %D%/packages/databases.scm \ diff --git a/gnu/packages/dart.scm b/gnu/packages/dart.scm new file mode 100644 index 0000000000..faf840d547 --- /dev/null +++ b/gnu/packages/dart.scm @@ -0,0 +1,101 @@ +;;; GNU Guix --- Functional package management for GNU +;;; 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 dart) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix download) + #:use-module (guix packages) + #:use-module (guix gexp) + #:use-module (guix config) + #:use-module (guix build-system copy) + #:use-module ((gnu packages bootstrap) #:select (glibc-dynamic-linker)) + #:use-module (gnu packages base) + #:use-module (gnu packages compression) + #:use-module (gnu packages elf) + #:use-module (ice-9 match) + #:use-module (srfi srfi-1)) + +(define-public dart-3.5 + (package + (name "dart") + (version "3.5.4") + (source (origin + (method url-fetch) + (uri (string-append + "https://storage.googleapis.com/dart-archive/channels/stable/release/" + version "/sdk/dartsdk-" + (match (%current-system) + ("x86_64-linux" "linux-x64") + ("i686-linux" "linux-ia32") + ("aarch64-linux" "linux-arm64") + (_ "unsupported")) + "-release.zip")) + (sha256 + (base32 (match (%current-system) + ("x86_64-linux" "0rv9rp8g5blhncqwciymhxh3z2832yp54lphxgsvkmm9y8s5w34d") + ("i686-linux" "02kv119swcp7y4n3yb2i5a4dagjpf0zq3b3an1apahj5zn6ak41g") + ("aarch64-linux" "1v437zpksk0jhib6vhpcbvv715mv32zmwby8b3p9qd3k67fn87d9") + (_ "0000000000000000000000000000000000000000000000000000")))))) + (build-system copy-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (replace 'install + (lambda* (#:key outputs inputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (patchelf (string-append (assoc-ref inputs "patchelf") + "/bin/patchelf")) + (ld-so (string-append (assoc-ref inputs "libc") + #$(glibc-dynamic-linker)))) + (mkdir-p out) + (copy-recursively "." out) + (for-each + (lambda (file) (invoke patchelf "--set-interpreter" ld-so file)) + (find-files bin (lambda (file stat) (and (executable-file? file) + (elf-file? file)))))))) + (add-after 'install 'check + (lambda* (#:key tests? inputs outputs #:allow-other-keys) + (when tests? + (let* ((out (assoc-ref outputs "out")) + (coreutils (assoc-ref inputs "coreutils")) + (PATH (string-join + (list + (string-append out "/bin") + (string-append coreutils "/bin")) + ":")) + (hello #$(plain-file + "hello.dart" + "void main() => print('hello, world!');"))) + (setenv "PATH" PATH) + (invoke "dart" "create" "--no-pub" "dart_test_project") + (unless (directory-exists? "dart_test_project") + (error "'dart create' did not create expected directory")) + (unless (file-exists? "dart_test_project/bin/dart_test_project.dart") + (error "'dart create' did not create expected .dart file")) + (invoke "dart" "compile" "exe" hello "-o" "hello.exe") + (invoke "./hello.exe"))))) + (delete 'strip)))) + (inputs (list coreutils)) + (native-inputs (list unzip coreutils patchelf)) + (home-page "https://dart.dev/") + (synopsis "Approachable, portable, and productive language") + (description "Dart is a class-based, single inheritance, object-oriented +language with C-style syntax. It offers compilation to JavaScript, interfaces, +mixins, abstract classes, reified generics, and optional typing.") + (supported-systems '("x86_64-linux" "i686-linux" "aarch64-linux")) + (license license:bsd-3))) base-commit: 6d334173a30579f04cac37458f8c696b51e2ecba prerequisite-patch-id: 2f364131a4d24d80490d69a595e8d70c90de488f prerequisite-patch-id: 2897995fb414cfcaff1dacf6f285bb07635a1c3a prerequisite-patch-id: fae24f50d8f46c977a7b997a97252ebe7ad2c7c7 prerequisite-patch-id: b34be5beb88f1d7d14849a5bfb46d5caf7327fbc prerequisite-patch-id: 601da7b7499b3752f8e9248a837688994d21ed0e prerequisite-patch-id: f0cb2621cb9438cc0b3d2a2ca36c3428bad89087 -- 2.39.5