;;; 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) (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)))) (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))))) (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))))) (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))))) ;; 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))))) (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)))) (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.git") (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-zlib) ("libunwind" ,libunwind) ("nspr" ,nspr) ("nss" ,nss) ("boringssl" ,dart-boringssl) ("boringssl-gen" ,boringssl-gen) ("gperftools" ,dart-gperftools) ("root-certificates" ,(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" ,(origin (method git-fetch) (uri (git-reference (url "https://github.com/valotas/mustache4dart.git") (commit "v2.1.0"))) (sha256 (base32 "0wsmg2xvpp2h9rqcg65icymh2s9hifq6v700mni65ky33dah9ji1")))) ("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" ,(origin (method git-fetch) (uri (git-reference (url "https://github.com/google/quiver-dart.git") (commit "0.25.0"))) (sha256 (base32 "02wqrk266s0ias9lfy7l5dh9ni2r697n3z42h4sgzxy7qg4rip24")))) ("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.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))))) (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.git") (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" ,(origin (method git-fetch) (uri (git-reference (url "https://github.com/dart-lang/root_certificates.git") (commit "a4c7c6f23a664a37bc1b6f15a819e3f2a292791a"))) (sha256 (base32 "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" ,(origin (method git-fetch) (uri (git-reference (url "https://github.com/google/quiver-dart.git") (commit "0.28.0"))) (sha256 (base32 "1zji18fw1sb4y88snaxmz632v9px0z4c2wlh3bfwncsrc3h49i7z")))) ("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)))))