[WIP] Add dart-2.8.4

  • Open
  • quality assurance status badge
Details
2 participants
  • Nicolò Balzarotti
  • Julien Lepiller
Owner
unassigned
Submitted by
Nicolò Balzarotti
Severity
normal

Debbugs page

Nicolò Balzarotti wrote 4 years ago
(address . guix-patches@gnu.org)
87lfelqrni.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me
Hi Guix!
As announced on guix-devel, I bootstrapped the dart compiler from
source.

Following patches add dart 2.8.4 (latest release is 2.10, but I wanted
to be sure that this work in progress is fine before continuing, as I
fear that 4 other steps are required).

NOTE: I tagged this as WIP as I've not yet disabled analytics yet (I
disabled it from the first added version, but I was wondering if I need
to disable it in _each_ version or if just the latest one is fine.
Patching all of them will require some time).

(Each build takes ~20min on my server and ~60min on my laptop, and
there's a dozen of them)

Let me know if there are major problems or if I can go on with disabling
analytics!

Thanks, Nicolò
From 1bfa60adabdf7f43b4918ada556fc6981bca07ba Mon Sep 17 00:00:00 2001
From: nixo <nicolo@nixo.xyz>
Date: Tue, 24 Nov 2020 14:38:19 +0100
Subject: [PATCH 01/20] gnu: Add gn-for-dart-bootstrap.

* gnu/packages/build-tools.scm (gn-for-dart-bootstrap): New variable.
---
gnu/packages/build-tools.scm | 38 ++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)

Toggle diff (51 lines)
diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm
index 3f140efdb3..c58e47dc98 100644
--- a/gnu/packages/build-tools.scm
+++ b/gnu/packages/build-tools.scm
@@ -177,6 +177,44 @@ files and generates build instructions for the Ninja build system.")
;; X11 license.
(license (list license:bsd-3 license:x11)))))
+(define-public gn-for-dart-bootstrap
+ (let ((commit "041ed5e79abc24956f296ca8bc94d04e26cf3d6b")
+ (revision "1353")
+ (hash "1zd41zwggamkqy33cra75cfdx82v3spdfym6hj1lbbanabi4mpl7"))
+ (package
+ (inherit gn)
+ (name "gn-for-dart-bootstrap")
+ (version (git-version "0.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gn.googlesource.com/gn")
+ (commit commit)))
+ (sha256 (base32 hash))
+ (file-name (git-file-name name version))))
+ (arguments
+ `(#:tests? #f ;FIXME: How to run?
+ #:phases (modify-phases %standard-phases
+ (add-before 'configure 'set-build-environment
+ (lambda _
+ (setenv "CC" "gcc")
+ (setenv "CXX" "g++")
+ (setenv "AR" "ar")
+ #t))
+ (replace 'configure
+ (lambda _
+ (invoke "python" "build/gen.py")))
+ (replace 'build
+ (lambda _
+ (invoke "ninja" "-C" "out" "gn")))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (install-file "out/gn"
+ (string-append out "/bin"))
+ #t)))))))))
+
(define-public meson
(package
(name "meson")
--
2.29.2
From 7c238e089eaeec82cada98f0b7f21698cdbba8b3 Mon Sep 17 00:00:00 2001
From: nixo <nicolo@nixo.xyz>
Date: Tue, 24 Nov 2020 14:53:19 +0100
Subject: [PATCH 02/20] gnu: packages: dart.scm: New file.

gnu/local.mk: Add it.
gnu/packages/dart.scm (dart-pkg): New function.
---
gnu/local.mk | 1 +
gnu/packages/dart.scm | 41 +++++++++++++++++++++++++++++++++++++++++
2 files changed, 42 insertions(+)
create mode 100644 gnu/packages/dart.scm

Toggle diff (61 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 14b626c600..359015415c 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -156,6 +156,7 @@ GNU_SYSTEM_MODULES = \
%D%/packages/cvassistant.scm \
%D%/packages/cybersecurity.scm \
%D%/packages/cyrus-sasl.scm \
+ %D%/packages/dart.scm \
%D%/packages/databases.scm \
%D%/packages/datamash.scm \
%D%/packages/datastructures.scm \
diff --git a/gnu/packages/dart.scm b/gnu/packages/dart.scm
new file mode 100644
index 0000000000..8175998c49
--- /dev/null
+++ b/gnu/packages/dart.scm
@@ -0,0 +1,41 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2020 Nicolò Balzarotti <nicolo@nixo.xy>
+;;;
+;;; 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 <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages dart)
+ #:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix build utils)
+ #:use-module (guix git-download)
+ #:use-module (guix packages)
+ #:use-module (guix utils))
+
+(define (dart-pkg name tag hash)
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url (string-append
+ "https://github.com/dart-lang/"
+ (string-replace-substring name "-" "_")
+ ".git"))
+ (commit tag)))
+ (file-name
+ (git-file-name name
+ (if (> (string-length tag) 9)
+ (string-take tag 9)
+ tag)))
+ (sha256 (base32 hash))))
+
--
2.29.2
From 32f70481ffce47d67a689c9ab9caf5891de994de Mon Sep 17 00:00:00 2001
From: nixo <nicolo@nixo.xyz>
Date: Tue, 24 Nov 2020 15:01:31 +0100
Subject: [PATCH 03/20] gnu: dart: Add dart-zlib.

* gnu/packages/dart.scm (dart-zlib): New variable.
---
gnu/packages/dart.scm | 10 ++++++++++
1 file changed, 10 insertions(+)

Toggle diff (20 lines)
diff --git a/gnu/packages/dart.scm b/gnu/packages/dart.scm
index 8175998c49..033a5f6bab 100644
--- a/gnu/packages/dart.scm
+++ b/gnu/packages/dart.scm
@@ -39,3 +39,13 @@
tag)))
(sha256 (base32 hash))))
+(define dart-zlib
+ (let ((version "c3d0a6190f2f8c924a05ab6cc97b8f975bddd33f")
+ (hash "0fr3h9krramy0jclbacjnwbn0lzvjm6b809llhaz56mbd90i4yl4"))
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://chromium.googlesource.com/chromium/src/third_party/zlib.git")
+ (commit version)))
+ (sha256 (base32 hash)))))
+
--
2.29.2
From 4fb1ceee8e18bea6ff7c32fc50e81d56f582b6f9 Mon Sep 17 00:00:00 2001
From: nixo <nicolo@nixo.xyz>
Date: Tue, 24 Nov 2020 15:03:35 +0100
Subject: [PATCH 04/20] gnu: packages: Add dart-boringssl.

* gnu/packages/dart.scm (dart-boringssl): New variable.
---
gnu/packages/dart.scm | 10 ++++++++++
1 file changed, 10 insertions(+)

Toggle diff (20 lines)
diff --git a/gnu/packages/dart.scm b/gnu/packages/dart.scm
index 033a5f6bab..cfafda44f5 100644
--- a/gnu/packages/dart.scm
+++ b/gnu/packages/dart.scm
@@ -49,3 +49,13 @@
(commit version)))
(sha256 (base32 hash)))))
+(define dart-boringssl
+ (let ((version "d519bf6be0b447fb80fbc539d4bff4479b5482a2")
+ (hash "137q647ha8x770wv3jj2kgjv3lj9qjcv191m51vkp3a7zqhhaknv"))
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://boringssl.googlesource.com/boringssl")
+ (commit version)))
+ (sha256 (base32 hash)))))
+
--
2.29.2
From 5de7a8e93e176b3c44c08e707170c06680fb6ed2 Mon Sep 17 00:00:00 2001
From: nixo <nicolo@nixo.xyz>
Date: Tue, 24 Nov 2020 15:04:42 +0100
Subject: [PATCH 05/20] gnu: packages: Add boringssl-gen.

* gnu/packages/dart.scm (boringssl-gen): New variable.
---
gnu/packages/dart.scm | 10 ++++++++++
1 file changed, 10 insertions(+)

Toggle diff (20 lines)
diff --git a/gnu/packages/dart.scm b/gnu/packages/dart.scm
index cfafda44f5..d5124ce700 100644
--- a/gnu/packages/dart.scm
+++ b/gnu/packages/dart.scm
@@ -59,3 +59,13 @@
(commit version)))
(sha256 (base32 hash)))))
+(define boringssl-gen
+ (let ((version "d2b56d1b7657e52eb5a1f075968c773aa3e53614")
+ (hash "1pn2hn0i9fwd27i695q4av3bymm11pmydlbv4hcafslhggq0md19"))
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/dart-lang/boringssl_gen")
+ (commit version)))
+ (sha256 (base32 hash)))))
+
--
2.29.2
From a47d45923567ab4a4b5bc8bba792b9516cbfdf90 Mon Sep 17 00:00:00 2001
From: nixo <nicolo@nixo.xyz>
Date: Tue, 24 Nov 2020 15:06:15 +0100
Subject: [PATCH 06/20] gnu: dart: Add dart-gperftools.

* gnu/packages/dart.scm (dart-gperftools): New variable.
---
gnu/packages/dart.scm | 11 +++++++++++
1 file changed, 11 insertions(+)

Toggle diff (21 lines)
diff --git a/gnu/packages/dart.scm b/gnu/packages/dart.scm
index d5124ce700..03adf23d63 100644
--- a/gnu/packages/dart.scm
+++ b/gnu/packages/dart.scm
@@ -69,3 +69,14 @@
(commit version)))
(sha256 (base32 hash)))))
+;; TODO: should I take the src from the real gperftools and override the version?
+(define dart-gperftools
+ (let ((version "02eeed29df112728564a5dde6417fa4622b57a06")
+ (hash "1j5yx7v1g8ljzv5hs2452q736gdf1xm5x9w5d1csm5bjlryxaykm"))
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/gperftools/gperftools.git")
+ (commit version)))
+ (sha256 (base32 hash)))))
+
--
2.29.2
From 55f0a0f5834edb075e3af79713bf5b73532f505e Mon Sep 17 00:00:00 2001
From: nixo <nicolo@nixo.xyz>
Date: Tue, 24 Nov 2020 15:08:26 +0100
Subject: [PATCH 07/20] gnu: dart: Add root-certificates.

* gnu/packages/dart.scm (root-certificates): New function.
---
gnu/packages/dart.scm | 8 ++++++++
1 file changed, 8 insertions(+)

Toggle diff (18 lines)
diff --git a/gnu/packages/dart.scm b/gnu/packages/dart.scm
index 03adf23d63..53c108f1f0 100644
--- a/gnu/packages/dart.scm
+++ b/gnu/packages/dart.scm
@@ -80,3 +80,11 @@
(commit version)))
(sha256 (base32 hash)))))
+(define (root-certificates version hash)
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/dart-lang/root_certificates.git")
+ (commit version)))
+ (sha256 (base32 hash))))
+
--
2.29.2
From 974bd4d52d503fe310472816019a767d33ef007a Mon Sep 17 00:00:00 2001
From: nixo <nicolo@nixo.xyz>
Date: Thu, 26 Nov 2020 21:26:24 +0100
Subject: [PATCH 09/20] gnu: Add dart-2.0.0-dev.20.0.

* gnu/packages/dart.scm (dart-2.0.0-dev.20.0): New variable.
---
gnu/packages/dart.scm | 60 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 60 insertions(+)

Toggle diff (70 lines)
diff --git a/gnu/packages/dart.scm b/gnu/packages/dart.scm
index 4918f56d2c..65c55625a0 100644
--- a/gnu/packages/dart.scm
+++ b/gnu/packages/dart.scm
@@ -465,3 +465,63 @@
@item Supported both on desktop and on mobile
@end")
(license license:bsd-3)))
+
+(define-public dart-2.0.0-dev.20.0
+ (package
+ (inherit dart-2.0.0-dev.8.0)
+ (name "dart")
+ (version "2.0.0-dev.20.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/dart-lang/sdk.git")
+ (commit version)))
+ (file-name (string-append name "-" version))
+ (sha256
+ (base32
+ "1k2zc27r3b7ha5bvlhaqr75xiyf6rg7nwk3r0qrjl7dk9k50iyix"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments dart-2.0.0-dev.8.0)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-before 'configure 'set-dart-path
+ (lambda* (#:key inputs propagated-inputs #:allow-other-keys)
+ (substitute* "runtime/observatory/BUILD.gn"
+ (("\"--sdk=True\" \\]")
+ (string-append
+ "\"--sdk=True\", "
+ "\"--dart-executable\","
+ "\"" (assoc-ref inputs "dart") "/bin/dart\","
+ "\"--pub-executable\","
+ "\"" (assoc-ref inputs "dart") "/bin/pub\" ]")))
+ (substitute* "tools/utils.py"
+ (("os.path.join\\(CheckedInSdkPath\\(\\), 'bin', name)")
+ (string-append "os.path.join(\""
+ (assoc-ref %build-inputs "dart") "/bin/\", name)")))
+ (substitute* "build/prebuilt_dart_sdk.gni"
+ (("\\$_dart_root/tools/sdks/\\$host_os/dart-sdk/bin/")
+ (string-append (assoc-ref %build-inputs "dart") "/bin/")))))
+ (add-before 'configure 'disable-Werror
+ (lambda _
+ (substitute* "runtime/BUILD.gn"
+ (("\"-Werror\"") "# -Werror")
+ (("\"-Wall\"") "# -Wall")
+ (("\"-Wextra\"") "# -Wextra"))
+ (substitute* "build/config/compiler/BUILD.gn"
+ (("\"-Wl,--icf=all\"") "")
+ (("\"-Wall") "# \"-Wall")
+ (("\"-Wextra") "# \"-Wextra")
+ (("\"-Werror") "# \"-Werror"))))
+ (add-before 'configure 'fix-get-timestamp
+ (lambda _
+ (substitute* "tools/make_version.py"
+ (("utils.GetGitTimestamp") "\"0\" # "))))
+ (add-before 'configure 'fix-zlib-build
+ (lambda _
+ (substitute* "third_party/zlib/BUILD.gn"
+ (("direct_dependent_configs") "# direct_dependent_configs")
+ (("\"//base\",") ""))))))))
+ (native-inputs
+ (cons `("dart" ,dart-2.0.0-dev.8.0)
+ (package-native-inputs dart-2.0.0-dev.8.0)))))
--
2.29.2
From eb1f12966919585a282c2f161ba6bc2e6994bafb Mon Sep 17 00:00:00 2001
From: nixo <nicolo@nixo.xyz>
Date: Fri, 27 Nov 2020 00:41:49 +0100
Subject: [PATCH 10/20] gnu: dart.scm: Add helper function.

* gnu/packages/dart.scm (replace-inputs): New function.
---
gnu/packages/dart.scm | 12 ++++++++++++
1 file changed, 12 insertions(+)

Toggle diff (29 lines)
diff --git a/gnu/packages/dart.scm b/gnu/packages/dart.scm
index 65c55625a0..89462d7355 100644
--- a/gnu/packages/dart.scm
+++ b/gnu/packages/dart.scm
@@ -22,6 +22,9 @@
#:use-module (guix git-download)
#:use-module (guix packages)
#:use-module (guix utils)
+ #:use-module (ice-9 match)
+ #:use-module (srfi srfi-1)
+ #:use-module ((guix build utils) #:select (alist-replace))
#:use-module (gnu packages)
#:use-module (gnu packages build-tools)
#:use-module (gnu packages gcc)
@@ -525,3 +528,12 @@
(native-inputs
(cons `("dart" ,dart-2.0.0-dev.8.0)
(package-native-inputs dart-2.0.0-dev.8.0)))))
+
+(define (replace-inputs pkg inputs)
+ "Replace multiple inputs at once. `PKG' is the source package and
+`INPUTS' the list of replacements."
+ (fold (lambda (pkg inputs)
+ (match-let (((name pkg) pkg))
+ (alist-replace name (list pkg) inputs)))
+ (package-inputs pkg)
+ inputs))
--
2.29.2
From 290463f772f43f3d1e38e83a52bb78b35ff24ea9 Mon Sep 17 00:00:00 2001
From: nixo <nicolo@nixo.xyz>
Date: Fri, 27 Nov 2020 18:41:25 +0100
Subject: [PATCH 15/20] gnu: Add dart-2.1.0-dev.6.0.

* gnu/packages/dart.scm (dart-2.1.0-dev.6.0): New variable.
---
gnu/packages/dart.scm | 17 +++++++++++++++++
1 file changed, 17 insertions(+)

Toggle diff (27 lines)
diff --git a/gnu/packages/dart.scm b/gnu/packages/dart.scm
index a1446b74a2..4b6c7a1b48 100644
--- a/gnu/packages/dart.scm
+++ b/gnu/packages/dart.scm
@@ -1035,3 +1035,20 @@
(native-inputs
(alist-replace "dart" `(,dart-2.0.0-dev.65.0)
(package-native-inputs dart-2.0.0-dev.65.0)))))
+
+(define-public dart-2.1.0-dev.6.0
+ (package
+ (inherit dart-2.1.0-dev.5.0)
+ (version "2.1.0-dev.6.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/dart-lang/sdk.git")
+ (commit version)))
+ (sha256
+ (base32
+ "04x0zgz4ns0njkga81lds61r53il1rllj5k2gq83vl8dr8ksq6r5"))))
+ (native-inputs
+ (alist-replace "dart" `(,dart-2.1.0-dev.5.0)
+ (package-native-inputs dart-2.1.0-dev.5.0)))))
--
2.29.2
From 51ba123e0e4f46dbd055dbe6d8503c914d2d5e9d Mon Sep 17 00:00:00 2001
From: nixo <nicolo@nixo.xyz>
Date: Fri, 27 Nov 2020 23:06:41 +0100
Subject: [PATCH 17/20] gnu: Add dart-2.5.0.

* gnu/packages/dart.scm (dart-2.5.0): New variable.
---
gnu/packages/dart.scm | 94 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 94 insertions(+)

Toggle diff (104 lines)
diff --git a/gnu/packages/dart.scm b/gnu/packages/dart.scm
index eaa02bf5fd..309f960bb9 100644
--- a/gnu/packages/dart.scm
+++ b/gnu/packages/dart.scm
@@ -1127,3 +1127,97 @@
(alist-replace "dart" `(,dart-2.1.0-dev.6.0)
(alist-replace "gcc" `(,gcc-8)
(package-native-inputs dart-2.1.0-dev.6.0))))))
+
+(define-public dart-2.5.0
+ (package
+ (inherit dart-2.4.0)
+ (version "2.5.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/dart-lang/sdk.git")
+ (commit version)))
+ (sha256
+ (base32
+ "1xwrj7hj9a28w2ymykmfd7c2bi7b68ssbhkkb7p62yhn4m504vh1"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments dart-2.4.0)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-before 'configure 'create-gclient-args
+ (lambda _
+ (with-output-to-file "build/config/gclient_args.gni"
+ (lambda ()
+ ;; taken from their release, available at
+ ;; commondatastorage.googleapis.com/dart-archive/channels/
+ ;; stable/raw/2.5.0/src/dart-2.5.0.tar.gz
+ (display "checkout_llvm = false")))))
+ (add-before 'configure 'patch-dart-action
+ (lambda* (#:key inputs propagated-inputs #:allow-other-keys)
+ (substitute* "build/dart/dart_action.gni"
+ ;; FIX: assignment had no effect
+ (("dfe =") "# dfe =")
+ (("\"\\$_dart_root/tools/sdks/\\$host_os/.*service.dart.snapshot\"")
+ ""))))
+ (add-before 'configure 'disable-language-model
+ ;; the language_model is a 200Mb tensor flow binary image, which
+ ;; should be downloaded from
+ ;; https://chrome-infra-packages.appspot.com/p/dart/language_model/
+ ;; It seems to be used for code completition
+ (lambda _
+ (substitute* "sdk/BUILD.gn"
+ ;; definition and use of ftlite/language model are after a
+ ;; conditional, make it false
+ (("target_cpu == \"x64\"") "false"))))
+ (add-before 'configure 'add-missing-includes
+ (lambda _
+ (substitute* "runtime/bin/ffi_test/ffi_test_functions.cc"
+ ;; compilation fails because of mutex, condition variable and
+ ;; function not declared
+ (("#include <stddef.h>" all)
+ (string-join
+ `(,all
+ "#include <functional>" "#include <mutex>"
+ "#include <condition_variable>")
+ "\n")))))))))
+ (inputs
+ (append
+ `(("dart-pkg-tflite-native"
+ ,(dart-pkg "tflite-native" "06e533a9747306d1114c53427cc67eda080f51f9"
+ "1ibd66l1hq0b04cbnxm9k968h0ijqzi1sfslcxx9w45zcnmhk63n"))
+ ("dart-pkg-mustache"
+ ,(origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/xxgreg/mustache")
+ (commit "5e81b12215566dbe2473b2afd01a8a8aedd56ad9")))
+ (sha256
+ (base32
+ "03k614d3njlw06n2ff6g4yf252xnwj5fb83aizs3dz1awmkhygk2")))))
+ (replace-inputs
+ dart-2.4.0
+ `(("dart-pkg-dartdoc"
+ ,(dart-pkg "dartdoc" "0.28.4"
+ "0p9b60nrfqmgbngzsabgh7byrp0p1lwfc9rh77z3gjphmi16ydxf"))
+ ("dart-pkg-fixnum"
+ ,(dart-pkg "fixnum" "0.10.9"
+ "0vicw7jprch4pd949j0b4h695i5wzk1njg4ffhcz4jrc40l2p0gn"))
+ ("dart-pkg-http"
+ ,(dart-pkg "http" "0.12.0+2"
+ "0psffnp9lmyklbz06687hkm8ywnspr9ai5bpa33jw0m24zz4znc7"))
+ ("dart-pkg-http-io"
+ ,(dart-pkg "http-io" "2fa188caf7937e313026557713f7feffedd4978b"
+ "1wfp984n8wykx1n6niwxfhxzr2cq95qdvk47majxizwlzbqv989x"))
+ ("dart-pkg-http-multi-server"
+ ,(dart-pkg "http_multi_server" "2.0.5"
+ "11szb0by7yn7kdcp9pbd6igy2kxilmpsnvwdm3ds8bp7l1ysgpwk"))
+ ("dart-pkg-http-parser"
+ ,(dart-pkg "http-parser" "3.1.3"
+ "0g71a2bgws4nv0vllidyvf1ncbrxry81dy98vy0p8lz3h8r7irpx"))
+ ("dart-pkg-linter"
+ ,(dart-pkg "linter" "0.1.96"
+ "13fd9yfv6ww2yg2bhv0x01bgx4cl2vx12cy485ls2m16jwyjf1di"))))))
+ (native-inputs
+ (alist-replace "dart" `(,dart-2.4.0)
+ (package-native-inputs dart-2.4.0)))))
--
2.29.2
From ad443d16e94268d4641f2ae6e25533ce74989678 Mon Sep 17 00:00:00 2001
From: nixo <nicolo@nixo.xyz>
Date: Sat, 28 Nov 2020 13:41:41 +0100
Subject: [PATCH 18/20] gnu: Add dart-2.6.1.

* gnu/packages/dart.scm (dart-2.6.1): New variable.
---
gnu/packages/dart.scm | 72 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 72 insertions(+)

Toggle diff (82 lines)
diff --git a/gnu/packages/dart.scm b/gnu/packages/dart.scm
index 309f960bb9..88ecfffe78 100644
--- a/gnu/packages/dart.scm
+++ b/gnu/packages/dart.scm
@@ -1221,3 +1221,75 @@
(native-inputs
(alist-replace "dart" `(,dart-2.4.0)
(package-native-inputs dart-2.4.0)))))
+
+(define-public dart-2.6.1
+ (package
+ (inherit dart-2.5.0)
+ (version "2.6.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/dart-lang/sdk.git")
+ (commit version)))
+ (sha256
+ (base32
+ "0h8y5bs809hzappm7xx4xz45kzp28qvbkjp55wwq9gc2mznfmz8b"))))
+ (arguments
+ ;; Inheriting from the previous, as we don't want the patched phases
+ (substitute-keyword-arguments (package-arguments dart-2.5.0)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-before 'configure 'fix-linker-flags
+ (lambda _
+ (substitute* "build/config/linux/BUILD.gn"
+ (("\"-lc\\+\\+\",") "")
+ ;; Fixes "undefined reference to std::cout"
+ (("\"-nodefaultlibs\",") "")
+ ;; we are not using clang
+ (("\"-lclang_rt.*") "\"-fpermissive\","))))
+ (add-before 'configure 'gcc-permissive
+ (lambda _
+ (substitute* "runtime/BUILD.gn"
+ ;; gcc complains with "declaration of method changes meaning
+ ;; of", add -fpermissive
+ (("-fno-exceptions\",")
+ "-fno-exceptions\", \"-fpermissive\","))))))))
+ (inputs
+ (append
+ `(("dart-pkg-ffi"
+ ,(dart-pkg "ffi" "ea88d71b043ee14b268c3aedff14e9eb32e20959"
+ "13jvj0i58cb02k1xj1wlx3r5q5krfwj4r71p6jgkacvphm9pfjll")))
+ (replace-inputs
+ dart-2.5.0
+ `(("gperftools"
+ ,(origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/gperftools/gperftools.git")
+ (commit "e9ab4c53041ac62feefbbb076d326e9a77dd1567")))
+ (sha256
+ (base32
+ "052ldhvaaijw0yvqb3pdir68cz6idaaaq31nagrqkzjilgllisfh"))))
+ ("dart-pkgtested-package-config"
+ ,(dart-pkg "package-config" "v1.9.2"
+ "0gaws9v3w95fmgn74wiyif0fdjx0dvivwpzk6a3gmqjp0jrr1rqh"))
+ ("dart-pkg-args"
+ ,(dart-pkg "args" "1.5.2"
+ "0vqx908x8278hf4j4abd4mmsk409qmi0al3wyn3ym5sr9mrlxnsa"))
+ ("dart-pkg-dartdoc"
+ ,(dart-pkg "dartdoc" "v0.28.8"
+ "0dckzhw6gm6w723277ykwr5wws3i4hhkcbnal8n55s0yajk6q5l3"))
+ ("dart-pkg-linter"
+ ,(dart-pkg "linter" "0.1.101"
+ "011ja9n35vs26w6mr0mn53mfgp0rx6pispf1pd7wvbm1jlvpcv32"))
+ ("dart-pkg-markdown"
+ ,(dart-pkg "markdown" "2.1.1"
+ "1c5mg6z2saszjpxncgkkakwnfr36ki98mivssrv3kaj9n6sagr84"))
+ ("dart-pkg-tflite-native"
+ ,(dart-pkg "tflite-native" "3c777c40608a2a9f1427bfe0028ab48e7116b4c1"
+ "13hrdd1bgdxqinxihlg2in0vfzg2l7lq7s40sj19djildrp62lh1"))))))
+ (native-inputs
+ (alist-replace
+ "dart" `(,dart-2.5.0)
+ (package-native-inputs dart-2.5.0)))))
--
2.29.2
From 0ef5241a5c0a2b29e813e77814776a1c37f5f35a Mon Sep 17 00:00:00 2001
From: nixo <nicolo@nixo.xyz>
Date: Sat, 28 Nov 2020 15:39:25 +0100
Subject: [PATCH 19/20] gnu: Add dart-2.7.2.

* gnu/packages/dart.scm (dart-2.7.2): New variable.
---
gnu/packages/dart.scm | 61 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 61 insertions(+)

Toggle diff (71 lines)
diff --git a/gnu/packages/dart.scm b/gnu/packages/dart.scm
index 88ecfffe78..d706825d76 100644
--- a/gnu/packages/dart.scm
+++ b/gnu/packages/dart.scm
@@ -1293,3 +1293,64 @@
(alist-replace
"dart" `(,dart-2.5.0)
(package-native-inputs dart-2.5.0)))))
+
+(define-public dart-2.7.2
+ (package
+ (inherit dart-2.6.1)
+ (version "2.7.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/dart-lang/sdk.git")
+ (commit version)))
+ (sha256
+ (base32
+ "1gyi76rwznxxr09kslr3glhw1l76qc25a2y4pwqqg9rgpl52pcbd"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments dart-2.6.1)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-before 'configure 'link-pthread
+ (lambda* _
+ (substitute* "build/toolchain/gcc_toolchain.gni"
+ (("\\$libs_section_postfix")
+ "$libs_section_postfix -lpthread"))))))))
+ (inputs
+ (append
+ `(("dart-pkg-pedantic"
+ ,(dart-pkg "pedantic" "v1.8.0"
+ "0bmdmf1bgxclh365ca7c05cpz7wabyis1ax65r3pj7ksjg4p8hp9")))
+ (replace-inputs
+ dart-2.6.1
+ `(("dart-pkgtested-package-config"
+ ,(dart-pkg "package-config" "2453cd2e78c2db56ee2669ced17ce70dd00bf576"
+ "0wg5dgrk584zmxkcla88641i6w4ba7fbpw8l5ghzqv1v8azqvr7i"))
+ ("dart-pkgtested-dart-style"
+ ,(dart-pkg "dart-style" "1.3.2"
+ "0a9vgidqxva8prw00mig2irlyj9a4swcwyw0j9n5yxjhg006j43v"))
+ ("dart-pkg-bazel-worker"
+ ,(dart-pkg "bazel-worker" "v0.1.22"
+ "09wmwvz3vlm9x103i6hy6jrz6rvldwnf8ii1cyj95sx05qam5csz"))
+ ("dart-pkg-dartdoc"
+ ,(dart-pkg "dartdoc" "v0.29.1"
+ "0aambr3588m1aqsafm0anqbbn3ajvzj3jgkjvb7qgxi9ahx3hw9j"))
+ ("dart-pkg-linter"
+ ,(dart-pkg "linter" "0.1.104"
+ "1wdqdwjh3r4aiadcaf9qd5hyx6krclx397riy8f5xcravm1kn9jg"))
+ ("dart-pkg-protobuf"
+ ,(dart-pkg "protobuf" "3746c8fd3f2b0147623a8e3db89c3ff4330de760"
+ "09zgplljiyffqqnd0ylgzagf31b1dgw8qy35r4pwgmlh0xpc1aic"))
+ ("dart-pkg-pub"
+ ,(dart-pkg "pub" "d15067931a6b671a1c9dcc98b5923347676269cf"
+ "0h8lfyzhz0misgfg8hxg72rvm68miscqfr1h4nmjix9rzw76d0vw"))
+ ("dart-pkg-watcher"
+ ,(dart-pkg "watcher" "0.9.7+13"
+ "1ilzh97l60srga2j2iiv0ybzjxjdy166vsignp62smjbxhl0p2p9"))
+ ("dart-pkg-yaml"
+ ,(dart-pkg "yaml" "2.2.0"
+ "1y5xwps838yys9aw72n2300p2r5jjvz6v4klsp38y55f9kfh2dax"))))))
+ (native-inputs
+ (alist-replace
+ "dart" `(,dart-2.6.1)
+ (package-native-inputs dart-2.6.1)))))
--
2.29.2
From b75b8f98be9e565d78100e201414cf204b8ef197 Mon Sep 17 00:00:00 2001
From: nixo <nicolo@nixo.xyz>
Date: Sat, 28 Nov 2020 16:59:58 +0100
Subject: [PATCH 20/20] gnu: Add dart-2.8.4.

* gnu/packages/dart.scm (dart-2.8.4): New variable.
---
gnu/packages/dart.scm | 81 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 81 insertions(+)

Toggle diff (91 lines)
diff --git a/gnu/packages/dart.scm b/gnu/packages/dart.scm
index d706825d76..1ab0c1e82b 100644
--- a/gnu/packages/dart.scm
+++ b/gnu/packages/dart.scm
@@ -1354,3 +1354,84 @@
(alist-replace
"dart" `(,dart-2.6.1)
(package-native-inputs dart-2.6.1)))))
+
+(define-public dart-2.8.4
+ (package
+ (inherit dart-2.7.2)
+ (version "2.8.4")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/dart-lang/sdk.git")
+ (commit version)))
+ (sha256
+ (base32
+ "0wgchkqplx6bjgb901rm583iqbmi7fy29c1xzhlddgmnz1x7yh6c"))))
+ (inputs
+ (append
+ `(("dart-pkg-stagehand"
+ ,(dart-pkg "stagehand" "v3.3.7"
+ "0xwssdfcl3isrfycazqhar52dms20zvg9g4zn8pmifc86zfmkcfh")))
+ (replace-inputs
+ dart-2.7.2
+ `(("dart-pkgtested-package-config"
+ ,(dart-pkg "package-config" "v1.9.2"
+ "0gaws9v3w95fmgn74wiyif0fdjx0dvivwpzk6a3gmqjp0jrr1rqh"))
+ ("dart-pkg-args"
+ ,(dart-pkg "args" "1.6.0"
+ "0lwms9wysfwk1dbzrgas3qfjmxrz07n2hlzvyb21dr5scjmvm8sx"))
+ ("dart-pkg-async"
+ ,(dart-pkg "async" "2.4.1"
+ "0447x7v58y8fqj3zfykbpy4lmp5w39p3psxa7kk3idjvq3rdqf53"))
+ ("dart-pkg-cli-util"
+ ,(dart-pkg "cli-util" "4ad7ccbe3195fd2583b30f86a86697ef61e80f41"
+ "1hgnck9g39z1vcnf0lysmb5sj4917l51p7hqwvkkf475nwdhfnxm"))
+ ("dart-pkg-dartdoc"
+ ,(dart-pkg "dartdoc" "v0.30.3"
+ "0xks7srhg0zwl6q9rzj9ralh91144yvhi378m144ydma4b9c3vac"))
+ ("dart-pkg-http-multi-server"
+ ,(dart-pkg "http_multi_server" "ea269f79321d659208402088f3297e8920a88ee6"
+ "0lfkw7kkghdm29h78hafjxyp01aj9whc6s9z0dhyyc56aar4jfhf"))
+ ("dart-pkg-intl"
+ ,(dart-pkg "intl" "0.16.1"
+ "0a87y8vy8zm2cpyq83f7anpfq0a6kgpphcl7cq3s96b0k9dvfpkl"))
+ ("dart-pkg-linter"
+ ,(dart-pkg "linter" "0.1.114"
+ "1cpkqb4pzks3xphx1vilplfmmlsxhs28pfzb9k0c70wgzm4biw91"))
+ ("dart-pkg-matcher"
+ ,(dart-pkg "matcher" "0.12.5"
+ "0y0qnx96sxrqfw92zy9ln678isbb6cl1gfk6lisgpch3q5d7q7f1"))
+ ("dart-pkg-path"
+ ,(dart-pkg "path" "1.6.2"
+ "0ag6bplqw7rpysgv77nsgx86758add9jszrp4v68xhld69vn5pvd"))
+ ("dart-pkg-pub"
+ ,(dart-pkg "pub" "3606265962da4248d34d352aa3d170aae4496a90"
+ "0sa9yvb4zx20v1h85d3i3hv917hp5hwcghrvzcl1r9afsprkjdln"))
+ ("dart-pkg-pub-semver"
+ ,(dart-pkg "pub-semver" "v1.4.4"
+ "1yg9fl7ynnrp8c8iax070zx6dyakj8fbghzrxmx4rnblak63ijsj"))
+ ("dart-pkg-shelf-packages-handler"
+ ,(dart-pkg "shelf-packages-handler" "2.0.0"
+ "1nhvj92kjag6ids8y4ld99p3v8qk6fgygc89yyi98xf3v6ijr01b"))
+ ("dart-pkg-source-map-stack-trace"
+ ,(dart-pkg "source-map-stack-trace" "2.0.0"
+ "0vq22isaypcfgrajfv0f6ww74cskbl8m171kq65rg9syxs50a96g"))
+ ("dart-pkg-source-span"
+ ,(dart-pkg "source-span" "1.7.0"
+ "055lw4x27am90shz4wa4xlnv44ndk12gd0965ffidys705xfk1cg"))
+ ("dart-pkg-stream-channel"
+ ,(dart-pkg "stream-channel" "2.0.0"
+ "02hs73jj4yg9sqqw2wjrrf179svdgrzamiaqmpncz3n3x12jk0hl"))
+ ("dart-pkg-watcher"
+ ,(dart-pkg "watcher" "0.9.7+14"
+ "1kgxisvfbhvr5q30776plh3xn7iy0ckhy4wpzsvp2pbd63kmi2wa"))
+ ("dart-pkg-web-socket-channel"
+ ,(dart-pkg "web-socket-channel" "1.0.15"
+ "1dcc91f1q6fl6jzyqaplg6cc5k67wcczb93z7gqnk6lijlqlmy6g"))
+ ("dart-pkg-yaml"
+ ,(dart-pkg "yaml" "2.2.0"
+ "1y5xwps838yys9aw72n2300p2r5jjvz6v4klsp38y55f9kfh2dax"))))))
+ (native-inputs
+ (alist-replace "dart" `(,dart-2.7.2)
+ (package-native-inputs dart-2.7.2)))))
--
2.29.2
Julien Lepiller wrote 4 years ago
(name . Nicolò Balzarotti)(address . anothersms@gmail.com)(address . 44926@debbugs.gnu.org)
20201128215020.39ddb709@tachikoma.lepiller.eu
Le Sat, 28 Nov 2020 19:10:09 +0100,
Nicolò Balzarotti <anothersms@gmail.com> a écrit :

Toggle quote (22 lines)
> Hi Guix!
> As announced on guix-devel, I bootstrapped the dart compiler from
> source.
>
> Following patches add dart 2.8.4 (latest release is 2.10, but I wanted
> to be sure that this work in progress is fine before continuing, as I
> fear that 4 other steps are required).
>
> NOTE: I tagged this as WIP as I've not yet disabled analytics yet (I
> disabled it from the first added version, but I was wondering if I
> need to disable it in _each_ version or if just the latest one is
> fine. Patching all of them will require some time).
>
> (Each build takes ~20min on my server and ~60min on my laptop, and
> there's a dozen of them)
>
> Let me know if there are major problems or if I can go on with
> disabling analytics!
>
> Thanks, Nicolò
>

Impressive :)

I can see a few issues in terms of style in these patches, but looking
at the first dart version, it looks like it's going to work :)

So, instead of using dart-zlib, dart-boringssl, ..., I'd recommend
changing dart-pkg to something like this:

(define* (dart-pkg name tag hash #:optional
(url (string-append
(string-replace-substring name "-" "_")
".git")))
(origin
(method git-fetch)
(uri (git-reference
(url url)
(commit tag)))
...))

That way, dart-zlib, ... also have a proper file name ;)

I don't really like the fact that the build system simply bundles these
dependencies instead of link dynamically to them, but I guess it's hard
to do anything for that, and for bootstrap versions, I don't think it's
too much of an issue.

You should also make sure to clean up your patches: for instance patch
8 modifies things you've added before (I think it's only because of
whitespace, but that's not clean).

Thank you!
Nicolò Balzarotti wrote 4 years ago
(name . Julien Lepiller)(address . julien@lepiller.eu)(address . 44926@debbugs.gnu.org)
878salw5xb.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me
Julien Lepiller <julien@lepiller.eu> writes:

Toggle quote (46 lines)
> Le Sat, 28 Nov 2020 19:10:09 +0100,
> Nicolò Balzarotti <anothersms@gmail.com> a écrit :
>
>> Hi Guix!
>> As announced on guix-devel, I bootstrapped the dart compiler from
>> source.
>>
>> Following patches add dart 2.8.4 (latest release is 2.10, but I wanted
>> to be sure that this work in progress is fine before continuing, as I
>> fear that 4 other steps are required).
>>
>> NOTE: I tagged this as WIP as I've not yet disabled analytics yet (I
>> disabled it from the first added version, but I was wondering if I
>> need to disable it in _each_ version or if just the latest one is
>> fine. Patching all of them will require some time).
>>
>> (Each build takes ~20min on my server and ~60min on my laptop, and
>> there's a dozen of them)
>>
>> Let me know if there are major problems or if I can go on with
>> disabling analytics!
>>
>> Thanks, Nicolò
>>
>
> Impressive :)
>
> I can see a few issues in terms of style in these patches, but looking
> at the first dart version, it looks like it's going to work :)
>
> So, instead of using dart-zlib, dart-boringssl, ..., I'd recommend
> changing dart-pkg to something like this:
>
> (define* (dart-pkg name tag hash #:optional
> (url (string-append
> "https://github.com/dart-lang/"
> (string-replace-substring name "-" "_")
> ".git")))
> (origin
> (method git-fetch)
> (uri (git-reference
> (url url)
> (commit tag)))
> ...))
>

Sure, I'll do this

Toggle quote (6 lines)
> That way, dart-zlib, ... also have a proper file name ;)
>
> I don't really like the fact that the build system simply bundles these
> dependencies instead of link dynamically to them, but I guess it's hard
> to do anything for that, and for bootstrap versions, I don't think it's
> too much of an issue.
Yeah I too don't like it, but I really never used (and don't like) the
gn build system, so any change requires a lot of time. I know that we
usually unbundle things, and if required I might try again.

Toggle quote (5 lines)
>
> You should also make sure to clean up your patches: for instance patch
> 8 modifies things you've added before (I think it's only because of
> whitespace, but that's not clean).

Ops, sorry!

Toggle quote (3 lines)
>
> Thank you!

Thank you Julien!
I'll submit a v2 tomorrow.
nixo wrote 4 years ago
[PATCH v2 01/15] gnu: Add gn-for-dart-bootstrap.
(address . 44926@debbugs.gnu.org)(name . nixo)(address . nicolo@nixo.xyz)
20201129173414.8984-1-nicolo@nixo.xyz
* gnu/packages/build-tools.scm (gn-for-dart-bootstrap): New variable.
---
gnu/packages/build-tools.scm | 38 ++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)

Toggle diff (51 lines)
diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm
index 3f140efdb3..c58e47dc98 100644
--- a/gnu/packages/build-tools.scm
+++ b/gnu/packages/build-tools.scm
@@ -177,6 +177,44 @@ files and generates build instructions for the Ninja build system.")
;; X11 license.
(license (list license:bsd-3 license:x11)))))
+(define-public gn-for-dart-bootstrap
+ (let ((commit "041ed5e79abc24956f296ca8bc94d04e26cf3d6b")
+ (revision "1353")
+ (hash "1zd41zwggamkqy33cra75cfdx82v3spdfym6hj1lbbanabi4mpl7"))
+ (package
+ (inherit gn)
+ (name "gn-for-dart-bootstrap")
+ (version (git-version "0.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gn.googlesource.com/gn")
+ (commit commit)))
+ (sha256 (base32 hash))
+ (file-name (git-file-name name version))))
+ (arguments
+ `(#:tests? #f ;FIXME: How to run?
+ #:phases (modify-phases %standard-phases
+ (add-before 'configure 'set-build-environment
+ (lambda _
+ (setenv "CC" "gcc")
+ (setenv "CXX" "g++")
+ (setenv "AR" "ar")
+ #t))
+ (replace 'configure
+ (lambda _
+ (invoke "python" "build/gen.py")))
+ (replace 'build
+ (lambda _
+ (invoke "ninja" "-C" "out" "gn")))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (install-file "out/gn"
+ (string-append out "/bin"))
+ #t)))))))))
+
(define-public meson
(package
(name "meson")
--
2.29.2
nixo wrote 4 years ago
[PATCH v2 02/15] gnu: packages: dart.scm: New file.
(address . 44926@debbugs.gnu.org)(name . nixo)(address . nicolo@nixo.xyz)
20201129173414.8984-2-nicolo@nixo.xyz
gnu/local.mk: Add it.
gnu/packages/dart.scm (dart-pkg): New function.
---
gnu/local.mk | 1 +
gnu/packages/dart.scm | 41 +++++++++++++++++++++++++++++++++++++++++
2 files changed, 42 insertions(+)
create mode 100644 gnu/packages/dart.scm

Toggle diff (61 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 14b626c600..359015415c 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -156,6 +156,7 @@ GNU_SYSTEM_MODULES = \
%D%/packages/cvassistant.scm \
%D%/packages/cybersecurity.scm \
%D%/packages/cyrus-sasl.scm \
+ %D%/packages/dart.scm \
%D%/packages/databases.scm \
%D%/packages/datamash.scm \
%D%/packages/datastructures.scm \
diff --git a/gnu/packages/dart.scm b/gnu/packages/dart.scm
new file mode 100644
index 0000000000..f8af8696bc
--- /dev/null
+++ b/gnu/packages/dart.scm
@@ -0,0 +1,41 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2020 Nicolò Balzarotti <nicolo@nixo.xy>
+;;;
+;;; 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 <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages dart)
+ #:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix build utils)
+ #:use-module (guix git-download)
+ #:use-module (guix packages)
+ #:use-module (guix utils))
+
+(define* (dart-pkg name tag hash #:optional
+ (url (string-append
+ "https://github.com/dart-lang/"
+ (string-replace-substring name "-" "_"))))
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url url)
+ (commit tag)))
+ (file-name
+ (git-file-name name
+ (if (> (string-length tag) 9)
+ (string-take tag 9)
+ tag)))
+ (sha256 (base32 hash))))
+
--
2.29.2
nixo wrote 4 years ago
[PATCH v2 04/15] gnu: Add dart-2.0.0-dev.20.0.
(address . 44926@debbugs.gnu.org)(name . nixo)(address . nicolo@nixo.xyz)
20201129173414.8984-4-nicolo@nixo.xyz
* gnu/packages/dart.scm (dart-2.0.0-dev.20.0): New variable.
---
gnu/packages/dart.scm | 61 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 61 insertions(+)

Toggle diff (71 lines)
diff --git a/gnu/packages/dart.scm b/gnu/packages/dart.scm
index 07e3dcee21..c2463a676c 100644
--- a/gnu/packages/dart.scm
+++ b/gnu/packages/dart.scm
@@ -426,3 +426,64 @@
@item Supported both on desktop and on mobile
@end")
(license license:bsd-3)))
+
+(define-public dart-2.0.0-dev.20.0
+ (package
+ (inherit dart-2.0.0-dev.8.0)
+ (name "dart")
+ (version "2.0.0-dev.20.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/dart-lang/sdk")
+ (commit version)))
+ (file-name (string-append name "-" version))
+ (sha256
+ (base32
+ "1k2zc27r3b7ha5bvlhaqr75xiyf6rg7nwk3r0qrjl7dk9k50iyix"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments dart-2.0.0-dev.8.0)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-before 'configure 'set-dart-path
+ (lambda* (#:key inputs propagated-inputs #:allow-other-keys)
+ (substitute* "runtime/observatory/BUILD.gn"
+ (("\"--sdk=True\" \\]")
+ (string-append
+ "\"--sdk=True\", "
+ "\"--dart-executable\","
+ "\"" (assoc-ref inputs "dart") "/bin/dart\","
+ "\"--pub-executable\","
+ "\"" (assoc-ref inputs "dart") "/bin/pub\" ]")))
+ (substitute* "tools/utils.py"
+ (("os.path.join\\(CheckedInSdkPath\\(\\), 'bin', name)")
+ (string-append "os.path.join(\""
+ (assoc-ref %build-inputs "dart")
+ "/bin/\", name)")))
+ (substitute* "build/prebuilt_dart_sdk.gni"
+ (("\\$_dart_root/tools/sdks/\\$host_os/dart-sdk/bin/")
+ (string-append (assoc-ref %build-inputs "dart") "/bin/")))))
+ (add-before 'configure 'disable-Werror
+ (lambda _
+ (substitute* "runtime/BUILD.gn"
+ (("\"-Werror\"") "# -Werror")
+ (("\"-Wall\"") "# -Wall")
+ (("\"-Wextra\"") "# -Wextra"))
+ (substitute* "build/config/compiler/BUILD.gn"
+ (("\"-Wl,--icf=all\"") "")
+ (("\"-Wall") "# \"-Wall")
+ (("\"-Wextra") "# \"-Wextra")
+ (("\"-Werror") "# \"-Werror"))))
+ (add-before 'configure 'fix-get-timestamp
+ (lambda _
+ (substitute* "tools/make_version.py"
+ (("utils.GetGitTimestamp") "\"0\" # "))))
+ (add-before 'configure 'fix-zlib-build
+ (lambda _
+ (substitute* "third_party/zlib/BUILD.gn"
+ (("direct_dependent_configs") "# direct_dependent_configs")
+ (("\"//base\",") ""))))))))
+ (native-inputs
+ (cons `("dart" ,dart-2.0.0-dev.8.0)
+ (package-native-inputs dart-2.0.0-dev.8.0)))))
--
2.29.2
nixo wrote 4 years ago
[PATCH v2 05/15] gnu: dart.scm: Add helper function.
(address . 44926@debbugs.gnu.org)(name . nixo)(address . nicolo@nixo.xyz)
20201129173414.8984-5-nicolo@nixo.xyz
* gnu/packages/dart.scm (replace-inputs): New function.
---
gnu/packages/dart.scm | 12 ++++++++++++
1 file changed, 12 insertions(+)

Toggle diff (29 lines)
diff --git a/gnu/packages/dart.scm b/gnu/packages/dart.scm
index c2463a676c..20da998b49 100644
--- a/gnu/packages/dart.scm
+++ b/gnu/packages/dart.scm
@@ -22,6 +22,9 @@
#:use-module (guix git-download)
#:use-module (guix packages)
#:use-module (guix utils)
+ #:use-module (ice-9 match)
+ #:use-module (srfi srfi-1)
+ #:use-module ((guix build utils) #:select (alist-replace))
#:use-module (gnu packages)
#:use-module (gnu packages build-tools)
#:use-module (gnu packages gcc)
@@ -487,3 +490,12 @@
(native-inputs
(cons `("dart" ,dart-2.0.0-dev.8.0)
(package-native-inputs dart-2.0.0-dev.8.0)))))
+
+(define (replace-inputs pkg inputs)
+ "Replace multiple inputs at once. `PKG' is the source package and
+`INPUTS' the list of replacements."
+ (fold (lambda (pkg inputs)
+ (match-let (((name pkg) pkg))
+ (alist-replace name (list pkg) inputs)))
+ (package-inputs pkg)
+ inputs))
--
2.29.2
nixo wrote 4 years ago
[PATCH v2 06/15] gnu: Add dart-2.0.0-dev.36.0.
(address . 44926@debbugs.gnu.org)(name . nixo)(address . nicolo@nixo.xyz)
20201129173414.8984-6-nicolo@nixo.xyz
* gnu/packages.dart.scm (dart-2.0.0-dev.36.0): New variable.
---
gnu/packages/dart.scm | 121 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 121 insertions(+)

Toggle diff (131 lines)
diff --git a/gnu/packages/dart.scm b/gnu/packages/dart.scm
index 20da998b49..9fcd483168 100644
--- a/gnu/packages/dart.scm
+++ b/gnu/packages/dart.scm
@@ -499,3 +499,124 @@
(alist-replace name (list pkg) inputs)))
(package-inputs pkg)
inputs))
+
+(define-public dart-2.0.0-dev.36.0
+ (package
+ (inherit dart-2.0.0-dev.20.0)
+ (name "dart")
+ ;; This version adds jsonEncode, required to build 2.0
+ (version "2.0.0-dev.36.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/dart-lang/sdk")
+ (commit version)))
+ (file-name (string-append name "-" version))
+ (sha256
+ (base32
+ "0q5am2c9mva96slv7flabs0h0hhc65hk0hsy9axgi0s1xnzrxlmp"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments dart-2.0.0-dev.20.0)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-before 'configure 'copy-bootstrap-dart
+ (lambda* (#:key inputs #:allow-other-keys)
+ (copy-recursively
+ (assoc-ref inputs "dart")
+ "tools/sdks/linux/dart-sdk")))))))
+ (inputs
+ (append
+ `(("dart-pkg-http-io"
+ ,(dart-pkg "http-io" "35dc43c9144cf7ed4236843dacd62ebaf89df21a"
+ "1f23dpvig3c6966fhiz1mbmswkx0fqwxmprm8237ymgpji5hp6rw"))
+ ("dart-pkg-http-retry"
+ ,(dart-pkg "http-retry" "0.1.0"
+ "1qr92gjfgyxg2vcfw7vynahz5cd3h7gwf75djwrrjxs4ccabj24k"))
+ ("dart-pkg-test-descriptor"
+ ,(dart-pkg "test-descriptor" "1.0.3"
+ "0gvj8q1h07qprgx9jjljjasx65pzrsviyfhkbdk7c6znxs7kmdq1"))
+ ("dart-pkg-test-process"
+ ,(dart-pkg "test-process" "1.0.1"
+ "1vbni0kr6fz6nb8wfn6sxx8cnwp19xb8l548371qs8xf25lg61q3")))
+ (replace-inputs
+ dart-2.0.0-dev.8.0
+ `(("root-certificates"
+ ,(dart-pkg "root-certificates"
+ "a4c7c6f23a664a37bc1b6f15a819e3f2a292791a"
+ "0646gywipvk9m4l17f6c1mi9hhimcsh0x5vdkczhy5zhm8w6l9v7"))
+ ("dart-pkg-async"
+ ,(dart-pkg "async" "corelib_2_2_1"
+ "1j3n02ricaf97wigsqdnnsj1ahw3d92ybp3kckrki4rlrq87a75v"))
+ ("dart-pkg-bazel-worker"
+ ,(dart-pkg "bazel-worker" "v0.1.9"
+ "1579a3kdif93mazz5wlny3axib04aysgfpgnx3fjxfnl60cw52b7"))
+ ("dart-pkg-collection"
+ ,(dart-pkg "collection" "1.14.5"
+ "1w46ffqd2808haqr49wf1f05qigwswhn904ph1qvb1fwlybj9s3p"))
+ ("dart-pkg-dartdoc"
+ ,(dart-pkg "dartdoc" "v0.16.0"
+ "0g17y9s4xf79bsccs3cybxal6yisbz1qhwqyzg7hdivb6jx6qqgn"))
+ ("dart-pkg-html"
+ ,(dart-pkg "html" "0.13.2+2"
+ "16xgff229r4palkgahbmby6hxi59wswg45l04q083ym6l4mwkac1"))
+ ("dart-pkg-json-rpc-2"
+ ,(dart-pkg "json_rpc_2" "2.0.6"
+ "0a0rjws0g9vpivjgpzv7k1j4i57qma447si0ipihk5sifvjhqjpn"))
+ ("dart-pkg-linter"
+ ,(dart-pkg "linter" "0.1.43"
+ "0jaqh5jmqhmkajgbza7ij6w6fwafpr7shs1ad9dskhg57d0kkkp3"))
+ ("dart-pkg-path"
+ ,(dart-pkg "path" "1.5.1"
+ "1121qy0k59va7wsbcc96pnvs0226c2s3iyjc2xycvv2nm4y84hyz"))
+ ("dart-pkg-plugin"
+ ,(dart-pkg "plugin" "0.2.0+2"
+ "1nxr7b636vyrjqrism7s4mhazyac3qdq3b0g3xph2naknxipbnrx"))
+ ("dart-pkg-pub"
+ ,(dart-pkg "pub" "64c5f40adf6828da1b63320dd39bcedbef1354c6"
+ "1sb5kv41v0q4b1nqdc4vm9wg64schywadj5iz3g4k95q5j2i1q26"))
+ ("dart-pkg-markdown"
+ ,(dart-pkg "markdown" "1.0.0"
+ "0001k41sf7d9yf70jbmm5nxjby75x5ka1wg5yjl1zyggwxfcdv25"))
+ ("dart-pkg-mime"
+ ,(dart-pkg "mime" "0.9.6"
+ "1wazn5zwc59idd9yf85llwnwdk8m0mvcsn8b8bakm7j5rqzqxz4j"))
+ ("dart-pkg-mockito"
+ ,(dart-pkg "mockito" "a92db054fba18bc2d605be7670aee74b7cadc00a"
+ "0p3zxd83i61w4p4sf40zdq2cn8s3yg9ij1ydww4x32d42nsh7vmv"))
+ ("dart-pkg-pool"
+ ,(dart-pkg "pool" "1.3.4"
+ "087b60d07c9j8qa3dk1g1mz8yisxxhmjmqcnwkr2rpai89ji0mfm"))
+ ("dart-pkg-protobuf"
+ ,(dart-pkg "protobuf" "0.7.0"
+ "0kfpdw4cj74qpy5w7zx13kvw9bjz8ps6zdsycfx3hc4ml7876c4v"))
+ ("dart-pkg-quiver"
+ ,(dart-pkg "quiver" "0.28.0"
+ "1zji18fw1sb4y88snaxmz632v9px0z4c2wlh3bfwncsrc3h49i7z"
+ "https://github.com/google/quiver-dart"))
+ ("dart-pkg-shelf"
+ ,(dart-pkg "shelf" "0.7.1"
+ "199ivhgbf18x3zh5v3sr7dkkp8ndnvy6mb8r1brv01bykhkwp1k9"))
+ ("dart-pkg-stack-trace"
+ ,(dart-pkg "stack-trace" "1.9.0"
+ "1rb1nn9k8lwghx3kzfbfza1zdmd9s07xpgchv4lakd4hw7wbkvm6"))
+ ("dart-pkg-test"
+ ,(dart-pkg "test" "0.12.30+1"
+ "03n7cr1a3ajw6nb54iwwiyjmyyp63nrn9fbk6fsjyfx9ahgsxj18"))
+ ("dart-pkg-utf"
+ ,(dart-pkg "utf" "0.9.0+4"
+ "0lsdjfds1c6mcpgw4w5bvfbvhs1iyjb2yx0kggd4yky4gq6109r5"))
+ ("dart-pkg-watcher"
+ ,(dart-pkg "watcher" "0.9.7+7"
+ "1y50zzln9a5qqrzrgd62wwj0a6qhfsv9jj0wya8mlsp9xpq1bhbd"))
+ ("dart-pkg-web-socket-channel"
+ ,(dart-pkg "web-socket-channel"
+ "c2a2874b6e6366654e8b98fe1ef20a9f3d798eee"
+ "13wk7al7v7fynggq3x73y68yzs0wm7jziwv0m2qh5986i6wkcw78"))
+ ("dart-pkgtested-dart-style"
+ ,(dart-pkg
+ "dart-style" "1.0.9"
+ "0wsyb6giffz8w03wqfrlwj88igcnj33gxzfcmpsv8kb5spd2v8pk"))))))
+ (native-inputs
+ (alist-replace "dart" `(,dart-2.0.0-dev.20.0)
+ (package-native-inputs dart-2.0.0-dev.20.0)))))
--
2.29.2
nixo wrote 4 years ago
[PATCH v2 07/15] gnu: Add dart-2.0.0-dev.54.0.
(address . 44926@debbugs.gnu.org)(name . nixo)(address . nicolo@nixo.xyz)
20201129173414.8984-7-nicolo@nixo.xyz
* gnu/packages/dart.scm (dart-2.0.0-dev.54.0): New variable.
---
gnu/packages/dart.scm | 93 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 93 insertions(+)

Toggle diff (103 lines)
diff --git a/gnu/packages/dart.scm b/gnu/packages/dart.scm
index 9fcd483168..1ebea4979e 100644
--- a/gnu/packages/dart.scm
+++ b/gnu/packages/dart.scm
@@ -620,3 +620,96 @@
(native-inputs
(alist-replace "dart" `(,dart-2.0.0-dev.20.0)
(package-native-inputs dart-2.0.0-dev.20.0)))))
+
+(define-public dart-2.0.0-dev.54.0
+ (package
+ (inherit dart-2.0.0-dev.36.0)
+ ;; This version adds FileMode, required to build 2.0
+ (version "2.0.0-dev.54.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/dart-lang/sdk")
+ (commit version)))
+ (sha256
+ (base32
+ "05m64i6wa9nk3x3dby5yp06aqyl2pd7sk8sm1wiaijbish1q5drc"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments dart-2.0.0-dev.36.0)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (replace 'set-dart-path
+ (lambda* (#:key inputs propagated-inputs #:allow-other-keys)
+ (substitute* "tools/utils.py"
+ (("os.path.join\\(CheckedInSdkPath\\(\\), 'bin', name)")
+ (string-append "os.path.join(\""
+ (assoc-ref %build-inputs "dart")
+ "/bin/\", name)")))))))))
+ (inputs
+ (replace-inputs
+ dart-2.0.0-dev.36.0
+ `(("dart-pkg-args"
+ ,(dart-pkg "args" "1.4.1"
+ "0ylasxd8v0q80pz0h518yxhbdklabbly1g4n81v8w19vlk2nd8aj"))
+ ("dart-pkg-async"
+ ,(dart-pkg "async" "2.0.6"
+ "1zibp9hiys9f0y3lpxhbbpg2q824jc7x5gcqdicxpylv7smmcdd5"))
+ ("dart-pkg-barback"
+ ,(dart-pkg "barback" "0.15.2+14"
+ "17v6l3z3dm4indr1z787mcdgirsz0y34yccsnfs8yf0yb9mbhqk4"))
+ ("dart-pkg-collection"
+ ,(dart-pkg "collection" "1.14.6"
+ "1majrhazk0ccrrnhxa1pji803r5yywv0a2bmhp5n6sk0a89ps7v7"))
+ ("dart-pkg-dart2js-info"
+ ,(dart-pkg "dart2js-info" "0.5.6+2"
+ "1k5kylr1805gdsbkvwv8fsh0vv5znikgrd2p2m7mvywlzaaaw5v3"))
+ ("dart-pkg-dartdoc"
+ ,(dart-pkg "dartdoc" "v0.19.0"
+ "0x95pwvw1b5dwix65rizz15ri2kblw7z6jnq3qb0b9s82b46l7sm"))
+ ("dart-pkg-html"
+ ,(dart-pkg "html" "0.13.3"
+ "1d78m0f6jvcam4w47733w94ln01rwq9bbk6l219mg6ppczdsps4n"))
+ ("dart-pkg-http"
+ ,(dart-pkg "http" "0.11.3+16"
+ "1r0gikhy1g2viiic2yfav5xf8xwp21z06blvwmdf4h9fvmj00ac2"))
+ ("dart-pkg-http-retry"
+ ,(dart-pkg "http-retry" "0.1.1"
+ "1pi6f3jm6kzch8nzdjbwzzyc5spiwl2609c6h7kb2zj6cxyjsm9h"))
+ ("dart-pkg-linter"
+ ,(dart-pkg "linter" "0.1.46"
+ "03298xfpb1blxh4js2ia73dl077aivfjffdqmy47nilkijwva4cs"))
+ ("dart-pkg-markdown"
+ ,(dart-pkg "markdown" "1.1.1"
+ "1qj7dmwz6dwq7jsvzxa2qw2fcf68m5yhr8xs8mm65c6rlsxz6vm5"))
+ ("dart-pkg-protobuf"
+ ,(dart-pkg "protobuf" "0.7.1"
+ "0fwq06ls5x9q8z2xydd0a00lj8mnkn0zdc365qsdnzj8dkgm3006"))
+ ("dart-pkg-pub"
+ ,(dart-pkg "pub" "875d35005a7d33f367d70a3e31e9d3bad5d1ebd8"
+ "1hb0c9fnyjzd0bz2rmn9ja7ybbwnvyvkmaqh7y1mhg4vk4pzcbmm"))
+ ("dart-pkg-quiver"
+ ,(dart-pkg "quiver" "5aaa3f58c48608af5b027444d561270b53f15dbf"
+ "0mv97c2f0z0bb1917bjlb903fjjw794pdbv4vk7kcfg1wzp907vl"
+ "https://github.com/google/quiver-dart"))
+ ("dart-pkg-scheduled-test"
+ ,(dart-pkg "scheduled-test" "0.12.11"
+ "1r631dvq3pwr10kc1wmqvlhx5lc0hx5h2ix9sp462w6yv03ry7rq"))
+ ("dart-pkg-shelf"
+ ,(dart-pkg "shelf" "0.7.2"
+ "1z88dwjlwf88ckg0wi4b9kcn44c4y4mnkdppxv0g1hg6b07jsd3x"))
+ ("dart-pkg-stack-trace"
+ ,(dart-pkg "stack-trace" "1.9.2"
+ "1a2mmjs4c7p6g3pr346hqhfx25d4h1i5vb2np03ydh7pkp19lgmw"))
+ ("dart-pkg-stream-channel"
+ ,(dart-pkg "stream-channel" "1.6.4"
+ "1qj9n0pk7n1zlkdffy70cllqpxkvfqxswr70nw7ycygxm9bsnbwq"))
+ ("dart-pkg-test-reflective-loader"
+ ,(dart-pkg "test-reflective-loader" "0.1.4"
+ "1rkgpsnl9izfy97dbsc4y53kmiin6pyhj5652bw8sl0z2n6za1pp"))
+ ("dart-pkg-yaml"
+ ,(dart-pkg "yaml" "2.1.13"
+ "16xnx7xgm8vsf22dzg6p7zyjax5jad5x4ibky3gqkqh7wavfxhwg")))))
+ (native-inputs
+ (alist-replace "dart" `(,dart-2.0.0-dev.36.0)
+ (package-native-inputs dart-2.0.0-dev.36.0)))))
--
2.29.2
nixo wrote 4 years ago
[PATCH v2 09/15] gnu: Add dart-2.1.0-dev.5.0.
(address . 44926@debbugs.gnu.org)(name . nixo)(address . nicolo@nixo.xyz)
20201129173414.8984-9-nicolo@nixo.xyz
* gnu/packages/dart.scm (dart-2.1.0-dev.5.0): New variable.
---
gnu/packages/dart.scm | 97 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 97 insertions(+)

Toggle diff (107 lines)
diff --git a/gnu/packages/dart.scm b/gnu/packages/dart.scm
index ba0e528059..22e1900361 100644
--- a/gnu/packages/dart.scm
+++ b/gnu/packages/dart.scm
@@ -872,3 +872,100 @@
(native-inputs
(alist-replace "dart" `(,dart-2.0.0-dev.65.0-bin-only)
(package-native-inputs dart-2.0.0-dev.65.0-bin-only)))))
+
+(define-public dart-2.1.0-dev.5.0
+ (package
+ (inherit dart-2.0.0-dev.65.0)
+ (version "2.1.0-dev.5.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/dart-lang/sdk")
+ (commit version)))
+ (sha256
+ (base32
+ "07yj5w9fry3has1800sp2yfwijfmc206s5simiiqzw78a0k0r4b0"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments dart-2.0.0-dev.65.0)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (delete 'no-dart-preview)
+ (delete 'disable-observatory-tool)
+ (replace 'copy-bootstrap-dart
+ ;; changed path from sdks/linux/dart-sdk to sdks/dart-sdk
+ (lambda* (#:key inputs #:allow-other-keys)
+ (copy-recursively
+ (assoc-ref inputs "dart")
+ "tools/sdks/dart-sdk")))))))
+ (inputs
+ (append
+ `(("icu"
+ ,(dart-pkg "icu" "c56c671998902fcc4fc9ace88c83daa99f980793"
+ "1kw4x116kdv9cbvfv1ciib3brri9a0x0p3qpgz957rki213z89zf"
+ "https://chromium.googlesource.com/chromium/deps/icu")))
+ (replace-inputs
+ dart-2.0.0-dev.65.0
+ `(("boringssl"
+ ,(dart-pkg "boringssl" "672f6fc2486745d0cabc3aaeb4e0a3cd13b37b12"
+ "14zjxg00hp752lys7gxpp91apnbwkzy3snvqp5wi99y78rhl7cyn"
+ "https://boringssl.googlesource.com/boringssl"))
+ ("boringssl-gen"
+ ,(dart-pkg "boringssl-gen" "344f455fd13d46f054726638e76026156ea73aa9"
+ "0s8rwjmkbsf4dg7b6v247wf9fq018wvgh9psjicjg7nfs7pbvs71"))
+ ("observatory-pub-packages"
+ ,(dart-pkg "observatory-pub-packages"
+ "0894122173b0f98eb08863a7712e78407d4477bc"
+ "1gc6wfq05mwvbx61aym1vlngc92x4b5fcmxa4q843118mnhmxjfp"))
+ ("dart-pkg-bazel-worker"
+ ,(dart-pkg "bazel-worker" "0.1.14"
+ "17l0bd30dllg5bhpd68hyx6g6s1krz4nb4qzp51n8ia13crrsr0f"))
+ ("dart-pkg-dartdoc"
+ ,(dart-pkg "dartdoc" "v0.24.1"
+ "01rxayn8lmvb05yij7ad4r8yyadm1iaf47ks4ckyxf5k09padm81"))
+ ("dart-pkg-fixnum"
+ ,(dart-pkg "fixnum" "0.10.8"
+ "1w4gc4gz12ryfngvd11q91j8b5j0slzcbic89vizklq4psv2qgn8"))
+ ("dart-pkg-glob"
+ ,(dart-pkg "glob" "1.1.7"
+ "01659iwdvqpw7s6ransqmwzvh36pyfiiy4yd3q3arpdk35264464"))
+ ("dart-pkg-http"
+ ,(dart-pkg "http" "0.11.3+17"
+ "04wqkj0fkqzn0a8fw20bl4vc59hqcpf834ahw44p89jib72w311i"))
+ ("dart-pkg-intl"
+ ,(dart-pkg "intl" "0.15.6"
+ "0rlgr2fdrviph38ij6idpslxn7ly4apfr9fjgy86sax9j8zbnigq"))
+ ("dart-pkg-markdown"
+ ,(dart-pkg "markdown" "2.0.2"
+ "13mn1ksjnr1hdgcy9p7d1kq9jvh24rg1hzxb2yzcwb6nkhfn03wl"))
+ ("dart-pkg-matcher"
+ ,(dart-pkg "matcher" "0.12.3"
+ "0xsbgrky011r3c1jbk4i1ahxw02m38hxgmy2vn65vv8qf9470kq0"))
+ ("dart-pkg-oauth2"
+ ,(dart-pkg "oauth2" "1.2.1"
+ "0wqrz5k7mf16rihkx4bwxd82iy2841zpqzqxxph00vf11aflrmal"))
+ ("dart-pkg-protobuf"
+ ,(dart-pkg "protobuf" "0.9.0"
+ "16pg6zsvphr6yd4vy13icq68i8g14ll1j04vhdz0k5p2mz57wqq5"))
+ ("dart-pkg-resource"
+ ,(dart-pkg "resource" "2.1.5"
+ "0qqixp6qj8qks4iww6zlallxs1w8z6nx3842g8fl7f3s59km9d76"))
+ ("dart-pkg-shelf"
+ ,(dart-pkg "shelf" "0.7.3+3"
+ "1q3mh1mmis7w1rbvwvzf3avgh2yfznb8hc194f3xbvhic01r1d2m"))
+ ("dart-pkg-source-maps"
+ ,(dart-pkg "source-maps" "0.10.9"
+ "0dk2v7hzv4yknkz44wjfjisfb7yj8xgqhnxw34vi3jf6v7ix67zv"))
+ ("dart-pkg-unittest"
+ ,(dart-pkg "unittest" "2b8375bc98bb9dc81c539c91aaea6adce12e1072"
+ "15mcvxckqjlmvhb5azprhz0psp6r8409cd2kjgd0irhaldkvjifh"))
+ ("dart-pkg-usage"
+ ,(dart-pkg "usage" "3.4.0"
+ "1d9dvqk3s1xr4sx50hahl7iq38z9wf0iw006hb9vhdsvda9mkcsr"))
+ ("dart-pkg-yaml"
+ ,(dart-pkg
+ "yaml" "2.1.15"
+ "00p7hkkj5kbz4vkgzrsi4h405jrbl6gg66j88ysfgaq37c3k4v04"))))))
+ (native-inputs
+ (alist-replace "dart" `(,dart-2.0.0-dev.65.0)
+ (package-native-inputs dart-2.0.0-dev.65.0)))))
--
2.29.2
nixo wrote 4 years ago
[PATCH v2 10/15] gnu: Add dart-2.1.0-dev.6.0.
(address . 44926@debbugs.gnu.org)(name . nixo)(address . nicolo@nixo.xyz)
20201129173414.8984-10-nicolo@nixo.xyz
* gnu/packages/dart.scm (dart-2.1.0-dev.6.0): New variable.
---
gnu/packages/dart.scm | 17 +++++++++++++++++
1 file changed, 17 insertions(+)

Toggle diff (27 lines)
diff --git a/gnu/packages/dart.scm b/gnu/packages/dart.scm
index 22e1900361..38c2484eb4 100644
--- a/gnu/packages/dart.scm
+++ b/gnu/packages/dart.scm
@@ -969,3 +969,20 @@
(native-inputs
(alist-replace "dart" `(,dart-2.0.0-dev.65.0)
(package-native-inputs dart-2.0.0-dev.65.0)))))
+
+(define-public dart-2.1.0-dev.6.0
+ (package
+ (inherit dart-2.1.0-dev.5.0)
+ (version "2.1.0-dev.6.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/dart-lang/sdk")
+ (commit version)))
+ (sha256
+ (base32
+ "04x0zgz4ns0njkga81lds61r53il1rllj5k2gq83vl8dr8ksq6r5"))))
+ (native-inputs
+ (alist-replace "dart" `(,dart-2.1.0-dev.5.0)
+ (package-native-inputs dart-2.1.0-dev.5.0)))))
--
2.29.2
nixo wrote 4 years ago
[PATCH v2 08/15] gnu: Add dart-2.0.0-dev.65.0.
(address . 44926@debbugs.gnu.org)(name . nixo)(address . nicolo@nixo.xyz)
20201129173414.8984-8-nicolo@nixo.xyz
* gnu/packages/dart.scm (dart-2.0.0-dev.65.0-bin-only): New variable.
* gnu/packages/dart.scm (dart-2.0.0-dev.65.0): New variable.
* gnu/packages/patches/dart-2.0.0-dev.65-compile-with-dev.54.patch: New file
* gnu/local.mk: Add patch file.

The bin-only variant is used to bootstrap the full version. We compile only a
subset of the package, enough to build itself in the next step.
---
gnu/local.mk | 1 +
gnu/packages/dart.scm | 159 +
...art-2.0.0-dev.65-compile-with-dev.54.patch | 2674 +++++++++++++++++
3 files changed, 2834 insertions(+)
create mode 100644 gnu/packages/patches/dart-2.0.0-dev.65-compile-with-dev.54.patch

Toggle diff (418 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index ee4ade0139..a6c949f574 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -906,6 +906,7 @@ dist_patch_DATA = \
%D%/packages/patches/cvs-CVE-2017-12836.patch \
%D%/packages/patches/cyrus-sasl-ac-try-run-fix.patch \
%D%/packages/patches/dart-2.0.0-dev.8-disable-analytics.patch \
+ %D%/packages/patches/dart-2.0.0-dev.65-compile-with-dev.54.patch \
%D%/packages/patches/date-output-pkg-config-files.patch \
%D%/packages/patches/datefudge-gettimeofday.patch \
%D%/packages/patches/dbacl-include-locale.h.patch \
diff --git a/gnu/packages/dart.scm b/gnu/packages/dart.scm
index 1ebea4979e..ba0e528059 100644
--- a/gnu/packages/dart.scm
+++ b/gnu/packages/dart.scm
@@ -713,3 +713,162 @@
(native-inputs
(alist-replace "dart" `(,dart-2.0.0-dev.36.0)
(package-native-inputs dart-2.0.0-dev.36.0)))))
+
+(define-public dart-2.0.0-dev.65.0-bin-only
+ (package
+ (inherit dart-2.0.0-dev.54.0)
+ ;; This version adds FileMode, required to build 2.0
+ (version "2.0.0-dev.65.0-bin-only")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/dart-lang/sdk")
+ (commit version)))
+ (sha256
+ (base32
+ "08lvng2ib127d980ib6cflprxzl3figpblras07d5zm1k2fpjzi0"))
+ (patches
+ (list (search-patch "dart-2.0.0-dev.65-compile-with-dev.54.patch")))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments dart-2.0.0-dev.54.0)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'add-git-revision 'add-git-HEAD
+ (lambda _
+ (mkdir-p ".git/logs")
+ (with-output-to-file ".git/logs/HEAD"
+ (lambda ()
+ (display "0")))))
+ (add-before 'configure 'patch-dart-action
+ (lambda* (#:key inputs propagated-inputs #:allow-other-keys)
+ (substitute* "build/dart/dart_action.gni"
+ ;; FIX: assignment had no effect
+ (("dfe =") "# dfe =")
+ (("\"\\$_dart_root/tools/sdks/\\$host_os/.*service.dart.snapshot\"")
+ ""))))
+ (add-before 'configure 'no-dart-preview
+ ;; We are compiling with an older dart version which does not
+ ;; support this flag
+ (lambda* (#:key inputs propagated-inputs #:allow-other-keys)
+ (substitute* "utils/application_snapshot.gni"
+ (("\"--no-preview-dart-2\",") "")
+ (("\"--no-preview-dart-2\"") ""))
+ (substitute* "tools/observatory_tool.py"
+ (("'--no-preview-dart-2'") ""))))
+ (replace 'build
+ ;; This build fails, but the product is enough for next build.
+ ;; TODO: check if we can reduce the output generated by previous
+ ;; dart version, leading to faster compile times and maybe less
+ ;; patches to the build system
+ (lambda* (#:key configure-flags #:allow-other-keys)
+ (system* "ninja" "-C" "out/Release")
+ (system* "ninja" "most" "-C" "out/Release")))
+ (replace 'install
+ ;; The build is incomplete, so the path is different from previous
+ ;; builds
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin/")))
+ ;; This should depend on the architecture as before
+ (copy-recursively "out/Release/dart-sdk/" out)
+ ;; (mkdir-p bin)
+ (copy-file "out/Release/dart"
+ (string-append bin "/dart"))
+ (copy-file "out/Release/dart_bootstrap"
+ (string-append bin "/dart_bootstrap")))))))))
+ (inputs
+ (replace-inputs
+ dart-2.0.0-dev.54.0
+ `(("gperftools"
+ ,(dart-pkg "gperftools" "9608fa3bcf8020d35f59fbf70cd3cbe4b015b972"
+ "0amvwrzn5qc0b0jpxpy5g6zkmj97zjh4hhjrd130hsg2lwwcwhy1"
+ "https://github.com/gperftools/gperftools")))))
+ (native-inputs
+ (alist-replace "dart" `(,dart-2.0.0-dev.54.0)
+ (alist-replace
+ "gcc" `(,gcc-7)
+ (package-native-inputs dart-2.0.0-dev.54.0))))))
+
+(define-public dart-2.0.0-dev.65.0
+ (package
+ (inherit dart-2.0.0-dev.54.0)
+ ;; This version adds FileMode, required to build 2.0
+ (version "2.0.0-dev.65.0")
+ (source
+ ;; FIXME: Inherit
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/dart-lang/sdk")
+ (commit version)))
+ (sha256
+ (base32
+ "08lvng2ib127d980ib6cflprxzl3figpblras07d5zm1k2fpjzi0"))))
+ (arguments
+ ;; Inheriting from the previous, as we don't want the patched phases
+ (substitute-keyword-arguments (package-arguments dart-2.0.0-dev.54.0)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (delete 'no-dart-preview)
+ (add-before 'configure 'disable-observatory-tool
+ (lambda _
+ (substitute* "tools/observatory_tool.py"
+ (("sys.exit\\(main\\(\\)\\)") "sys.exit(0)"))))
+ (add-after 'add-git-revision 'add-git-HEAD
+ (lambda _
+ (mkdir-p ".git/logs")
+ (with-output-to-file ".git/logs/HEAD"
+ (lambda ()
+ (display "0")))))
+ (add-before 'configure 'patch-dart-action
+ (lambda* (#:key inputs propagated-inputs #:allow-other-keys)
+ (substitute* "build/dart/dart_action.gni"
+ ;; FIX: assignment had no effect
+ (("dfe =") "# dfe =")
+ (("\"\\$_dart_root/tools/sdks/\\$host_os/.*service.dart.snapshot\"")
+ ""))))))))
+ (inputs
+ (replace-inputs
+ dart-2.0.0-dev.65.0-bin-only
+ `(("observatory-pub-packages"
+ ,(dart-pkg "observatory-pub-packages"
+ "caf0aecfb15077fc7a34d48e9df13606c793fddf"
+ "0c8y33sfp3q1v0f9dgf5x4vz1yz52q9zhqqkv74dyal7pj4q4rzd"))
+ ("dart-pkgtested-dart-style"
+ ,(dart-pkg "dart-style" "1.0.12"
+ "1fniyq6h1x12ib2aza1fklcp2vg2knljihw3dpng9k196dny26k3"))
+ ("dart-pkgtested-package-config"
+ ,(dart-pkg "package-config" "1.0.3"
+ "03w67nb1dhi2yqb63z1301p88hjws1d8azmw8m5ap4zapqdbhzgn"))
+ ("dart-pkg-async"
+ ,(dart-pkg "async" "2.0.7"
+ "1m1izf333jnl740j4nvp7iaqljgyhxrfxn6w0z6jjjl1pn3brhb8"))
+ ("dart-pkg-collection"
+ ,(dart-pkg "collection" "1.14.10"
+ "1h1n7q345lbcv0lfbxmcy0ncwvr8zzr3p4154k7l7dyqflvnij18"))
+ ("dart-pkg-crypto"
+ ,(dart-pkg "crypto" "2.0.5"
+ "1s9nhybnkkq363722fdpignm14asw8pyasryz5mkxd1bhh3v44fm"))
+ ("dart-pkg-dartdoc"
+ ,(dart-pkg "dartdoc" "v0.20.1"
+ "0i860pjq09dl1y20axjw2my2cnkq3jarfiqg9qb7dqs9l6apfcs0"))
+ ("dart-pkg-http-throttle"
+ ,(dart-pkg "http-throttle" "1.0.2"
+ "0irc3gx7gwv9xwychsd49j8v6r8na4k7lv8vz4008qp2sf90b5fa"))
+ ("dart-pkg-mustache4dart"
+ ,(dart-pkg "mustache4dart" "v2.1.2"
+ "0gww2g03ybfg3ffn2jz3f6351sqhaqvjfslng6w3l67s4gm3p3y6"
+ "https://github.com/valotas/mustache4dart"))
+ ("dart-pkg-pub"
+ ,(dart-pkg "pub" "2258022cb7fd6ec43900d3b88012efb268020019"
+ "0f1nj564mps7mzmpbyj7h4za8cv5d3wsck97262yzk9wz9wl4sls"))
+ ("dart-pkg-pub-semver"
+ ,(dart-pkg "pub-semver" "1.4.1"
+ "0sql7q00ydpxcgnscgjrg7mlykjwp0s77v3ik8lj1fdr86iqsiix"))
+ ("dart-pkg-shelf-web-socket"
+ ,(dart-pkg "shelf-web-socket" "0.2.2"
+ "0p36dkx4picaf7lxcysjm8wfz0x3s55i5j3dj6d36y9avvgjq5fr")))))
+ (native-inputs
+ (alist-replace "dart" `(,dart-2.0.0-dev.65.0-bin-only)
+ (package-native-inputs dart-2.0.0-dev.65.0-bin-only)))))
diff --git a/gnu/packages/patches/dart-2.0.0-dev.65-compile-with-dev.54.patch b/gnu/packages/patches/dart-2.0.0-dev.65-compile-with-dev.54.patch
new file mode 100644
index 0000000000..88fa42171c
--- /dev/null
+++ b/gnu/packages/patches/dart-2.0.0-dev.65-compile-with-dev.54.patch
@@ -0,0 +1,2674 @@
+From 989da057a7b68bd9edcc72b6c15473df71490339 Mon Sep 17 00:00:00 2001
+From: nixo <nicolo@nixo.xyz>
+Date: Sat, 21 Nov 2020 21:29:19 +0100
+Subject: [PATCH] Make it compile with older dart version
+
+---
+ build/config/compiler/BUILD.gn | 6 +-
+ build/config/gcc/BUILD.gn | 2 +-
+ build/dart/dart_action.gni | 6 +-
+ .../lib/src/analyzer/code_generator.dart | 64 +++----
+ .../lib/src/analyzer/property_model.dart | 18 +-
+ .../lib/src/analyzer/type_utilities.dart | 4 +-
+ .../lib/src/compiler/js_metalet.dart | 8 +-
+ .../lib/src/compiler/js_names.dart | 2 +-
+ .../lib/src/compiler/module_builder.dart | 14 +-
+ .../lib/src/compiler/shared_compiler.dart | 10 +-
+ pkg/dev_compiler/lib/src/js_ast/builder.dart | 158 +++++++++---------
+ pkg/dev_compiler/lib/src/js_ast/nodes.dart | 16 +-
+ pkg/dev_compiler/lib/src/js_ast/printer.dart | 14 +-
+ pkg/dev_compiler/lib/src/js_ast/template.dart | 118 ++++++-------
+ pkg/dev_compiler/lib/src/kernel/compiler.dart | 122 +++++++-------
+ .../lib/src/kernel/constants.dart | 12 +-
+ .../lib/src/kernel/native_types.dart | 6 +-
+ .../lib/src/kernel/nullable_inference.dart | 8 +-
+ .../lib/src/kernel/property_model.dart | 10 +-
+ pkg/dev_compiler/lib/src/kernel/target.dart | 20 +--
+ .../lib/src/kernel/type_table.dart | 4 +-
+ pkg/dev_compiler/tool/kernel_sdk.dart | 16 +-
+ pkg/dev_compiler/tool/patch_sdk.dart | 36 ++--
+ pkg/front_end/tool/fasta | 2 +-
+ pkg/js_ast/lib/src/builder.dart | 2 +-
+ runtime/BUILD.gn | 6 +-
+ sdk/BUILD.gn | 68 ++++----
+ tools/observatory_tool.py | 2 +-
+ utils/application_snapshot.gni | 6 +-
+ utils/dartdevc/BUILD.gn | 8 +-
+ 30 files changed, 385 insertions(+), 383 deletions(-)
+
+diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
+index 8154e4e9a2..ec56ca353e 100644
+--- a/build/config/compiler/BUILD.gn
++++ b/build/config/compiler/BUILD.gn
+@@ -578,9 +578,9 @@ config("chromium_code") {
+ cflags = []
+ } else {
+ cflags = [
+- "-Wall",
+- "-Wextra",
+- "-Werror",
++ # "-Wall",
++ # "-Wextra",
++ # -Werror,
+ ]
+
+ defines = []
+diff --git a/build/config/gcc/BUILD.gn b/build/config/gcc/BUILD.gn
+index 110f1cceb5..93517f0496 100644
+--- a/build/config/gcc/BUILD.gn
++++ b/build/config/gcc/BUILD.gn
+@@ -35,7 +35,7 @@ config("executable_ldconfig") {
+
+ # Newer binutils don't set DT_RPATH unless you disable "new" dtags
+ # and the new DT_RUNPATH doesn't work without --no-as-needed flag.
+- "-Wl,--disable-new-dtags",
++ "-Wl,--enable-new-dtags",
+ ]
+ }
+ }
+diff --git a/build/dart/dart_action.gni b/build/dart/dart_action.gni
+index 91f5e293f8..f7e81ac593 100644
+--- a/build/dart/dart_action.gni
++++ b/build/dart/dart_action.gni
+@@ -224,12 +224,12 @@ template("prebuilt_dart_action") {
+ forward_variables_from(invoker, "*")
+ if (_is_fuchsia) {
+ binary = prebuilt_dart
+- dfe = "$prebuilt_dart_sdk/bin/snapshots/kernel-service.dart.snapshot"
++ # dfe = "$prebuilt_dart_sdk/bin/snapshots/kernel-service.dart.snapshot"
+ } else {
+ binary =
+ "$_dart_root/tools/sdks/$host_os/dart-sdk/bin/dart$executable_suffix"
+- dfe =
+- "$_dart_root/tools/sdks/$host_os/dart-sdk/bin/snapshots/kernel-service.dart.snapshot"
++ # dfe =
++ # "$_dart_root/tools/sdks/$host_os/dart-sdk/bin/snapshots/kernel-service.dart.snapshot"
+ }
+ target = "$_dart_root/runtime/bin:dart_bootstrap"
+ }
+diff --git a/pkg/dev_compiler/lib/src/analyzer/code_generator.dart b/pkg/dev_compiler/lib/src/analyzer/code_generator.dart
+index fdda18f780..6b545ef850 100644
+--- a/pkg/dev_compiler/lib/src/analyzer/code_generator.dart
++++ b/pkg/dev_compiler/lib/src/analyzer/code_generator.dart
+@@ -91,10 +91,10 @@ class CodeGenerator extends Object
+ ///
+ /// We sometimes special case codegen for a single library, as it simplifies
+ /// name scoping requirements.
+- final _libraries = Map<LibraryElement, JS.Identifier>();
++ final _libraries = new Map<LibraryElement, JS.Identifier>();
+
+ /// Imported libraries, and the temporaries used to refer to them.
+- final _imports = Map<LibraryElement, JS.TemporaryId>();
++ final _imports = new Map<LibraryElement, JS.TemporaryId>();
+
+ /// The list of dart:_runtime SDK functions; these are assumed by other code
+ /// in the SDK to be generated before anything else.
+@@ -118,10 +118,10 @@ class CodeGenerator extends Object
+ /// In an async* function, this represents the stream controller parameter.
+ JS.TemporaryId _asyncStarController;
+
+- final _initializingFormalTemps = HashMap<ParameterElement, JS.TemporaryId>();
++ final _initializingFormalTemps = new HashMap<ParameterElement, JS.TemporaryId>();
+
+ JS.Identifier _extensionSymbolsModule;
+- final _extensionSymbols = Map<String, JS.TemporaryId>();
++ final _extensionSymbols = new Map<String, JS.TemporaryId>();
+
+ /// The type provider from the current Analysis [context].
+ final TypeProvider types;
+@@ -200,9 +200,9 @@ class CodeGenerator extends Object
+
+ /// Information about virtual fields for all libraries in the current build
+ /// unit.
+- final virtualFields = VirtualFieldModel();
++ final virtualFields = new VirtualFieldModel();
+
+- final _usedCovariantPrivateMembers = HashSet<ExecutableElement>();
++ final _usedCovariantPrivateMembers = new HashSet<ExecutableElement>();
+
+ CodeGenerator(
+ AnalysisContext c, this.summaryData, this.options, this._extensionTypes)
+@@ -326,8 +326,8 @@ class CodeGenerator extends Object
+ _extensionSymbolsModule = JS.Identifier('dartx');
+ } else {
+ // Otherwise allow these to be renamed so users can write them.
+- runtimeModule = JS.TemporaryId('dart');
+- _extensionSymbolsModule = JS.TemporaryId('dartx');
++ runtimeModule = new JS.TemporaryId('dart');
++ _extensionSymbolsModule = new JS.TemporaryId('dartx');
+ }
+ _typeTable = TypeTable(runtimeModule);
+
+@@ -1147,7 +1147,7 @@ class CodeGenerator extends Object
+ if (isClassSymbol == null) {
+ // TODO(jmesserly): we could export these symbols, if we want to mark
+ // implemented interfaces for user-defined classes.
+- var id = JS.TemporaryId("_is_${classElem.name}_default");
++ var id = new JS.TemporaryId("_is_${classElem.name}_default");
+ moduleItems.add(
+ js.statement('const # = Symbol(#);', [id, js.string(id.name, "'")]));
+ isClassSymbol = id;
+@@ -1250,7 +1250,7 @@ class CodeGenerator extends Object
+ .toStatement();
+ }
+ var classExpr = JS.ClassExpression(
+- JS.TemporaryId(classElem.name), heritage, methods,
++ new JS.TemporaryId(classElem.name), heritage, methods,
+ typeParams: typeParams, fields: jsFields);
+ return js.statement('# = #;', [className, classExpr]);
+ }
+@@ -1378,8 +1378,8 @@ class CodeGenerator extends Object
+ // mixinMembers(C, class C$ extends M { <methods> });
+ mixinBody.add(runtimeStatement('mixinMembers(#, #)', [
+ classExpr,
+- JS.ClassExpression(
+- JS.TemporaryId(classElem.name), mixinClass, methods)
++ new JS.ClassExpression(
++ new JS.TemporaryId(classElem.name), mixinClass, methods)
+ ]));
+ }
+
+@@ -1391,10 +1391,10 @@ class CodeGenerator extends Object
+ var m = classElem.mixins[i];
+
+ var mixinString = classElem.supertype.name + '_' + m.name;
+- var mixinClassName = JS.TemporaryId(mixinString);
+- var mixinId = JS.TemporaryId(mixinString + '\$');
++ var mixinClassName = new JS.TemporaryId(mixinString);
++ var mixinId = new JS.TemporaryId(mixinString + '\$');
+ var mixinClassExpression =
+- JS.ClassExpression(mixinClassName, baseClass, []);
++ new JS.ClassExpression(mixinClassName, baseClass, []);
+ // Bind the mixin class to a name to workaround a V8 bug with es6 classes
+ // and anonymous function names.
+ // TODO(leafp:) Eliminate this once the bug is fixed:
+@@ -1447,10 +1447,10 @@ class CodeGenerator extends Object
+
+ // Generate setter
+ if (!decl.isFinal) {
+- var value = JS.TemporaryId('value');
+- fn = JS.Fun([value], js.block('{ this.# = #; }', [name, value]));
++ var value = new JS.TemporaryId('value');
++ fn = new JS.Fun([value], js.block('{ this.# = #; }', [name, value]));
+ method =
+- JS.Method(_declareMemberName(field.setter), fn, isSetter: true);
++ new JS.Method(_declareMemberName(field.setter), fn, isSetter: true);
+ jsMethods.add(method);
+ }
+ }
+@@ -2864,8 +2864,8 @@ class CodeGenerator extends Object
+ var name = element.name;
+ JS.Expression gen = genFn;
+ if (name.isNotEmpty) {
+- gen = JS.NamedFunction(
+- JS.TemporaryId(JS.friendlyNameForDartOperator[name] ?? name),
++ gen = new JS.NamedFunction(
++ new JS.TemporaryId(JS.friendlyNameForDartOperator[name] ?? name),
+ genFn);
+ }
+ gen.sourceInformation = _functionEnd(body);
+@@ -2916,7 +2916,7 @@ class CodeGenerator extends Object
+ // `await` is generated as `yield`.
+ //
+ // _AsyncStarImpl has an example of the generated code.
+- var asyncStarParam = JS.TemporaryId('stream');
++ var asyncStarParam = new JS.TemporaryId('stream');
+ var gen = emitGeneratorFn([asyncStarParam], asyncStarParam);
+
+ var asyncStarImpl = asyncStarImplType.instantiate([returnType]);
+@@ -3132,11 +3132,11 @@ class CodeGenerator extends Object
+ /// The renamer would handle this, but it would prefer to rename the
+ /// temporary used for the private symbol. Instead rename the parameter.
+ return _initializingFormalTemps.putIfAbsent(
+- element, () => JS.TemporaryId(element.name.substring(1)));
++ element, () => new JS.TemporaryId(element.name.substring(1)));
+ }
+
+ var type = declaration ? emitTypeRef(element.type) : null;
+- return JS.Identifier(element.name, type: type);
++ return new JS.Identifier(element.name, type: type);
+ }
+
+ List<Annotation> _parameterMetadata(FormalParameter p) =>
+@@ -3699,7 +3699,7 @@ class CodeGenerator extends Objec
This message was truncated. Download the full message here.
nixo wrote 4 years ago
[PATCH v2 12/15] gnu: Add dart-2.5.0.
(address . 44926@debbugs.gnu.org)(name . nixo)(address . nicolo@nixo.xyz)
20201129173414.8984-12-nicolo@nixo.xyz
* gnu/packages/dart.scm (dart-2.5.0): New variable.
---
gnu/packages/dart.scm | 90 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 90 insertions(+)

Toggle diff (100 lines)
diff --git a/gnu/packages/dart.scm b/gnu/packages/dart.scm
index 33e0135e9f..1c01fd47d1 100644
--- a/gnu/packages/dart.scm
+++ b/gnu/packages/dart.scm
@@ -1061,3 +1061,93 @@
(alist-replace
"gcc" `(,gcc-8)
(package-native-inputs dart-2.1.0-dev.6.0))))))
+
+(define-public dart-2.5.0
+ (package
+ (inherit dart-2.4.0)
+ (version "2.5.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/dart-lang/sdk")
+ (commit version)))
+ (sha256
+ (base32
+ "1xwrj7hj9a28w2ymykmfd7c2bi7b68ssbhkkb7p62yhn4m504vh1"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments dart-2.4.0)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-before 'configure 'create-gclient-args
+ (lambda _
+ (with-output-to-file "build/config/gclient_args.gni"
+ (lambda ()
+ ;; taken from their release, available at
+ ;; commondatastorage.googleapis.com/dart-archive/channels/
+ ;; stable/raw/2.5.0/src/dart-2.5.0.tar.gz
+ (display "checkout_llvm = false")))))
+ (add-before 'configure 'patch-dart-action
+ (lambda* (#:key inputs propagated-inputs #:allow-other-keys)
+ (substitute* "build/dart/dart_action.gni"
+ ;; FIX: assignment had no effect
+ (("dfe =") "# dfe =")
+ (("\"\\$_dart_root/tools/sdks/\\$host_os/.*service.dart.snapshot\"")
+ ""))))
+ (add-before 'configure 'disable-language-model
+ ;; the language_model is a 200Mb tensor flow binary image, which
+ ;; should be downloaded from
+ ;; https://chrome-infra-packages.appspot.com/p/dart/language_model/
+ ;; It seems to be used for code completition
+ (lambda _
+ (substitute* "sdk/BUILD.gn"
+ ;; definition and use of ftlite/language model are after a
+ ;; conditional, make it false
+ (("target_cpu == \"x64\"") "false"))))
+ (add-before 'configure 'add-missing-includes
+ (lambda _
+ (substitute* "runtime/bin/ffi_test/ffi_test_functions.cc"
+ ;; compilation fails because of mutex, condition variable and
+ ;; function not declared
+ (("#include <stddef.h>" all)
+ (string-join
+ `(,all
+ "#include <functional>" "#include <mutex>"
+ "#include <condition_variable>")
+ "\n")))))))))
+ (inputs
+ (append
+ `(("dart-pkg-tflite-native"
+ ,(dart-pkg "tflite-native" "06e533a9747306d1114c53427cc67eda080f51f9"
+ "1ibd66l1hq0b04cbnxm9k968h0ijqzi1sfslcxx9w45zcnmhk63n"))
+ ("dart-pkg-mustache"
+ ,(dart-pkg "mustache" "5e81b12215566dbe2473b2afd01a8a8aedd56ad9"
+ "03k614d3njlw06n2ff6g4yf252xnwj5fb83aizs3dz1awmkhygk2"
+ "https://github.com/xxgreg/mustache")))
+ (replace-inputs
+ dart-2.4.0
+ `(("dart-pkg-dartdoc"
+ ,(dart-pkg "dartdoc" "0.28.4"
+ "0p9b60nrfqmgbngzsabgh7byrp0p1lwfc9rh77z3gjphmi16ydxf"))
+ ("dart-pkg-fixnum"
+ ,(dart-pkg "fixnum" "0.10.9"
+ "0vicw7jprch4pd949j0b4h695i5wzk1njg4ffhcz4jrc40l2p0gn"))
+ ("dart-pkg-http"
+ ,(dart-pkg "http" "0.12.0+2"
+ "0psffnp9lmyklbz06687hkm8ywnspr9ai5bpa33jw0m24zz4znc7"))
+ ("dart-pkg-http-io"
+ ,(dart-pkg "http-io" "2fa188caf7937e313026557713f7feffedd4978b"
+ "1wfp984n8wykx1n6niwxfhxzr2cq95qdvk47majxizwlzbqv989x"))
+ ("dart-pkg-http-multi-server"
+ ,(dart-pkg "http_multi_server" "2.0.5"
+ "11szb0by7yn7kdcp9pbd6igy2kxilmpsnvwdm3ds8bp7l1ysgpwk"))
+ ("dart-pkg-http-parser"
+ ,(dart-pkg "http-parser" "3.1.3"
+ "0g71a2bgws4nv0vllidyvf1ncbrxry81dy98vy0p8lz3h8r7irpx"))
+ ("dart-pkg-linter"
+ ,(dart-pkg
+ "linter" "0.1.96"
+ "13fd9yfv6ww2yg2bhv0x01bgx4cl2vx12cy485ls2m16jwyjf1di"))))))
+ (native-inputs
+ (alist-replace "dart" `(,dart-2.4.0)
+ (package-native-inputs dart-2.4.0)))))
--
2.29.2
nixo wrote 4 years ago
[PATCH v2 13/15] gnu: Add dart-2.6.1.
(address . 44926@debbugs.gnu.org)(name . nixo)(address . nicolo@nixo.xyz)
20201129173414.8984-13-nicolo@nixo.xyz
* gnu/packages/dart.scm (dart-2.6.1): New variable.
---
gnu/packages/dart.scm | 68 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 68 insertions(+)

Toggle diff (78 lines)
diff --git a/gnu/packages/dart.scm b/gnu/packages/dart.scm
index 1c01fd47d1..7f30fb7fc4 100644
--- a/gnu/packages/dart.scm
+++ b/gnu/packages/dart.scm
@@ -1151,3 +1151,71 @@
(native-inputs
(alist-replace "dart" `(,dart-2.4.0)
(package-native-inputs dart-2.4.0)))))
+
+(define-public dart-2.6.1
+ (package
+ (inherit dart-2.5.0)
+ (version "2.6.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/dart-lang/sdk")
+ (commit version)))
+ (sha256
+ (base32
+ "0h8y5bs809hzappm7xx4xz45kzp28qvbkjp55wwq9gc2mznfmz8b"))))
+ (arguments
+ ;; Inheriting from the previous, as we don't want the patched phases
+ (substitute-keyword-arguments (package-arguments dart-2.5.0)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-before 'configure 'fix-linker-flags
+ (lambda _
+ (substitute* "build/config/linux/BUILD.gn"
+ (("\"-lc\\+\\+\",") "")
+ ;; Fixes "undefined reference to std::cout"
+ (("\"-nodefaultlibs\",") "")
+ ;; we are not using clang
+ (("\"-lclang_rt.*") "\"-fpermissive\","))))
+ (add-before 'configure 'gcc-permissive
+ (lambda _
+ (substitute* "runtime/BUILD.gn"
+ ;; gcc complains with "declaration of method changes meaning
+ ;; of", add -fpermissive
+ (("-fno-exceptions\",")
+ "-fno-exceptions\", \"-fpermissive\","))))))))
+ (inputs
+ (append
+ `(("dart-pkg-ffi"
+ ,(dart-pkg "ffi" "ea88d71b043ee14b268c3aedff14e9eb32e20959"
+ "13jvj0i58cb02k1xj1wlx3r5q5krfwj4r71p6jgkacvphm9pfjll")))
+ (replace-inputs
+ dart-2.5.0
+ `(("gperftools"
+ ,(dart-pkg "gperftools" "e9ab4c53041ac62feefbbb076d326e9a77dd1567"
+ "052ldhvaaijw0yvqb3pdir68cz6idaaaq31nagrqkzjilgllisfh"
+ "https://github.com/gperftools/gperftools"))
+ ("dart-pkgtested-package-config"
+ ,(dart-pkg "package-config" "v1.9.2"
+ "0gaws9v3w95fmgn74wiyif0fdjx0dvivwpzk6a3gmqjp0jrr1rqh"))
+ ("dart-pkg-args"
+ ,(dart-pkg "args" "1.5.2"
+ "0vqx908x8278hf4j4abd4mmsk409qmi0al3wyn3ym5sr9mrlxnsa"))
+ ("dart-pkg-dartdoc"
+ ,(dart-pkg "dartdoc" "v0.28.8"
+ "0dckzhw6gm6w723277ykwr5wws3i4hhkcbnal8n55s0yajk6q5l3"))
+ ("dart-pkg-linter"
+ ,(dart-pkg "linter" "0.1.101"
+ "011ja9n35vs26w6mr0mn53mfgp0rx6pispf1pd7wvbm1jlvpcv32"))
+ ("dart-pkg-markdown"
+ ,(dart-pkg "markdown" "2.1.1"
+ "1c5mg6z2saszjpxncgkkakwnfr36ki98mivssrv3kaj9n6sagr84"))
+ ("dart-pkg-tflite-native"
+ ,(dart-pkg
+ "tflite-native" "3c777c40608a2a9f1427bfe0028ab48e7116b4c1"
+ "13hrdd1bgdxqinxihlg2in0vfzg2l7lq7s40sj19djildrp62lh1"))))))
+ (native-inputs
+ (alist-replace
+ "dart" `(,dart-2.5.0)
+ (package-native-inputs dart-2.5.0)))))
--
2.29.2
nixo wrote 4 years ago
[PATCH v2 11/15] gnu: Add dart-2.4.0.
(address . 44926@debbugs.gnu.org)(name . nixo)(address . nicolo@nixo.xyz)
20201129173414.8984-11-nicolo@nixo.xyz
* gnu/packages/dart.scm (dart-2.4.0): New variable.
* gnu/packages/patches/dart-2.4.0-fix-build-with-2.1.patch: New file.
* gnu/local.mk: Add the patch.
---
gnu/local.mk | 1 +
gnu/packages/dart.scm | 75 ++++
.../dart-2.4.0-fix-build-with-2.1.patch | 340 ++++++++++++++++++
3 files changed, 416 insertions(+)
create mode 100644 gnu/packages/patches/dart-2.4.0-fix-build-with-2.1.patch

Toggle diff (443 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index a6c949f574..5ad14f18ef 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -907,6 +907,7 @@ dist_patch_DATA = \
%D%/packages/patches/cyrus-sasl-ac-try-run-fix.patch \
%D%/packages/patches/dart-2.0.0-dev.8-disable-analytics.patch \
%D%/packages/patches/dart-2.0.0-dev.65-compile-with-dev.54.patch \
+ %D%/packages/patches/dart-2.4.0-fix-build-with-2.1.patch \
%D%/packages/patches/date-output-pkg-config-files.patch \
%D%/packages/patches/datefudge-gettimeofday.patch \
%D%/packages/patches/dbacl-include-locale.h.patch \
diff --git a/gnu/packages/dart.scm b/gnu/packages/dart.scm
index 38c2484eb4..33e0135e9f 100644
--- a/gnu/packages/dart.scm
+++ b/gnu/packages/dart.scm
@@ -986,3 +986,78 @@
(native-inputs
(alist-replace "dart" `(,dart-2.1.0-dev.5.0)
(package-native-inputs dart-2.1.0-dev.5.0)))))
+
+(define-public dart-2.4.0
+ (package
+ (inherit dart-2.1.0-dev.6.0)
+ (version "2.4.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/dart-lang/sdk")
+ (commit version)))
+ (sha256
+ (base32
+ "0akm53mfxn3vrs512ml4qyljw2yw92g7mdszcx96hw7zr21d15s2"))
+ (patches
+ (list (search-patch "dart-2.4.0-fix-build-with-2.1.patch")))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments dart-2.1.0-dev.6.0)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-before 'configure 'fix-terminal-color-detection
+ ;; Instead of trying to run bin/sh and check for tty, just
+ ;; disable color supports
+ (lambda _
+ (substitute*
+ "pkg/front_end/lib/src/api_prototype/terminal_color_support.dart"
+ (("/bin/sh") "false"))))
+ (add-after 'add-third-party-src 'add-icu
+ (lambda* (#:key inputs #:allow-other-keys)
+ (copy-recursively (assoc-ref inputs "icu")
+ "third_party/icu")))
+ (add-before 'configure 'remove-fuzzer-no-link
+ (lambda _
+ (substitute* "runtime/BUILD.gn"
+ ((",fuzzer-no-link") ""))))
+ (replace 'patch-dart-action
+ ;; Path changed in this version
+ (lambda* (#:key inputs propagated-inputs #:allow-other-keys)
+ (substitute* "build/dart/dart_action.gni"
+ ;; FIX: assignment had no effect
+ (("dfe =") "# dfe =")
+ ((".*dart_root/tools/sdks/dart-sdk/bin/snapshots.*" all)
+ (string-append "# " all)))))))))
+ (inputs
+ (replace-inputs
+ dart-2.1.0-dev.6.0
+ `(("zlib"
+ ,(dart-pkg
+ "zlib" "c44fb7248079cc3d5563b14b3f758aee60d6b415"
+ "1r14mnrm7zmz2afp92fqdfbcr5gpjvcy46fs7s4qqrzspkjnpwik"
+ "https://chromium.googlesource.com/chromium/src/third_party/zlib"))
+ ("dart-pkg-bazel-worker"
+ ,(dart-pkg "bazel-worker" "bazel_worker-v0.1.20"
+ "02g4cycbrwr833qkjj4dcq7n9alkq4xmkdrxpmjdjv54ilxg5xx9"))
+ ("dart-pkg-dart2js-info"
+ ,(dart-pkg "dart2js-info" "0.6.0"
+ "1cirqph6yr1dn07979v1p2dyhn01r2c32w2k5ndpkjk7z9cx0bbr"))
+ ("dart-pkg-html"
+ ,(dart-pkg "html" "0.14.0+1"
+ "0kf290mhpr1bklsgc35inpqafhc3wm8amh5a6933y3jiw2dgi94k"))
+ ("dart-pkg-linter"
+ ,(dart-pkg "linter" "0.1.91"
+ "0slmsgm0ficwd85ljqxkzi64jlcwpkzwlnyfcx46plmnzxjvbmbc"))
+ ("dart-pkg-protobuf"
+ ,(dart-pkg "protobuf" "7d34c9e4e552a4f66acce32e4344ae27756a1949"
+ "0ksfqq6a7xbivalwl7knbm7f7ihv8pq19d4j6rwffqdnh9wqza42"))
+ ("dart-pkgtested-dart-style"
+ ,(dart-pkg "dart-style" "1.2.8"
+ "1km62cgp0fyc5zxliq2ny6bzxj2amnjhkkc2rm06x1fv53vll26n")))))
+ (native-inputs
+ (alist-replace
+ "dart" `(,dart-2.1.0-dev.6.0)
+ (alist-replace
+ "gcc" `(,gcc-8)
+ (package-native-inputs dart-2.1.0-dev.6.0))))))
diff --git a/gnu/packages/patches/dart-2.4.0-fix-build-with-2.1.patch b/gnu/packages/patches/dart-2.4.0-fix-build-with-2.1.patch
new file mode 100644
index 0000000000..f9a43e2c25
--- /dev/null
+++ b/gnu/packages/patches/dart-2.4.0-fix-build-with-2.1.patch
@@ -0,0 +1,340 @@
+From 05739627950567885293f42fc4d4661be5e1ac04 Mon Sep 17 00:00:00 2001
+From: nixo <nicolo@nixo.xyz>
+Date: Tue, 24 Nov 2020 10:27:55 +0100
+Subject: [PATCH] Replace unsupported '...' and 'if' in lists
+
+---
+ .../lib/src/analyzer/code_generator.dart | 27 +--
+ .../lib/src/compiler/shared_compiler.dart | 9 +-
+ pkg/dev_compiler/lib/src/kernel/compiler.dart | 169 ++++++++++--------
+ 3 files changed, 121 insertions(+), 84 deletions(-)
+
+diff --git a/pkg/dev_compiler/lib/src/analyzer/code_generator.dart b/pkg/dev_compiler/lib/src/analyzer/code_generator.dart
+index 3ff97b0df18..8ab1afa6855 100644
+--- a/pkg/dev_compiler/lib/src/analyzer/code_generator.dart
++++ b/pkg/dev_compiler/lib/src/analyzer/code_generator.dart
+@@ -4161,19 +4161,24 @@ class CodeGenerator extends Object
+ }
+
+ var location = _getLocation(condition.offset);
+- return js.statement(' if (!#) #.assertFailed(#, #, #, #, #);', [
++ var newvar = [
+ jsCondition,
+ runtimeModule,
+- if (message == null)
+- JS.LiteralNull()
+- else
+- _visitExpression(message),
+- js.escapedString(location.sourceUrl.toString()),
+- // Lines and columns are typically printed with 1 based indexing.
+- js.number(location.line + 1),
+- js.number(location.column + 1),
+- js.escapedString(condition.toSource()),
+- ]);
++ ];
++
++ if (message == null) {
++ newvar.add(JS.LiteralNull());
++ } else {
++ newvar.add(_visitExpression(message));
++ }
++ newvar.addAll([
++ js.escapedString(location.sourceUrl.toString()),
++ // Lines and columns are typically printed with 1 based indexing.
++ js.number(location.line + 1),
++ js.number(location.column + 1),
++ js.escapedString(condition.toSource()),]);
++
++ return js.statement(' if (!#) #.assertFailed(#, #, #, #, #);', newvar);
+ }
+
+ @override
+diff --git a/pkg/dev_compiler/lib/src/compiler/shared_compiler.dart b/pkg/dev_compiler/lib/src/compiler/shared_compiler.dart
+index 6a3182d0607..86741493a69 100644
+--- a/pkg/dev_compiler/lib/src/compiler/shared_compiler.dart
++++ b/pkg/dev_compiler/lib/src/compiler/shared_compiler.dart
+@@ -213,8 +213,13 @@ abstract class SharedCompiler<Library, Class, InterfaceType, FunctionNode> {
+ /// dart.asInt(<expr>)
+ ///
+ @protected
+- JS.Expression runtimeCall(String code, [List<Object> args]) =>
+- js.call('#.$code', <Object>[runtimeModule, ...?args]);
++ JS.Expression runtimeCall(String code, [List<Object> args]) {
++ var obj = <Object>[runtimeModule];
++ if (args != null) {
++ obj.addAll(args);
++ }
++ return js.call('#.$code', obj);
++ }
+
+ /// Calls [runtimeCall] and uses `toStatement()` to convert the resulting
+ /// expression into a statement.
+diff --git a/pkg/dev_compiler/lib/src/kernel/compiler.dart b/pkg/dev_compiler/lib/src/kernel/compiler.dart
+index 531ca405cff..81424212e4c 100644
+--- a/pkg/dev_compiler/lib/src/kernel/compiler.dart
++++ b/pkg/dev_compiler/lib/src/kernel/compiler.dart
+@@ -554,9 +554,10 @@ class ProgramCompiler extends Object
+
+ var genericArgs = [
+ typeConstructor,
+- if (deferredBaseClass != null && deferredBaseClass.isNotEmpty)
+- js.call('(#) => { #; }', [jsFormals, deferredBaseClass]),
+ ];
++ if (deferredBaseClass != null && deferredBaseClass.isNotEmpty) {
++ genericArgs.add(js.call('(#) => { #; }', [jsFormals, deferredBaseClass]));
++ }
+
+ var genericCall = runtimeCall('generic(#)', [genericArgs]);
+
+@@ -726,11 +727,14 @@ class ProgramCompiler extends Object
+ var jsParams = _emitParameters(ctor.function);
+ _currentUri = savedUri;
+ var name = ctor.name.name;
+- var ctorBody = [
+- if (mixinCtor != null) mixinCtor,
+- if (name != '' || hasUnnamedSuper)
+- _emitSuperConstructorCall(className, name, jsParams),
++ var ctorBody = <JS.Statement>[
+ ];
++ if (mixinCtor != null) {
++ ctorBody.add(mixinCtor);
++ }
++ if (name != '' || hasUnnamedSuper) {
++ ctorBody.add(_emitSuperConstructorCall(className, name, jsParams));
++ }
+ body.add(_addConstructorToClass(
+ c, className, name, JS.Fun(jsParams, JS.Block(ctorBody))));
+ }
+@@ -1294,10 +1298,10 @@ class ProgramCompiler extends Object
+
+ if (emitMetadata) {
+ var constructors = <JS.Property>[];
+- var allConstructors = [
+- ...c.constructors,
+- ...c.procedures.where((p) => p.isFactory),
+- ];
++ var allConstructors = [ ];
++ allConstructors.addAll(c.constructors);
++ allConstructors.addAll(c.procedures.where((p) => p.isFactory));
++
+ for (var ctor in allConstructors) {
+ var memberName = _constructorName(ctor.name.name);
+ var type = _emitAnnotatedFunctionType(
+@@ -3032,10 +3036,13 @@ class ProgramCompiler extends Object
+ // (sync*/async/async*). Our code generator assumes it can emit names for
+ // named argument initialization, and sync* functions also emit locally
+ // modified parameters into the function's scope.
+- var parameterNames = {
+- for (var p in f.positionalParameters) p.name,
+- for (var p in f.namedParameters) p.name,
+- };
++ var parameterNames = Set<String>();
++ for (var p in f.positionalParameters) {
++ parameterNames.add(p.name);
++ }
++ for (var p in f.namedParameters) {
++ parameterNames.add(p.name);
++ }
+
+ return jsBody.toScopedBlock(parameterNames);
+ }
+@@ -3205,23 +3212,27 @@ class ProgramCompiler extends Object
+ }
+
+ var encodedConditionSource = node
+- .enclosingComponent.uriToSource[node.location.file].source
+- .sublist(node.conditionStartOffset, node.conditionEndOffset);
++ .enclosingComponent.uriToSource[node.location.file].source
++ .sublist(node.conditionStartOffset, node.conditionEndOffset);
+ var conditionSource = utf8.decode(encodedConditionSource);
+ var location = _getLocation(node.conditionStartOffset);
+- return js.statement(' if (!#) #.assertFailed(#, #, #, #, #);', [
++ var newvar = [
+ jsCondition,
+ runtimeModule,
+- if (node.message == null)
+- JS.LiteralNull()
+- else
+- _visitExpression(node.message),
+- js.escapedString(location.sourceUrl.toString()),
+- // Lines and columns are typically printed with 1 based indexing.
+- js.number(location.line + 1),
+- js.number(location.column + 1),
+- js.escapedString(conditionSource),
+- ]);
++ ];
++ if (node.message == null) {
++ newvar.add(JS.LiteralNull());
++ } else {
++ newvar.add(_visitExpression(node.message));
++ }
++ newvar.addAll([
++ js.escapedString(location.sourceUrl.toString()),
++ // Lines and columns are typically printed with 1 based indexing.
++ js.number(location.line + 1),
++ js.number(location.column + 1),
++ js.escapedString(conditionSource)]);
++
++ return js.statement(' if (!#) #.assertFailed(#, #, #, #, #);', newvar);
+ }
+
+ static bool isBreakable(Statement stmt) {
+@@ -3624,15 +3635,17 @@ class ProgramCompiler extends Object
+ _emitVariableDef(exceptionParameter),
+ runtimeModule,
+ _emitVariableRef(caughtError)
+- ]),
+- if (stackTraceParameter != null)
+- js.statement('let # = #.stackTrace(#)', [
++ ]) ];
++
++ if (stackTraceParameter != null) {
++ catchStatements.add(js.statement('let # = #.stackTrace(#)', [
+ _emitVariableDef(stackTraceParameter),
+ runtimeModule,
+ _emitVariableRef(caughtError)
+- ]),
+- catchBody,
+- ];
++ ]));
++ }
++ catchStatements.add(catchBody);
++
+ _rethrowParameter = savedRethrow;
+ return JS.Catch(_emitVariableDef(caughtError), JS.Block(catchStatements));
+ }
+@@ -4425,12 +4438,14 @@ class ProgramCompiler extends Object
+ isGetter: !setter, isSetter: setter);
+ } else {
+ var function = member.function;
+- var params = [
+- ..._emitTypeFormals(function.typeParameters),
+- for (var param in function.positionalParameters)
+- JS.Identifier(param.name),
+- if (function.namedParameters.isNotEmpty) namedArgumentTemp,
+- ];
++ var params = [ ]..addAll(_emitTypeFormals(function.typeParameters));
++ for (var param in function.positionalParameters) {
++ params.add(JS.Identifier(param.name));
++ }
++
++ if (function.namedParameters.isNotEmpty) {
++ params.add(namedArgumentTemp);
++ }
+
+ var fn = js.fun(
+ 'function(#) { return super[#](#); }', [params, jsName, params]);
+@@ -4543,18 +4558,24 @@ class ProgramCompiler extends Object
+ List<JS.Expression> _emitArgumentList(Arguments node,
+ {bool types = true, Member target}) {
+ types = types && _reifyGenericFunction(target);
+- return [
+- if (types) for (var typeArg in node.types) _emitType(typeArg),
+- for (var arg in node.positional)
+- if (arg is StaticInvocation &&
+- isJSSpreadInvocation(arg.target) &&
+- arg.arguments.positional.length == 1)
+- JS.Spread(_visitExpression(arg.arguments.positional[0]))
+- else
+- _visitExpression(arg),
+- if (node.named.isNotEmpty)
+- JS.ObjectInitializer(node.named.map(_emitNamedExpression).toList()),
+- ];
++ var newvar = <JS.Expression>[];
++ if (types) {
++ for (var typeArg in node.types) {
++ newvar.add(_emitType(typeArg));
++ }
++ }
++ for (var arg in node.positional) {
++ if (arg is StaticInvocation && isJSSpreadInvocation(arg.target) &&
++ arg.arguments.positional.length == 1) {
++ newvar.add(JS.Spread(_visitExpression(arg.arguments.positional[0])));
++ } else {
++ newvar.add(_visitExpression(arg));
++ }
++ }
++ if (node.named.isNotEmpty) {
++ newvar.add(JS.ObjectInitializer(node.named.map(_emitNamedExpression).toList()));
++ }
++ return newvar;
+ }
+
+ JS.Property _emitNamedExpression(NamedExpression arg) {
+@@ -5052,12 +5073,14 @@ class ProgramCompiler extends Object
+
+ @override
+ JS.Expression visitMapLiteral(MapLiteral node) {
+- var entries = [
+- for (var e in node.entries) ...[
+- _visitExpression(e.key),
+- _visitExpression(e.value),
+- ],
+- ];
++ var entries = <JS.Expression>[ ];
++
++ for (var e in node.entries) {
++ entries.addAll([
++ _visitExpression(e.key),
++ _visitExpression(e.value),
++ ]);
++ }
+
+ // TODO(markzipan): remove const check when we use front-end const eval
+ if (!node.isConst) {
+@@ -5152,10 +5175,12 @@ class ProgramCompiler extends Object
+ @override
+ JS.Expression visitBlockExpression(BlockExpression node) {
+ var jsExpr = _visitExpression(node.value);
+- var jsStmts = [
+- for (var s in node.body.statements) _visitStatement(s),
+- JS.Return(jsExpr),
+- ];
++ var jsStmts = [ ];
++ for (var s in node.body.statements) {
++ jsStmts.add(_visitStatement(s));
++ }
++ jsStmts.add(JS.Return(jsExpr));
++
+ var jsBlock = JS.Block(jsStmts);
+ // BlockExpressions with async operations must be constructed
+ // with a generator instead of a lambda.
+@@ -5277,12 +5302,14 @@ class ProgramCompiler extends Object
+
+ @override
+ JS.Expression visitMapConstant(MapConstant node) {
+- var entries = [
+- for (var e in node.entries) ...[
+- visitConstant(e.key),
+- visitConstant(e.value),
+- ],
+- ];
++ var entries = [ ];
++ for (var e in node.entries) {
++ entries.addAll([
++ visitConstant(e.key),
++ visitConstant(e.value),
++ ]);
++ }
++
+ return _emitConstMap(node.keyType, node.valueType, entries);
+ }
+
+@@ -5305,10 +5332,10 @@ class ProgramCompiler extends Object
+
+ var type = visitInterfaceType(node.getType(types) as InterfaceType);
+ var prototype = js.call("#.prototype", [type]);
+- var properties = [
+- JS.Property(propertyName("__proto__"), prototype),
+- for (var e in node.fieldValues.entries) entryToProperty(e),
+- ];
++ var properties = [ JS.Property(propertyName("__proto__"), prototype) ];
++ for (var e in node.fieldValues.entries) {
++ properties.add(entryToProperty(e));
++ }
+ return canonicalizeConstObject(
+ JS.ObjectInitializer(properties, multiline: true));
+ }
+--
+2.29.2
+
--
2.29.2
nixo wrote 4 years ago
[PATCH v2 14/15] gnu: Add dart-2.7.2.
(address . 44926@debbugs.gnu.org)(name . nixo)(address . nicolo@nixo.xyz)
20201129173414.8984-14-nicolo@nixo.xyz
* gnu/packages/dart.scm (dart-2.7.2): New variable.
---
gnu/packages/dart.scm | 62 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 62 insertions(+)

Toggle diff (72 lines)
diff --git a/gnu/packages/dart.scm b/gnu/packages/dart.scm
index 7f30fb7fc4..51287c4dc7 100644
--- a/gnu/packages/dart.scm
+++ b/gnu/packages/dart.scm
@@ -1219,3 +1219,65 @@
(alist-replace
"dart" `(,dart-2.5.0)
(package-native-inputs dart-2.5.0)))))
+
+(define-public dart-2.7.2
+ (package
+ (inherit dart-2.6.1)
+ (version "2.7.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/dart-lang/sdk")
+ (commit version)))
+ (sha256
+ (base32
+ "1gyi76rwznxxr09kslr3glhw1l76qc25a2y4pwqqg9rgpl52pcbd"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments dart-2.6.1)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-before 'configure 'link-pthread
+ (lambda* _
+ (substitute* "build/toolchain/gcc_toolchain.gni"
+ (("\\$libs_section_postfix")
+ "$libs_section_postfix -lpthread"))))))))
+ (inputs
+ (append
+ `(("dart-pkg-pedantic"
+ ,(dart-pkg "pedantic" "v1.8.0"
+ "0bmdmf1bgxclh365ca7c05cpz7wabyis1ax65r3pj7ksjg4p8hp9")))
+ (replace-inputs
+ dart-2.6.1
+ `(("dart-pkgtested-package-config"
+ ,(dart-pkg "package-config" "2453cd2e78c2db56ee2669ced17ce70dd00bf576"
+ "0wg5dgrk584zmxkcla88641i6w4ba7fbpw8l5ghzqv1v8azqvr7i"))
+ ("dart-pkgtested-dart-style"
+ ,(dart-pkg "dart-style" "1.3.2"
+ "0a9vgidqxva8prw00mig2irlyj9a4swcwyw0j9n5yxjhg006j43v"))
+ ("dart-pkg-bazel-worker"
+ ,(dart-pkg "bazel-worker" "v0.1.22"
+ "09wmwvz3vlm9x103i6hy6jrz6rvldwnf8ii1cyj95sx05qam5csz"))
+ ("dart-pkg-dartdoc"
+ ,(dart-pkg "dartdoc" "v0.29.1"
+ "0aambr3588m1aqsafm0anqbbn3ajvzj3jgkjvb7qgxi9ahx3hw9j"))
+ ("dart-pkg-linter"
+ ,(dart-pkg "linter" "0.1.104"
+ "1wdqdwjh3r4aiadcaf9qd5hyx6krclx397riy8f5xcravm1kn9jg"))
+ ("dart-pkg-protobuf"
+ ,(dart-pkg "protobuf" "3746c8fd3f2b0147623a8e3db89c3ff4330de760"
+ "09zgplljiyffqqnd0ylgzagf31b1dgw8qy35r4pwgmlh0xpc1aic"))
+ ("dart-pkg-pub"
+ ,(dart-pkg "pub" "d15067931a6b671a1c9dcc98b5923347676269cf"
+ "0h8lfyzhz0misgfg8hxg72rvm68miscqfr1h4nmjix9rzw76d0vw"))
+ ("dart-pkg-watcher"
+ ,(dart-pkg "watcher" "0.9.7+13"
+ "1ilzh97l60srga2j2iiv0ybzjxjdy166vsignp62smjbxhl0p2p9"))
+ ("dart-pkg-yaml"
+ ,(dart-pkg
+ "yaml" "2.2.0"
+ "1y5xwps838yys9aw72n2300p2r5jjvz6v4klsp38y55f9kfh2dax"))))))
+ (native-inputs
+ (alist-replace
+ "dart" `(,dart-2.6.1)
+ (package-native-inputs dart-2.6.1)))))
--
2.29.2
nixo wrote 4 years ago
[PATCH v2 15/15] gnu: Add dart-2.8.4.
(address . 44926@debbugs.gnu.org)(name . nixo)(address . nicolo@nixo.xyz)
20201129173414.8984-15-nicolo@nixo.xyz
* gnu/packages/dart.scm (dart-2.8.4): New variable.
---
gnu/packages/dart.scm | 83 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 83 insertions(+)

Toggle diff (93 lines)
diff --git a/gnu/packages/dart.scm b/gnu/packages/dart.scm
index 51287c4dc7..0700b34670 100644
--- a/gnu/packages/dart.scm
+++ b/gnu/packages/dart.scm
@@ -1281,3 +1281,86 @@
(alist-replace
"dart" `(,dart-2.6.1)
(package-native-inputs dart-2.6.1)))))
+
+(define-public dart-2.8.4
+ (package
+ (inherit dart-2.7.2)
+ (version "2.8.4")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/dart-lang/sdk")
+ (commit version)))
+ (sha256
+ (base32
+ "0wgchkqplx6bjgb901rm583iqbmi7fy29c1xzhlddgmnz1x7yh6c"))))
+ (inputs
+ (append
+ `(("dart-pkg-stagehand"
+ ,(dart-pkg "stagehand" "v3.3.7"
+ "0xwssdfcl3isrfycazqhar52dms20zvg9g4zn8pmifc86zfmkcfh")))
+ (replace-inputs
+ dart-2.7.2
+ `(("dart-pkgtested-package-config"
+ ,(dart-pkg "package-config" "v1.9.2"
+ "0gaws9v3w95fmgn74wiyif0fdjx0dvivwpzk6a3gmqjp0jrr1rqh"))
+ ("dart-pkg-args"
+ ,(dart-pkg "args" "1.6.0"
+ "0lwms9wysfwk1dbzrgas3qfjmxrz07n2hlzvyb21dr5scjmvm8sx"))
+ ("dart-pkg-async"
+ ,(dart-pkg "async" "2.4.1"
+ "0447x7v58y8fqj3zfykbpy4lmp5w39p3psxa7kk3idjvq3rdqf53"))
+ ("dart-pkg-cli-util"
+ ,(dart-pkg "cli-util" "4ad7ccbe3195fd2583b30f86a86697ef61e80f41"
+ "1hgnck9g39z1vcnf0lysmb5sj4917l51p7hqwvkkf475nwdhfnxm"))
+ ("dart-pkg-dartdoc"
+ ,(dart-pkg "dartdoc" "v0.30.3"
+ "0xks7srhg0zwl6q9rzj9ralh91144yvhi378m144ydma4b9c3vac"))
+ ("dart-pkg-http-multi-server"
+ ,(dart-pkg
+ "http_multi_server" "ea269f79321d659208402088f3297e8920a88ee6"
+ "0lfkw7kkghdm29h78hafjxyp01aj9whc6s9z0dhyyc56aar4jfhf"))
+ ("dart-pkg-intl"
+ ,(dart-pkg "intl" "0.16.1"
+ "0a87y8vy8zm2cpyq83f7anpfq0a6kgpphcl7cq3s96b0k9dvfpkl"))
+ ("dart-pkg-linter"
+ ,(dart-pkg "linter" "0.1.114"
+ "1cpkqb4pzks3xphx1vilplfmmlsxhs28pfzb9k0c70wgzm4biw91"))
+ ("dart-pkg-matcher"
+ ,(dart-pkg "matcher" "0.12.5"
+ "0y0qnx96sxrqfw92zy9ln678isbb6cl1gfk6lisgpch3q5d7q7f1"))
+ ("dart-pkg-path"
+ ,(dart-pkg "path" "1.6.2"
+ "0ag6bplqw7rpysgv77nsgx86758add9jszrp4v68xhld69vn5pvd"))
+ ("dart-pkg-pub"
+ ,(dart-pkg "pub" "3606265962da4248d34d352aa3d170aae4496a90"
+ "0sa9yvb4zx20v1h85d3i3hv917hp5hwcghrvzcl1r9afsprkjdln"))
+ ("dart-pkg-pub-semver"
+ ,(dart-pkg "pub-semver" "v1.4.4"
+ "1yg9fl7ynnrp8c8iax070zx6dyakj8fbghzrxmx4rnblak63ijsj"))
+ ("dart-pkg-shelf-packages-handler"
+ ,(dart-pkg "shelf-packages-handler" "2.0.0"
+ "1nhvj92kjag6ids8y4ld99p3v8qk6fgygc89yyi98xf3v6ijr01b"))
+ ("dart-pkg-source-map-stack-trace"
+ ,(dart-pkg "source-map-stack-trace" "2.0.0"
+ "0vq22isaypcfgrajfv0f6ww74cskbl8m171kq65rg9syxs50a96g"))
+ ("dart-pkg-source-span"
+ ,(dart-pkg "source-span" "1.7.0"
+ "055lw4x27am90shz4wa4xlnv44ndk12gd0965ffidys705xfk1cg"))
+ ("dart-pkg-stream-channel"
+ ,(dart-pkg "stream-channel" "2.0.0"
+ "02hs73jj4yg9sqqw2wjrrf179svdgrzamiaqmpncz3n3x12jk0hl"))
+ ("dart-pkg-watcher"
+ ,(dart-pkg "watcher" "0.9.7+14"
+ "1kgxisvfbhvr5q30776plh3xn7iy0ckhy4wpzsvp2pbd63kmi2wa"))
+ ("dart-pkg-web-socket-channel"
+ ,(dart-pkg "web-socket-channel" "1.0.15"
+ "1dcc91f1q6fl6jzyqaplg6cc5k67wcczb93z7gqnk6lijlqlmy6g"))
+ ("dart-pkg-yaml"
+ ,(dart-pkg
+ "yaml" "2.2.0"
+ "1y5xwps838yys9aw72n2300p2r5jjvz6v4klsp38y55f9kfh2dax"))))))
+ (native-inputs
+ (alist-replace "dart" `(,dart-2.7.2)
+ (package-native-inputs dart-2.7.2)))))
--
2.29.2
nixo wrote 4 years ago
[PATCH v2 03/15] gnu: Add dart-2.0.0-dev.8.0.
(address . 44926@debbugs.gnu.org)(name . nixo)(address . nicolo@nixo.xyz)
20201129173414.8984-3-nicolo@nixo.xyz
* gnu/packages/dart.scm (dart-2.0.0-dev.8.0): New variable.
* gnu/packages/patches (dart-2.0.0-dev.8-disable-analytics.patch): New file.
* gnu/local.mk: Add it.
---
gnu/local.mk | 1 +
gnu/packages/dart.scm | 391 +-
.../dart-2.0.0-dev.8-disable-analytics.patch | 192411 +++++++++++++++
3 files changed, 192801 insertions(+), 2 deletions(-)
create mode 100644 gnu/packages/patches/dart-2.0.0-dev.8-disable-analytics.patch

Toggle diff (416 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 359015415c..ee4ade0139 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -905,6 +905,7 @@ dist_patch_DATA = \
%D%/packages/patches/cursynth-wave-rand.patch \
%D%/packages/patches/cvs-CVE-2017-12836.patch \
%D%/packages/patches/cyrus-sasl-ac-try-run-fix.patch \
+ %D%/packages/patches/dart-2.0.0-dev.8-disable-analytics.patch \
%D%/packages/patches/date-output-pkg-config-files.patch \
%D%/packages/patches/datefudge-gettimeofday.patch \
%D%/packages/patches/dbacl-include-locale.h.patch \
diff --git a/gnu/packages/dart.scm b/gnu/packages/dart.scm
index f8af8696bc..07e3dcee21 100644
--- a/gnu/packages/dart.scm
+++ b/gnu/packages/dart.scm
@@ -18,10 +18,20 @@
(define-module (gnu packages dart)
#:use-module ((guix licenses) #:prefix license:)
- #:use-module (guix build utils)
+ #:use-module (guix build-system gnu)
#:use-module (guix git-download)
#:use-module (guix packages)
- #:use-module (guix utils))
+ #:use-module (guix utils)
+ #:use-module (gnu packages)
+ #:use-module (gnu packages build-tools)
+ #:use-module (gnu packages gcc)
+ #:use-module (gnu packages golang)
+ #:use-module (gnu packages libunwind)
+ #:use-module (gnu packages ninja)
+ #:use-module (gnu packages nss)
+ #:use-module (gnu packages perl)
+ #:use-module (gnu packages python)
+ #:use-module (gnu packages python-xyz))
(define* (dart-pkg name tag hash #:optional
(url (string-append
@@ -39,3 +49,380 @@
tag)))
(sha256 (base32 hash))))
+(define-public dart-2.0.0-dev.8.0
+ (package
+ (name "dart")
+ (version "2.0.0-dev.8.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/dart-lang/sdk")
+ (commit version)))
+ (file-name (string-append name "-" version))
+ (sha256
+ (base32
+ "17870yvi4flcraw3ihs694g4r0fmmmj2qmz9n4r311pizxzagjkk"))
+ (modules '((guix build utils)))
+ ;; Delete a folder containing a pre-build windows .dll
+ (snippet
+ '(delete-file-recursively "build/win"))
+ (patches
+ (search-patches "dart-2.0.0-dev.8-disable-analytics.patch"))))
+ (arguments
+ `(#:configure-flags
+ ;; FIXME: Do not hardcode the target? Don't know if when fixed this
+ ;; package will work on other targets
+ (list "host_cpu=\"x64\""
+ "target_cpu=\"x64\""
+ "dart_target_arch=\"x64\""
+ "target_os=\"linux\""
+ "dart_runtime_mode=\"develop\""
+ "dart_debug=false"
+ "is_debug=false"
+ "is_release=true"
+ "is_product=false"
+ "is_clang=false"
+ "use_goma=false"
+ "goma_dir=\"None\""
+ "dart_use_tcmalloc=true"
+ "dart_use_fallback_root_certificates=true"
+ "dart_zlib_path = \"//runtime/bin/zlib\""
+ "dart_platform_sdk=false"
+ "is_asan=false"
+ "is_msan=false"
+ "is_tsan=false"
+ "dart_snapshot_kind=\"app-jit\"")
+ #:phases
+ (modify-phases %standard-phases
+ ;; no check target. Tests are available, but I should check how to
+ ;; run them
+ (delete 'check)
+ (add-before 'configure 'add-git-revision
+ (lambda _
+ (with-output-to-file "tools/GIT_REVISION"
+ (lambda () (display "0")))))
+ (add-before 'configure 'add-third-party-src
+ ;; Copy some deps to third_party, as required by the build system
+ ;; TODO: LINK THEM INSTEAD OF COPYING
+ (lambda* (#:key inputs #:allow-other-keys)
+ (use-modules (ice-9 regex) (ice-9 match))
+ ;; place pkg inputs in the right third_party folder
+ ;; (either pkg or pkgtested) based on their input name
+ (define (dart-copy-deps-to-third-party-dir pkgdep)
+ (copy-recursively
+ (assoc-ref inputs pkgdep)
+ (let* ((out "third_party/")
+ (text
+ (if (string-match "pkgtested" pkgdep)
+ (string-append out "pkg_tested/"
+ (regexp-substitute
+ #f
+ (string-match "dart-pkgtested-" pkgdep)
+ 'post))
+ (string-append out "pkg/"
+ (regexp-substitute
+ #f
+ (string-match "dart-pkg-" pkgdep)
+ 'post)))))
+ (if (string-match "-" text)
+ (regexp-substitute/global
+ #f "-" text 'pre "_" 'post)
+ text))))
+ (map (lambda (input)
+ (let ((pkg (car input)))
+ ;; Copy only dependencies starting with "dart-"
+ (when (string-match "dart-" pkg)
+ (dart-copy-deps-to-third-party-dir pkg))))
+ inputs)
+ ;; Do the same for other required packages
+ (copy-recursively (assoc-ref inputs "boringssl")
+ "third_party/boringssl/src")
+ (copy-recursively (assoc-ref inputs "gperftools")
+ "third_party/tcmalloc/gperftools")
+ (copy-recursively (assoc-ref inputs "root-certificates")
+ "third_party/root_certificates")
+ (copy-recursively (assoc-ref inputs "zlib")
+ "third_party/zlib")
+ (copy-recursively (assoc-ref inputs "observatory-pub-packages")
+ "third_party/observatory_pub_packages")))
+ (add-after 'add-third-party-src 'generate-third-party-build-files
+ (lambda* (#:key inputs #:allow-other-keys)
+ (with-directory-excursion "third_party/boringssl"
+ ;; go requires home to be set
+ (setenv "HOME" "/tmp/")
+ (invoke
+ (string-append (assoc-ref inputs "python") "/bin/python2")
+ "src/util/generate_build_files.py" "gn")
+ (map
+ (lambda (file)
+ (copy-file
+ (string-append (assoc-ref inputs "boringssl-gen") "/" file)
+ file))
+ '("BUILD.gn" "BUILD.generated.gni")))))
+ (add-before 'configure 'enable-dtags
+ ;; adds the RUNPATH
+ (lambda* (#:key inputs propagated-inputs #:allow-other-keys)
+ (substitute* "build/config/gcc/BUILD.gn"
+ (("disable-new-dtags") "enable-new-dtags"))))
+ (replace 'configure
+ (lambda* (#:key configure-flags #:allow-other-keys)
+ (let ((args (string-join configure-flags " ")))
+ (mkdir "out")
+ ;; Generate ninja build files.
+ (invoke "gn" "gen" "out/Release"
+ (string-append "--args=" args))
+ ;; Print the full list of supported arguments as well as
+ ;; their current status for convenience.
+ (format #t "Dumping configure flags...\n")
+ (invoke "gn" "args" "out/Release" "--list"))))
+ (replace 'build
+ (lambda* (#:key configure-flags #:allow-other-keys)
+ (invoke "ninja" "all" "-C" "out/Release")))
+ ;; no install phase
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ ;; This should depend on the architecture as before
+ (copy-recursively "out/Release/dart-sdk/" out)))))))
+ (inputs
+ `(("zlib"
+ ,(dart-pkg
+ "zlib" "c3d0a6190f2f8c924a05ab6cc97b8f975bddd33f"
+ "0fr3h9krramy0jclbacjnwbn0lzvjm6b809llhaz56mbd90i4yl4"
+ "https://chromium.googlesource.com/chromium/src/third_party/zlib"))
+ ("libunwind" ,libunwind)
+ ("nspr" ,nspr)
+ ("nss" ,nss)
+ ("boringssl"
+ ,(dart-pkg
+ "boringssl" "d519bf6be0b447fb80fbc539d4bff4479b5482a2"
+ "137q647ha8x770wv3jj2kgjv3lj9qjcv191m51vkp3a7zqhhaknv"
+ "https://boringssl.googlesource.com/boringssl"))
+ ("boringssl-gen"
+ ,(dart-pkg "boringssl-gen" "d2b56d1b7657e52eb5a1f075968c773aa3e53614"
+ "1pn2hn0i9fwd27i695q4av3bymm11pmydlbv4hcafslhggq0md19"))
+ ("gperftools"
+ ,(dart-pkg "gperftools" "02eeed29df112728564a5dde6417fa4622b57a06"
+ "1j5yx7v1g8ljzv5hs2452q736gdf1xm5x9w5d1csm5bjlryxaykm"
+ "https://github.com/gperftools/gperftools"))
+ ("root-certificates"
+ ,(dart-pkg "root-certificates"
+ "16ef64be64c7dfdff2b9f4b910726e635ccc519e"
+ "1kxadamhz03dlvm3j5xxqjgn0jasgskyjx11ysm3a431ma5j9182"))
+ ("observatory-pub-packages"
+ ,(dart-pkg "observatory-pub-packages"
+ "4c282bb240b68f407c8c7779a65c68eeb0139dc6"
+ "0p09r24q37i4hyz3n2j75lx9a252zr81jcynap61nfh415xlcv3z"))
+ ("dart-pkg-args"
+ ,(dart-pkg "args" "0.13.7"
+ "0y3f1kaplxmanw5gqm84l9wqx2nl1vrk11m8kdqqwc7n73fc4kdl"))
+ ("dart-pkg-async"
+ ,(dart-pkg "async" "2.0.0"
+ "1r0fqdh633426p2h9ynb126s58l30jj3mj0bzvjigbklam7vfjgc"))
+ ("dart-pkg-barback"
+ ,(dart-pkg "barback" "0.15.2+13"
+ "0n532b2as62nkzq7w9jaxk6gkl78il1kq3q0s1xgcdazmbzx5fb1"))
+ ("dart-pkg-bazel-worker"
+ ,(dart-pkg "bazel-worker" "v0.1.4"
+ "1cc4jvx9qba76ws2l7ijr8kvl8yydfak965gwrgb88f2r1qp2q46"))
+ ("dart-pkg-charcode"
+ ,(dart-pkg "charcode" "v1.1.1"
+ "0907828insqsr0ffyz4n2xns4qc77brnm7zv0a6965b53b84pk8b"))
+ ("dart-pkg-cli-util"
+ ,(dart-pkg "cli-util" "0.1.2+1"
+ "09nqdkyipnb0734ci554gxrl9cic528mlhfad9wibcg6kx7y6gra"))
+ ("dart-pkg-collection"
+ ,(dart-pkg "collection" "1.14.3"
+ "1rdgvrj67vj27k2052h5k31xc6rays4p4j27a122c1ikxnb4i3bh"))
+ ("dart-pkg-convert"
+ ,(dart-pkg "convert" "2.0.1"
+ "1v0b6vgzp6i37jja2d2aim6dmig8xfjhi8b553a1909n5pzqxp2g"))
+ ("dart-pkg-crypto"
+ ,(dart-pkg "crypto" "2.0.2+1"
+ "12v5rw189vrk2n2ryxkf8qcbdx8hf3bf33i552439lzhz0czkvcq"))
+ ("dart-pkg-csslib"
+ ,(dart-pkg "csslib" "0.14.1"
+ "0zlmbg6vwwc4cha8l2xv73klwzdqg6b43qmhlca0f62lr7k6014w"))
+ ("dart-pkg-dart2js-info"
+ ,(dart-pkg "dart2js_info" "0.5.5+1"
+ "05rdp96n9rxkjyw7lmn3a9hlbsaxpdn8wp8qnsfjmqv3i8vcypvj"))
+ ("dart-pkg-dartdoc"
+ ,(dart-pkg "dartdoc" "v0.13.0+3"
+ "1v85510bvjhllr00hgabvn737bh791x1m14qsv7zbxhqnsy2jafj"))
+ ("dart-pkg-fixnum"
+ ,(dart-pkg "fixnum" "0.10.5"
+ "01j7sj4mnkaxam1bpmhvlxl817dcck92xzpk66m7qbccm58c0giw"))
+ ("dart-pkg-func"
+ ,(dart-pkg "func" "25eec48146a58967d75330075ab376b3838b18a8"
+ "0xcfnca5sa5hc62g14xx11qqv9xjamsaqqn1cmldb917qnxb7lkk"))
+ ("dart-pkg-glob"
+ ,(dart-pkg "glob" "1.1.5"
+ "1lbd7lkxvw0q5zvz2hxvc035mxakmzcq08lwwr25v56s9ybavh93"))
+ ("dart-pkg-html"
+ ,(dart-pkg "html" "0.13.2"
+ "0w0gn8camhqhclmlf5g1mp03nssl2gyghqkmcz0zrvkicc1d5r1s"))
+ ("dart-pkg-http"
+ ,(dart-pkg "http" "0.11.3+14"
+ "1a1k8m2gp8a02q9bw40bqj7ad9yx44ap0w4xr7s26lridi7isylc"))
+ ("dart-pkg-http-multi-server"
+ ,(dart-pkg "http_multi_server" "2.0.4"
+ "09x4alr181p6s3zxqflgmhglglxr4aaaz6ys7pp0r715dq50qz4n"))
+ ("dart-pkg-http-parser"
+ ,(dart-pkg "http-parser" "3.1.1"
+ "18p8cqanxbxsxk3wwvisgb1bxdy83vkh3l11h0cys7gxrz6z2g12"))
+ ("dart-pkg-http-throttle"
+ ,(dart-pkg "http-throttle" "1.0.1"
+ "1q0pv1px5rd7zjd799pnq5zcr825ya1yqnxyvdr91rlga621hdbj"))
+ ("dart-pkg-intl"
+ ,(dart-pkg "intl" "0.15.2"
+ "0vd0a3pqmfs03kf12mmg0rrpian0f35ja0x332mr7cx8h9d7pmqx"))
+ ("dart-pkg-isolate"
+ ,(dart-pkg "isolate" "1.1.0"
+ "12m97zhm8qwpraf6nyvj1nawssygrwz0zka7843ayj3vxx6j34xr"))
+ ("dart-pkg-json-rpc-2"
+ ,(dart-pkg "json_rpc_2" "2.0.4"
+ "1q2x6gy7l7agr930k4r6vncfzjcnp43chq9fwxfa0p0nyccnixz3"))
+ ("dart-pkg-linter"
+ ,(dart-pkg "linter" "0.1.39"
+ "0wfd6bzfny5bis3r2ygj89kyd2gl618x7hk06qp4h9nvbpsvvz0n"))
+ ("dart-pkg-logging"
+ ,(dart-pkg "logging" "0.11.3+1"
+ "180w376jz2wmfijcfg07ygfpc6i68i4zibw2421xvwcjhi0q07kv"))
+ ("dart-pkg-markdown"
+ ,(dart-pkg "markdown" "0.11.4"
+ "009qw47k3lrl2fkdn378l41dga493alspywrk3z93yy1pqaf1j5n"))
+ ("dart-pkg-matcher"
+ ,(dart-pkg "matcher" "0.12.1+4"
+ "1q0hbcc5ys5zpml7blsyj0d1f42w67vr6x19vxg34sra3bv0h2xx"))
+ ("dart-pkg-mime"
+ ,(dart-pkg "mime" "0.9.4"
+ "1bh4xla0qlaz9cm1qgxqq57l76b2zh5qqk9pax7sc57s79zi1nmz"))
+ ("dart-pkg-mockito"
+ ,(dart-pkg "mockito" "2.0.2"
+ "1q1zlv3fwfjbmwm141wj19vglx15s8xkqzdsqz9hhv6gg7h45gsl"))
+ ("dart-pkg-mustache4dart"
+ ,(dart-pkg "mustache4dart" "v2.1.0"
+ "0wsmg2xvpp2h9rqcg65icymh2s9hifq6v700mni65ky33dah9ji1"
+ "https://github.com/valotas/mustache4dart"))
+ ("dart-pkg-oauth2"
+ ,(dart-pkg "oauth2" "1.1.0"
+ "1519799j61sdka6p1n6ba768v5a8q4q9w6y957dzqigwaf19p9v5"))
+ ("dart-pkg-path"
+ ,(dart-pkg "path" "1.4.2"
+ "0ld39rpzla8wd4c2kx1kycdk66cwypklxki58nb18959j2749fbi"))
+ ("dart-pkg-plugin"
+ ,(dart-pkg "plugin" "0.2.0"
+ "10sgglzpwr9hkdhr6r4d1kvazv49zdhc9cr2asxdk5531347kk9m"))
+ ("dart-pkg-pool"
+ ,(dart-pkg "pool" "1.3.3"
+ "1cljnzsrbjgkif8rj1vxrzp5rz2xak265pasachdcg4yh2hl0y7d"))
+ ("dart-pkg-protobuf"
+ ,(dart-pkg "protobuf" "0.5.4"
+ "1wjb8da0da0gda0f83dl2dvl5w4a6gvq5xcg1yrgg3xjs7gzy8dd"))
+ ("dart-pkg-pub"
+ ,(dart-pkg "pub" "cde958f157d3662bf968bcbed05580d5c0355e89"
+ "1g1cw4c0811l3pvc80fvb7s04shzxvxrcb25195s7kjjfiivgqi4"))
+ ("dart-pkg-pub-semver"
+ ,(dart-pkg "pub-semver" "1.3.2"
+ "15s6zn2qyyfc5lf8ip5h8j3sq5miz4vrzxbgbwi5vv91d53miia8"))
+ ("dart-pkg-quiver"
+ ,(dart-pkg "quiver" "0.25.0"
+ "02wqrk266s0ias9lfy7l5dh9ni2r697n3z42h4sgzxy7qg4rip24"
+ "https://github.com/google/quiver-dart"))
+ ("dart-pkg-resource"
+ ,(dart-pkg "resource" "af5a5bf65511943398146cf146e466e5f0b95cb9"
+ "1jq4bmg65jrpyqxcvbp87d5qqpgmv5ylfz3w1djzimq5jhr9k4vn"))
+ ("dart-pkg-scheduled-test"
+ ,(dart-pkg "scheduled-test" "0.12.11+1"
+ "1xk66f68m443yig5672p0dpack2c0kpkyk2d7f8iaq22q5zq7h1w"))
+ ("dart-pkg-shelf"
+ ,(dart-pkg "shelf" "0.6.8"
+ "0vl4m47yhjvc1nynyzc42bks4mzv877vsy7fbcv9w2fjh05sxhb9"))
+ ("dart-pkg-shelf-packages-handler"
+ ,(dart-pkg "shelf-packages-handler" "1.0.3"
+ "0iccfa713jyg7bb7fx144i5rl0afyfxvb3pi56igw2gdwklq4yck"))
+ ("dart-pkg-shelf-static"
+ ,(dart-pkg "shelf-static" "0.2.4"
+ "1gfyjqvv13d3zpnaahv5fi601ag7mr8crm94xawlvgvpqgpl0hsh"))
+ ("dart-pkg-shelf-web-socket"
+ ,(dart-pkg "shelf-web-socket" "0.2.1"
+ "18krh9bnbshwjjl47k15x9g3r7s5k0yichvn3gdsddjqjgp6vfp8"))
+ ("dart-pkg-source-map-stack-trace"
+ ,(dart-pkg "source-map-stack-trace" "1.1.4"
+ "1cpyq1vdfc623k8cdx673v2kkv112hzsrsyaxd8dd82v23caglva"))
+ ("dart-pkg-source-maps"
+ ,(dart-pkg "source-maps" "0.10.4"
+ "11dmncxgv8q40am73dxlxgzkfaanvgc9p3lds77m96mb1k27zbkf"))
+ ("dart-pkg-source-span"
+ ,(dart-pkg "source-span" "1.4.0"
+ "0gpa15p5rcilgl0paqa7f9fkiks7kyalzl2r0sd37m4cry9cf0vz"))
+ ("dart-pkg-stack-trace"
+ ,(dart-pkg "stack-trace" "1.8.2"
+ "0n21n2dv371bfcw6q83xwb8x26d1rd49cvx5qzm8mi0006h9frzs"))
+ ("dart-pkg-stream-channel"
+ ,(dart-pkg "stream-channel" "1.6.2"
+ "02ixi6vsja2cc22jcflp89v5wsbj45fl23p0sgaayqaj6l1jcxm1"))
+ ("dart-pkg-string-scanner"
+ ,(dart-pkg "string-scanner" "1.0.2"
+ "13hfnc704c9qipcvjinbv1hbq57hs5l2f68kyw282dlrcbbwwksy"))
+ ("dart-pkg-term-glyph"
+ ,(dart-pkg "term-glyph" "1.0.0"
+ "1nxqg345k2zh0yn498mxxdi7v1q3651z5invv0llfvs17ly2h2pz"))
+ ("dart-pkg-test"
+ ,(dart-pkg "test" "0.12.24+6"
+ "1xkmvwx30zm5ci1gn53hf6zrxymlq9cn9waa00k3ihxbd64mxg1k"))
+ ("dart-pkg-test-reflective-loader"
+ ,(dart-pkg "test-reflective-loader" "0.1.0"
+ "1qmbayg6js96lcy9s6grly1y6rh9x5mbyqygnr58zsdypzvhr4hr"))
+ ("dart-pkg-tuple"
+ ,(dart-pkg "tuple" "v1.0.1"
+ "0khkwq1blc90lgdcy4i8ng4nzppmhg31nziw4sc36axwbwdnpc86"))
+ ("dart-pkg-typed-data"
+ ,(dart-pkg "typed-data" "1.1.3"
+ "1zr9la34lib0rdfdf0539hdai2j71kf3s4ynsal7hw4pqvkdwi72"))
+ ("dart-pkg-unittest"
+ ,(dart-pkg "test" "0.11.7"
+ "1xbx2i2glmqlc3cz8x91anhf8d4hsr3bq9j53qliawz8j6q9anf8"))
+ ("dart-pkg-usage"
+ ,(dart-pkg "usage" "3.3.0"
+ "0r8d0q4ij42c7axclwns61cyrxpmk1qpggqfiqfm5vbmh8gpfm3b"))
+ ("dart-pkg-utf"
+ ,(dart-pkg "utf" "0.9.0+3"
+ "07jppjvg8bc8plzq910b8ld32l6x35i8qwy0mdqimydjjaslj78f"))
+ ("dart-pkg-watcher"
+ ,(dart-pkg "watcher" "0.9.7+4"
+ "09jpk98qb5j5250sr9r9ic17gj741yjy1p2j50zzl47a9wydfjly"))
+ ("dart-pkg-web-socket-channel"
+ ,(dart-pkg "web-socket-channel" "1.0.6"
+ "1phb2n3n6npzwl08nnp1aggcjmvwx516b816q4hsx8w190yr4f86"))
+ ("dart-pkg-yaml"
+ ,(dart-pkg "yaml" "2.1.12"
+ "0m2xr36vd2v3yirv1jb5v3dncsczn8n34s9fmqcm2ld979b4vanm"))
+ ("dart-pkgtested-dart-style"
+ ,(dart-pkg "dart-style" "1.0.7"
+ "0qym7z5n4w4jy75fnvcyza3hw0nrm8kli5mv65drr16f8pkr0lcg"))
+ ("dart-pkgtested-package-config"
+ ,(dart-pkg "package-config" "1.0.3"
+ "03w67nb1dhi2yqb63z1301p88hjws1d8azmw8m5ap4zapqdbhzgn"))
+ ("dart-pkgtested-package-resolver"
+ ,(dart-pkg "package-resolver" "1.0.2+1"
+ "0qs7zmxjwqqjkq6mqnz8b3rj142hyz1x0v1innh8n3bwmljgp3w9"))))
+ (native-inputs
+ `(("python" ,python-2)
+ ("python2-gyp" ,python2-gyp)
+ ("perl" ,perl)
+ ("go" ,go)
+ ("gn" ,gn-for-dart-bootstrap)
+ ("ninja" ,ninja)
+ ("gcc" ,gcc-6)))
+ (build-system gnu-build-system)
+ (home-page "https://dart.dev")
+ (synopsis "The Dart SDK, including the VM, dart2js and core libraries")
+ (description "Dart is a programming language which is:
+@enumerate
+@
This message was truncated. Download the full message here.
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 44926@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 44926
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help