diff --git a/.github/workflows/checkfmt.yml b/.github/workflows/checkfmt.yml index 4fcf76b..c43893a 100644 --- a/.github/workflows/checkfmt.yml +++ b/.github/workflows/checkfmt.yml @@ -32,6 +32,8 @@ jobs: - name: "Check Scala format" if: "!cancelled()" run: | + echo "$JAVA_OPTS" | tr ' ' '\n' > mill-java-opts + export MILL_JVM_OPTS_PATH=$PWD/mill-java-opts nix develop -c bash -c 'mill -i gcd.checkFormat && mill -i elaborator.checkFormat' - name: "Check Rust format" if: "!cancelled()" diff --git a/readme.md b/readme.md index 5d0eb85..f56acb8 100644 --- a/readme.md +++ b/readme.md @@ -19,7 +19,7 @@ It will provide you the below code structure: * gcdemu/: source code for the DPI library * configs/: default configurations for GCD and the testbench, which can be generated by elaborator * nix/: nix build script for the whole lowering process -* build.sc & common.sc: Scala build script +* build.mill & common.mill: Scala build script * flake.nix: the root for nix to search scripts ## Usage @@ -145,7 +145,7 @@ To bump mill dependencies, run: nix build '.#gcd.gcd-compiled.millDeps' --rebuild ``` -and Then update `millDepsHash` in `nix/gcd/gcd.nix` +and Then update `millDepsHash` in `nix/pkgs/dependencies/default.nix` and `nix/gcd/gcd.nix` ### Use the fetchMillDeps function @@ -154,7 +154,7 @@ Fetch project dependencies for later offline usage. The `fetchMillDeps` function accept three args: `name`, `src`, `millDepsHash`: * name: name of the mill dependencies derivation, suggest using `-mill-deps` as suffix. -* src: path to a directory that contains at least `build.sc` file for mill to obtain dependencies. +* src: path to a directory that contains at least `build.mill` file for mill to obtain dependencies. * millDepsHash: same functionality as the `sha256`, `hash` attr in stdenv.mkDerivation. To obtain new hash for new dependencies, replace the old hash with empty string, and let nix figure the new hash. This derivation will read `$JAVA_OPTS` environment varialble, to set http proxy, you can export: @@ -171,15 +171,17 @@ Example: ```nix stdenv.mkDerivation rec { # ... - millDeps = fetchMillDeps { - inherit name; - src = with lib.fileset; toSource { - root = ./.; - fileset = unions [ - ./build.sc - ]; + passthru = { + millDeps = fetchMillDeps { + inherit name; + src = with lib.fileset; + toSource { + root = ./../..; + fileset = unions [ ./../../build.mill ./../../common.mill ]; + }; + buildInputs = with mill-dependencies; [ chisel.setupHook ]; + millDepsHash = "sha256-NybS2AXRQtXkgHd5nH4Ltq3sxZr5aZ4VepiT79o1AWo="; }; - millDepsHash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="; }; # ... nativeBuildInputs = [ @@ -189,25 +191,6 @@ stdenv.mkDerivation rec { } ``` -### Use the `nvfetcherSource` attribute - -`projectDependencies` attribute is an nix setup hook that will obtain nvfetcher generated sources -and place them under `dependencies` directory in build root. - -Read [nvfetcher](https://github.com/berberman/nvfetcher) document for nvfetcher usage. -By default the `nvfetcherSource` attribute will read `nix/pkgs/dependencies/_sources/generated.nix`, -so developer should place nvfetcher config and run `nix run .#nvfetcher` under `nix/pkgs/dependencies`. - -Usage: - -```nix -stdenv.mkDerivation { - nativeBuildInputs = [ - projectDependencies.setupHook - ] -} -``` - ## License The build system is released under the Apache-2.0 license, including all Nix and mill build system, All rights reserved by Jiuyang Liu diff --git a/templates/chisel/build.mill b/templates/chisel/build.mill new file mode 100644 index 0000000..0288c56 --- /dev/null +++ b/templates/chisel/build.mill @@ -0,0 +1,48 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 Jiuyang Liu +package build + +import mill._ +import mill.scalalib._ +import mill.define.{Command, TaskModule} +import mill.scalalib.publish._ +import mill.scalalib.scalafmt._ +import mill.scalalib.TestModule.Utest +import mill.util.Jvm +import coursier.maven.MavenRepository + +object deps { + val scalaVer = "2.13.15" + val mainargs = ivy"com.lihaoyi::mainargs:0.5.0" + val oslib = ivy"com.lihaoyi::os-lib:0.9.1" + val upickle = ivy"com.lihaoyi::upickle:3.3.1" + val chisel = ivy"org.chipsalliance::chisel::0.0.0+0-no-vcs-SNAPSHOT" + val chiselPlugin = ivy"org.chipsalliance:chisel-plugin_${scalaVer}:0.0.0+0-no-vcs-SNAPSHOT" +} + +object gcd extends GCD +trait GCD extends common.HasChisel with ScalafmtModule { + def scalaVersion = Task(deps.scalaVer) + + def chiselModule = None + def chiselPluginJar = Task(None) + def chiselPluginIvy = Some(deps.chiselPlugin) + def chiselIvy = Some(deps.chisel) +} + +object elaborator extends Elaborator +trait Elaborator extends common.ElaboratorModule with ScalafmtModule { + def scalaVersion = Task(deps.scalaVer) + + def circtInstallPath = + Task.Input(PathRef(os.Path(T.ctx().env("CIRCT_INSTALL_PATH")))) + + def generators = Seq(gcd) + + def mainargsIvy = deps.mainargs + + def chiselModule = None + def chiselPluginJar = Task(None) + def chiselPluginIvy = Some(deps.chiselPlugin) + def chiselIvy = Some(deps.chisel) +} diff --git a/templates/chisel/build.sc b/templates/chisel/build.sc deleted file mode 100644 index 1a2be93..0000000 --- a/templates/chisel/build.sc +++ /dev/null @@ -1,66 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// SPDX-FileCopyrightText: 2024 Jiuyang Liu - -import mill._ -import mill.scalalib._ -import mill.define.{Command, TaskModule} -import mill.scalalib.publish._ -import mill.scalalib.scalafmt._ -import mill.scalalib.TestModule.Utest -import mill.util.Jvm -import coursier.maven.MavenRepository -import $file.dependencies.chisel.build -import $file.common - -object deps { - val scalaVer = "2.13.15" - val mainargs = ivy"com.lihaoyi::mainargs:0.5.0" - val oslib = ivy"com.lihaoyi::os-lib:0.9.1" - val upickle = ivy"com.lihaoyi::upickle:3.3.1" -} - -object chisel extends Chisel - -trait Chisel extends millbuild.dependencies.chisel.build.Chisel { - def crossValue = deps.scalaVer - override def millSourcePath = os.pwd / "dependencies" / "chisel" -} - -object gcd extends GCD -trait GCD extends millbuild.common.HasChisel with ScalafmtModule { - def scalaVersion = T(deps.scalaVer) - - def chiselModule = Some(chisel) - def chiselPluginJar = T(Some(chisel.pluginModule.jar())) - def chiselIvy = None - def chiselPluginIvy = None -} - -object elaborator extends Elaborator -trait Elaborator extends millbuild.common.ElaboratorModule with ScalafmtModule { - def scalaVersion = T(deps.scalaVer) - - def panamaconverterModule = panamaconverter - - def circtInstallPath = - T.input(PathRef(os.Path(T.ctx().env("CIRCT_INSTALL_PATH")))) - - def generators = Seq(gcd) - - def mainargsIvy = deps.mainargs - - def chiselModule = Some(chisel) - def chiselPluginJar = T(Some(chisel.pluginModule.jar())) - def chiselPluginIvy = None - def chiselIvy = None -} - -object panamaconverter extends PanamaConverter -trait PanamaConverter extends millbuild.dependencies.chisel.build.PanamaConverter { - def crossValue = deps.scalaVer - - override def millSourcePath = - os.pwd / "dependencies" / "chisel" / "panamaconverter" - - def scalaVersion = T(deps.scalaVer) -} diff --git a/templates/chisel/common.sc b/templates/chisel/common.mill similarity index 92% rename from templates/chisel/common.sc rename to templates/chisel/common.mill index 6575e3e..db218d2 100644 --- a/templates/chisel/common.sc +++ b/templates/chisel/common.mill @@ -1,5 +1,6 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-FileCopyrightText: 2024 Jiuyang Liu +package build import mill._ import mill.scalalib._ @@ -39,9 +40,8 @@ trait HasChisel extends ScalaModule { trait ElaboratorModule extends ScalaModule with HasChisel { def generators: Seq[ScalaModule] - def panamaconverterModule: ScalaModule def circtInstallPath: T[PathRef] - override def moduleDeps = super.moduleDeps ++ Seq(panamaconverterModule) ++ generators + override def moduleDeps = super.moduleDeps ++ generators def mainargsIvy: Dep override def ivyDeps = T(super.ivyDeps() ++ Seq(mainargsIvy)) override def javacOptions = T(super.javacOptions() ++ Seq("--enable-preview", "--release", "21")) diff --git a/templates/chisel/flake.lock b/templates/chisel/flake.lock index 4029d99..417203b 100644 --- a/templates/chisel/flake.lock +++ b/templates/chisel/flake.lock @@ -1,15 +1,30 @@ { "nodes": { + "chisel-nix": { + "locked": { + "lastModified": 1738921361, + "narHash": "sha256-o89N2zNX9rdAAOYggKR1V1QJxDeWMLiUIN1srWJOmpQ=", + "owner": "chipsalliance", + "repo": "chisel-nix", + "rev": "92ed3025ebf792c8b258c3650d7f66fcf6d526a2", + "type": "github" + }, + "original": { + "owner": "chipsalliance", + "repo": "chisel-nix", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems" }, "locked": { - "lastModified": 1726560853, - "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "owner": "numtide", "repo": "flake-utils", - "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "type": "github" }, "original": { @@ -20,11 +35,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1729880355, - "narHash": "sha256-RP+OQ6koQQLX5nw0NmcDrzvGL8HDLnyXt/jHhL1jwjM=", + "lastModified": 1739020877, + "narHash": "sha256-mIvECo/NNdJJ/bXjNqIh8yeoSjVLAuDuTUzAo7dzs8Y=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "18536bf04cd71abd345f9579158841376fdd0c5a", + "rev": "a79cfe0ebd24952b580b1cf08cd906354996d547", "type": "github" }, "original": { @@ -36,6 +51,7 @@ }, "root": { "inputs": { + "chisel-nix": "chisel-nix", "flake-utils": "flake-utils", "nixpkgs": "nixpkgs" } diff --git a/templates/chisel/flake.nix b/templates/chisel/flake.nix index 7457674..fe19ac7 100644 --- a/templates/chisel/flake.nix +++ b/templates/chisel/flake.nix @@ -6,9 +6,10 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; flake-utils.url = "github:numtide/flake-utils"; + chisel-nix.url = "github:chipsalliance/chisel-nix"; }; - outputs = inputs@{ self, nixpkgs, flake-utils }: + outputs = inputs@{ self, nixpkgs, flake-utils, chisel-nix }: let overlay = import ./nix/overlay.nix; in { # System-independent attr @@ -17,18 +18,19 @@ } // flake-utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs { - overlays = [ overlay ]; + overlays = [ overlay chisel-nix.overlays.mill-flows ]; inherit system; }; in + with pkgs; { - formatter = pkgs.nixpkgs-fmt; + formatter = nixpkgs-fmt; legacyPackages = pkgs; - devShells.default = pkgs.mkShell ({ - inputsFrom = [ pkgs.gcd.gcd-compiled pkgs.gcd.tb-dpi-lib ]; - nativeBuildInputs = [ pkgs.cargo pkgs.rustfmt pkgs.rust-analyzer ]; + devShells.default = mkShell ({ + inputsFrom = [ gcd.gcd-compiled gcd.tb-dpi-lib ]; + packages = [ cargo rustfmt rust-analyzer nixd nvfetcher ]; RUST_SRC_PATH = - "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}"; - } // pkgs.gcd.tb-dpi-lib.env // pkgs.gcd.gcd-compiled.env); + "${rust.packages.stable.rustPlatform.rustLibSrc}"; + } // gcd.tb-dpi-lib.env // gcd.gcd-compiled.env); }); } diff --git a/templates/chisel/nix/gcd/gcd.nix b/templates/chisel/nix/gcd/gcd.nix index a3dc54f..8cc708f 100644 --- a/templates/chisel/nix/gcd/gcd.nix +++ b/templates/chisel/nix/gcd/gcd.nix @@ -9,12 +9,12 @@ , git # chisel deps +, mill-dependencies , mill , espresso , circt-full , jextract-21 , add-determinism -, projectDependencies , target }: @@ -29,8 +29,8 @@ let toSource { root = ./../..; fileset = unions [ - ./../../build.sc - ./../../common.sc + ./../../build.mill + ./../../common.mill ./../../gcd ./../../elaborator ]; @@ -42,28 +42,19 @@ let src = with lib.fileset; toSource { root = ./../..; - fileset = unions [ ./../../build.sc ./../../common.sc ]; + fileset = unions [ ./../../build.mill ./../../common.mill ]; }; - millDepsHash = "sha256-5VTgJ1JaIxP3wk/WsFj+W1VGFE2xoPKu3XbmTVOvMdk="; - nativeBuildInputs = [ projectDependencies.setupHook ]; + buildInputs = with mill-dependencies; [ chisel.setupHook ]; + millDepsHash = "sha256-NybS2AXRQtXkgHd5nH4Ltq3sxZr5aZ4VepiT79o1AWo="; }; - editable = self.overrideAttrs (_: { - shellHook = '' - setupSubmodulesEditable - mill mill.bsp.BSP/install 0 - ''; - }); - inherit target; inherit env; }; - shellHook = '' - setupSubmodules - ''; + nativeBuildInputs = with mill-dependencies; [ + makeWrapper - nativeBuildInputs = [ mill circt-full jextract-21 @@ -71,10 +62,8 @@ let espresso git - makeWrapper passthru.millDeps.setupHook - - projectDependencies.setupHook + chisel.setupHook ]; env = { diff --git a/templates/chisel/nix/gcd/rtl.nix b/templates/chisel/nix/gcd/rtl.nix index 8cd8a77..601b7b8 100644 --- a/templates/chisel/nix/gcd/rtl.nix +++ b/templates/chisel/nix/gcd/rtl.nix @@ -15,7 +15,7 @@ , enable-layers ? [ ] }: let - processLayer = lib.map (str: "./" + lib.replaceStrings [ "." ] [ "/" ] str); + processLayer = lib.map (str: "./" + lib.replaceStrings [ "." ] [ "/" ] (lib.toLower str)); enableLayersDirs = processLayer enable-layers; in stdenvNoCC.mkDerivation { diff --git a/templates/chisel/nix/overlay.nix b/templates/chisel/nix/overlay.nix index c6c1677..240496d 100644 --- a/templates/chisel/nix/overlay.nix +++ b/templates/chisel/nix/overlay.nix @@ -18,18 +18,13 @@ final: prev: { in (prev.mill.override { inherit jre; }).overrideAttrs (_: { passthru = { inherit jre; }; }); - fetchMillDeps = final.callPackage ./pkgs/mill-builder.nix { }; + mill-dependencies = final.callPackage ./pkgs/dependencies { }; circt-full = final.callPackage ./pkgs/circt-full.nix { }; - # faster strip-undetereminism - add-determinism = final.callPackage ./pkgs/add-determinism { }; - vcs-fhs-env = final.callPackage ./pkgs/vcs-fhs-env.nix { inherit getEnv'; }; cds-fhs-env = final.callPackage ./pkgs/cds-fhs-env.nix { inherit getEnv'; }; - projectDependencies = final.callPackage ./pkgs/project-dependencies.nix { }; - gcd = final.callPackage ./gcd { }; } diff --git a/templates/chisel/nix/pkgs/add-determinism/Cargo.lock b/templates/chisel/nix/pkgs/add-determinism/Cargo.lock deleted file mode 100644 index ff36ec7..0000000 --- a/templates/chisel/nix/pkgs/add-determinism/Cargo.lock +++ /dev/null @@ -1,962 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "add-determinism" -version = "0.4.1" -dependencies = [ - "anyhow", - "chrono", - "clap", - "glob", - "indoc", - "itertools", - "log", - "nix", - "num-bigint-dig", - "num-integer", - "num-traits", - "regex", - "serde", - "serde_cbor", - "tempfile", - "thiserror", - "time", - "walkdir", - "zip", -] - -[[package]] -name = "adler2" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" - -[[package]] -name = "aho-corasick" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" -dependencies = [ - "memchr", -] - -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - -[[package]] -name = "anstream" -version = "0.6.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "is_terminal_polyfill", - "utf8parse", -] - -[[package]] -name = "anstyle" -version = "1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" - -[[package]] -name = "anstyle-parse" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "anstyle-wincon" -version = "3.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" -dependencies = [ - "anstyle", - "windows-sys 0.52.0", -] - -[[package]] -name = "anyhow" -version = "1.0.89" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" - -[[package]] -name = "autocfg" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" - -[[package]] -name = "bitflags" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" - -[[package]] -name = "bumpalo" -version = "3.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "cc" -version = "1.1.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16803a61b81d9eabb7eae2588776c4c1e584b738ede45fdbb4c972cec1e9945" -dependencies = [ - "shlex", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "cfg_aliases" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" - -[[package]] -name = "chrono" -version = "0.4.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" -dependencies = [ - "android-tzdata", - "iana-time-zone", - "js-sys", - "num-traits", - "wasm-bindgen", - "windows-targets", -] - -[[package]] -name = "clap" -version = "4.5.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8" -dependencies = [ - "clap_builder", - "clap_derive", -] - -[[package]] -name = "clap_builder" -version = "4.5.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54" -dependencies = [ - "anstream", - "anstyle", - "clap_lex", - "strsim", -] - -[[package]] -name = "clap_derive" -version = "4.5.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "clap_lex" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" - -[[package]] -name = "colorchoice" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" - -[[package]] -name = "core-foundation-sys" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" - -[[package]] -name = "crc32fast" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" - -[[package]] -name = "deranged" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" -dependencies = [ - "powerfmt", -] - -[[package]] -name = "either" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" - -[[package]] -name = "errno" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "fastrand" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" - -[[package]] -name = "flate2" -version = "1.0.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" -dependencies = [ - "crc32fast", - "libz-sys", - "miniz_oxide", -] - -[[package]] -name = "getrandom" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - -[[package]] -name = "half" -version = "1.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403" - -[[package]] -name = "heck" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" - -[[package]] -name = "iana-time-zone" -version = "0.1.61" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "windows-core", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - -[[package]] -name = "indoc" -version = "2.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" - -[[package]] -name = "is_terminal_polyfill" -version = "1.70.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" - -[[package]] -name = "itertools" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" -dependencies = [ - "either", -] - -[[package]] -name = "js-sys" -version = "0.3.72" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "lazy_static" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" -dependencies = [ - "spin", -] - -[[package]] -name = "libc" -version = "0.2.159" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" - -[[package]] -name = "libm" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" - -[[package]] -name = "libz-sys" -version = "1.1.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2d16453e800a8cf6dd2fc3eb4bc99b786a9b90c663b8559a5b1a041bf89e472" -dependencies = [ - "cc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "linux-raw-sys" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" - -[[package]] -name = "log" -version = "0.4.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" - -[[package]] -name = "memchr" -version = "2.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" - -[[package]] -name = "memoffset" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" -dependencies = [ - "autocfg", -] - -[[package]] -name = "miniz_oxide" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" -dependencies = [ - "adler2", -] - -[[package]] -name = "nix" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" -dependencies = [ - "bitflags", - "cfg-if", - "cfg_aliases", - "libc", - "memoffset", -] - -[[package]] -name = "num-bigint-dig" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc84195820f291c7697304f3cbdadd1cb7199c0efc917ff5eafd71225c136151" -dependencies = [ - "byteorder", - "lazy_static", - "libm", - "num-integer", - "num-iter", - "num-traits", - "rand", - "serde", - "smallvec", -] - -[[package]] -name = "num-conv" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" - -[[package]] -name = "num-integer" -version = "0.1.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" -dependencies = [ - "num-traits", -] - -[[package]] -name = "num-iter" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" -dependencies = [ - "autocfg", -] - -[[package]] -name = "once_cell" -version = "1.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" - -[[package]] -name = "pkg-config" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" - -[[package]] -name = "powerfmt" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" - -[[package]] -name = "ppv-lite86" -version = "0.2.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" -dependencies = [ - "zerocopy", -] - -[[package]] -name = "proc-macro2" -version = "1.0.88" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c3a7fc5db1e57d5a779a352c8cdb57b29aa4c40cc69c3a68a7fedc815fbf2f9" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha", - "rand_core", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom", -] - -[[package]] -name = "regex" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" - -[[package]] -name = "rustix" -version = "0.38.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" -dependencies = [ - "bitflags", - "errno", - "libc", - "linux-raw-sys", - "windows-sys 0.52.0", -] - -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "serde" -version = "1.0.210" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_cbor" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" -dependencies = [ - "half", - "serde", -] - -[[package]] -name = "serde_derive" -version = "1.0.210" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - -[[package]] -name = "smallvec" -version = "1.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" - -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" - -[[package]] -name = "strsim" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" - -[[package]] -name = "syn" -version = "2.0.79" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "tempfile" -version = "3.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" -dependencies = [ - "cfg-if", - "fastrand", - "once_cell", - "rustix", - "windows-sys 0.59.0", -] - -[[package]] -name = "thiserror" -version = "1.0.64" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.64" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "time" -version = "0.3.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" -dependencies = [ - "deranged", - "num-conv", - "powerfmt", - "serde", - "time-core", -] - -[[package]] -name = "time-core" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" - -[[package]] -name = "unicode-ident" -version = "1.0.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" - -[[package]] -name = "utf8parse" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" - -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - -[[package]] -name = "walkdir" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" -dependencies = [ - "same-file", - "winapi-util", -] - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasm-bindgen" -version = "0.2.95" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" -dependencies = [ - "cfg-if", - "once_cell", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.95" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.95" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.95" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.95" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" - -[[package]] -name = "winapi-util" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" -dependencies = [ - "windows-sys 0.59.0", -] - -[[package]] -name = "windows-core" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-sys" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-targets" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" - -[[package]] -name = "zerocopy" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" -dependencies = [ - "byteorder", - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "zip" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" -dependencies = [ - "byteorder", - "crc32fast", - "crossbeam-utils", - "flate2", - "time", -] diff --git a/templates/chisel/nix/pkgs/add-determinism/default.nix b/templates/chisel/nix/pkgs/add-determinism/default.nix deleted file mode 100644 index 8960607..0000000 --- a/templates/chisel/nix/pkgs/add-determinism/default.nix +++ /dev/null @@ -1,57 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 -# SPDX-FileCopyrightText: 2024 Jiuyang Liu - -{ lib -, rustPlatform -, fetchFromGitHub -, pkg-config -, zlib -, python3 -, cargoLockFile ? ./Cargo.lock -, ... -}@args: - -let - marshalparser = args.marshalparser or python3.pkgs.callPackage ./marshalparser.nix { }; - pyEnv = python3.withPackages (ps: [ marshalparser ]); -in -rustPlatform.buildRustPackage { - pname = "add-determinism"; - version = "unstable-2024-10-17"; - - src = fetchFromGitHub { - owner = "keszybz"; - repo = "add-determinism"; - rev = "d3748ff2ee13d61aa913d7c1160e9e2274742bad"; - hash = "sha256-IiIxUDYtq4Qcd9hTHsSqZEeETu5Vw3Gh6GxfArxBPG0="; - }; - - # this project has no Cargo.lock now - cargoLock = { - lockFile = cargoLockFile; - }; - - postPatch = '' - ln -s ${cargoLockFile} Cargo.lock - ''; - - passthru = { inherit pyEnv marshalparser; }; - - nativeBuildInputs = [ - pyEnv - pkg-config - ]; - - propagatedBuildInputs = [ pyEnv ]; - - buildInputs = [ - zlib - ]; - - meta = with lib; { - description = "Build postprocessor to reset metadata fields for build reproducibility"; - homepage = "https://github.com/keszybz/add-determinism"; - license = licenses.gpl3Only; - mainProgram = "add-determinism"; - }; -} diff --git a/templates/chisel/nix/pkgs/add-determinism/marshalparser.nix b/templates/chisel/nix/pkgs/add-determinism/marshalparser.nix deleted file mode 100644 index faede0e..0000000 --- a/templates/chisel/nix/pkgs/add-determinism/marshalparser.nix +++ /dev/null @@ -1,36 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 -# SPDX-FileCopyrightText: 2024 Jiuyang Liu - -{ lib -, python3 -, fetchPypi -}: - -python3.pkgs.buildPythonPackage rec { - pname = "marshalparser"; - version = "0.3.4"; - pyproject = true; - - src = fetchPypi { - inherit pname version; - hash = "sha256-Zk4AMCG3Y52Ghq1yykLidujGiRU3v8eDM7f/s6QsGqI="; - }; - - nativeBuildInputs = [ - python3.pkgs.setuptools - python3.pkgs.wheel - ]; - - passthru.optional-dependencies = with python3.pkgs; { - test = [ pytest ]; - }; - - pythonImportsCheck = [ "marshalparser" ]; - - meta = with lib; { - description = "Parser for byte-cache .pyc files"; - homepage = "https://pypi.org/project/marshalparser/"; - license = licenses.mit; - mainProgram = "marshalparser"; - }; -} diff --git a/templates/chisel/nix/pkgs/dependencies/_sources/generated.json b/templates/chisel/nix/pkgs/dependencies/_sources/generated.json index 4e20105..f7d5869 100644 --- a/templates/chisel/nix/pkgs/dependencies/_sources/generated.json +++ b/templates/chisel/nix/pkgs/dependencies/_sources/generated.json @@ -1,7 +1,7 @@ { "chisel": { "cargoLocks": null, - "date": "2024-10-28", + "date": "2025-02-10", "extract": null, "name": "chisel", "passthru": null, @@ -13,10 +13,11 @@ "name": null, "owner": "chipsalliance", "repo": "chisel", - "rev": "66bab812796eb5a5c0bbe3308ee01fc6752557eb", - "sha256": "sha256-gaaNEGqxm213vQ3er6vn7kC8na0D745IdDnJWwQPgms=", + "rev": "840c95e2bb8321346da4d832c8d9dd43bf997be7", + "sha256": "sha256-YWmqj7YxqyiLjijFVZ28PrAuaOac9j/XRhF01zGQKBk=", + "sparseCheckout": [], "type": "github" }, - "version": "66bab812796eb5a5c0bbe3308ee01fc6752557eb" + "version": "840c95e2bb8321346da4d832c8d9dd43bf997be7" } } \ No newline at end of file diff --git a/templates/chisel/nix/pkgs/dependencies/_sources/generated.nix b/templates/chisel/nix/pkgs/dependencies/_sources/generated.nix index 7eb852b..5bd8f89 100644 --- a/templates/chisel/nix/pkgs/dependencies/_sources/generated.nix +++ b/templates/chisel/nix/pkgs/dependencies/_sources/generated.nix @@ -3,14 +3,14 @@ { chisel = { pname = "chisel"; - version = "66bab812796eb5a5c0bbe3308ee01fc6752557eb"; + version = "840c95e2bb8321346da4d832c8d9dd43bf997be7"; src = fetchFromGitHub { owner = "chipsalliance"; repo = "chisel"; - rev = "66bab812796eb5a5c0bbe3308ee01fc6752557eb"; + rev = "840c95e2bb8321346da4d832c8d9dd43bf997be7"; fetchSubmodules = false; - sha256 = "sha256-gaaNEGqxm213vQ3er6vn7kC8na0D745IdDnJWwQPgms="; + sha256 = "sha256-YWmqj7YxqyiLjijFVZ28PrAuaOac9j/XRhF01zGQKBk="; }; - date = "2024-10-28"; + date = "2025-02-10"; }; } diff --git a/templates/chisel/nix/pkgs/dependencies/default.nix b/templates/chisel/nix/pkgs/dependencies/default.nix new file mode 100644 index 0000000..bdca34b --- /dev/null +++ b/templates/chisel/nix/pkgs/dependencies/default.nix @@ -0,0 +1,37 @@ +{ pkgs +, lib +, newScope +, fetchMillDeps +, publishMillJar +, git +, ... +}: +let + dependencies = pkgs.callPackage ./_sources/generated.nix { }; +in +lib.makeScope newScope (scope: { + chisel = + let + chiselDeps = fetchMillDeps { + name = "chisel"; + src = dependencies.chisel.src; + fetchTargets = [ "unipublish" ]; + nativeBuildInputs = [ + git + ]; + millDepsHash = "sha256-alJbV8DhbocsFdC+qlUJeNrkq2/y5Vml7fIkCabEmT8="; + }; + in + publishMillJar { + name = "chisel"; + src = dependencies.chisel.src; + publishTargets = [ "unipublish" ]; + buildInputs = [ chiselDeps.setupHook ]; + nativeBuildInputs = [ + git + ]; + passthru = { + inherit chiselDeps; + }; + }; +}) diff --git a/templates/chisel/nix/pkgs/mill-builder.nix b/templates/chisel/nix/pkgs/mill-builder.nix deleted file mode 100644 index 99ec2a1..0000000 --- a/templates/chisel/nix/pkgs/mill-builder.nix +++ /dev/null @@ -1,69 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 -# SPDX-FileCopyrightText: 2024 Jiuyang Liu - -{ stdenvNoCC, mill, writeText, makeSetupHook, runCommand, lib }: - -{ name, src, millDepsHash, ... }@args: - -let - mill-rt-version = lib.head (lib.splitString "+" mill.jre.version); - self = stdenvNoCC.mkDerivation ({ - name = "${name}-mill-deps"; - inherit src; - - nativeBuildInputs = [ - mill - ] ++ (args.nativeBuildInputs or [ ]); - - impureEnvVars = [ "MILL_OPTS" ]; - - buildPhase = '' - runHook preBuild - echo "-D user.home=$TMPDIR $MILL_OPTS" > .mill-opts - export MILL_OPTS_PATH="$PWD/.mill-opts" - - # Use "https://repo1.maven.org/maven2/" only to keep dependencies integrity - export COURSIER_REPOSITORIES="central" - - mill -i __.prepareOffline - mill -i __.scalaCompilerClasspath - runHook postBuild - ''; - - installPhase = '' - runHook preInstall - mkdir -p $out/.cache - mv $TMPDIR/.cache/coursier $out/.cache/coursier - runHook postInstall - ''; - - outputHashAlgo = "sha256"; - outputHashMode = "recursive"; - outputHash = millDepsHash; - - dontShrink = true; - dontPatchELF = true; - - passthru.setupHook = makeSetupHook - { - name = "mill-setup-hook.sh"; - propagatedBuildInputs = [ mill ]; - } - (writeText "mill-setup-hook" '' - setupMillCache() { - local tmpdir=$(mktemp -d) - export JAVA_OPTS="$JAVA_OPTS -Duser.home=$tmpdir" - - mkdir -p "$tmpdir"/.cache "$tmpdir/.mill/ammonite" - - cp -r "${self}"/.cache/coursier "$tmpdir"/.cache/ - touch "$tmpdir/.mill/ammonite/rt-${mill-rt-version}.jar" - - echo "JAVA HOME dir set to $tmpdir" - } - - postUnpackHooks+=(setupMillCache) - ''); - } // (builtins.removeAttrs args [ "name" "src" "millDepsHash" "nativeBuildInputs" ])); -in -self diff --git a/templates/chisel/nix/pkgs/project-dependencies.nix b/templates/chisel/nix/pkgs/project-dependencies.nix deleted file mode 100644 index 4f96005..0000000 --- a/templates/chisel/nix/pkgs/project-dependencies.nix +++ /dev/null @@ -1,54 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 -# SPDX-FileCopyrightText: 2024 Jiuyang Liu - -{ pkgs, makeSetupHook, writeText, lib, generatedNixPath ? ./dependencies/_sources/generated.nix }: - -let - submodules = lib.filterAttrs (_: v: v ? src) (pkgs.callPackage generatedNixPath { }); - makeRemote = module: "git@github.com:${module.src.owner}/${module.src.repo}.git"; -in -{ - setupHook = makeSetupHook { name = "submodules-setup.sh"; } (writeText "submodules-setup.sh" ('' - _setupOneSubmodule() { - src="$1" - name="$2" - - echo "[nix-shell] linking '$src' to 'dependencies/$name'" - ln -sfT "$src" "dependencies/$name" - } - - _setupOneSubmoduleEditable() { - name="$1"; shift - remote="$1"; shift - rev="$1"; shift - depDir="dependencies/$name" - - if [ -d "$depDir" -a ! -L "$depDir" ]; then - echo "[nix-shell] ignored existing submodule directory '$depDir', remove them if you want a update" - else - if [ -L "$depDir" ]; then - echo "[nix-shell] replacing symlink '$depDir' with full git worktree" - rm "$depDir" - else - echo "[nix-shell] fetching submodule $name" - fi - - git clone $remote $depDir - git -C $depDir -c advice.detachedHead=false checkout $rev - fi - } - - setupSubmodules() { - mkdir -p dependencies - '' + lib.concatLines (lib.mapAttrsToList (k: v: "_setupOneSubmodule '${v.src}' '${k}'") submodules) + '' - } - - # for use of shellHook - setupSubmodulesEditable() { - mkdir -p dependencies - '' + lib.concatLines (lib.mapAttrsToList (k: v: "_setupOneSubmoduleEditable '${k}' '${makeRemote v}' '${v.src.rev}'") submodules) + '' - } - prePatchHooks+=(setupSubmodules) - '')); - sources = submodules; -}