Nicolò Balzarotti wrote 4 years ago
(address . guix-patches@gnu.org)
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