Subject: [PATCH v2 13/15] gnu: Add dart-2.6.1.

From: nixo <[email-masked]>
Date: Sun, 29 Nov 2020 18:34:12 +0100

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

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