;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2020 Nicolò Balzarotti ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . (define-module (gnu packages dart) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix build-system gnu) #: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) #: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 "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)))) (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 @item Optimized for UI @item Supports hot reload @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))))) (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)) (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))))) (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))))) (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))))) (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))))) (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))))) (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)))))) (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 " all) (string-join `(,all "#include " "#include " "#include ") "\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)))))