diff --git a/CHANGELOG.md b/CHANGELOG.md index 651f53e..dd559bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,11 +31,3 @@ Minor patches ## v0.2.4-alpha - `homeManager` flake reference may now be specified in snowflake - `` - -## v0.2.5-alpha ->[!TODO] -> I've been too focused on upcoming changes... - -## v0.2.6-alpha ->[!TODO] -> I've been too focused on upcoming changes... diff --git a/TODO.md b/TODO.md index 26ecbc1..7a23e43 100755 --- a/TODO.md +++ b/TODO.md @@ -1,14 +1,4 @@ ## Next -- [ ] figure out how Cerulean could aid CI/CD (ie hydra + nix-unit) - you can - https://github.com/NotAShelf/nix-bindings/tree/main/nix-bindings - https://notashelf.github.io/nix-bindings/nix_bindings/#structs - https://github.com/nixops4/nix-bindings-rust - https://nix.dev/manual/nix/2.34/c-api.html - -- [ ] write a key management system that supports activation time, run time, and build time - https://docs.aws.amazon.com/kms/latest/developerguide/overview.html - - [ ] formalize how the snow flake system compiles outputs, this would remove the need for `mapNodes` - [ ] groups should allow you to set node configuration defaults diff --git a/ceru.bak/ceru b/ceru/ceru similarity index 100% rename from ceru.bak/ceru rename to ceru/ceru diff --git a/ceru.bak/libceru.sh b/ceru/libceru.sh similarity index 100% rename from ceru.bak/libceru.sh rename to ceru/libceru.sh diff --git a/ceru.bak/subcmds/new/cache-key b/ceru/subcmds/new/cache-key similarity index 100% rename from ceru.bak/subcmds/new/cache-key rename to ceru/subcmds/new/cache-key diff --git a/ceru.bak/subcmds/new/default.sh b/ceru/subcmds/new/default.sh similarity index 100% rename from ceru.bak/subcmds/new/default.sh rename to ceru/subcmds/new/default.sh diff --git a/ceru.bak/subcmds/new/password b/ceru/subcmds/new/password similarity index 100% rename from ceru.bak/subcmds/new/password rename to ceru/subcmds/new/password diff --git a/ceru.bak/subcmds/new/ssh-key b/ceru/subcmds/new/ssh-key similarity index 100% rename from ceru.bak/subcmds/new/ssh-key rename to ceru/subcmds/new/ssh-key diff --git a/ceru.bak/subcmds/new/wg-key b/ceru/subcmds/new/wg-key similarity index 100% rename from ceru.bak/subcmds/new/wg-key rename to ceru/subcmds/new/wg-key diff --git a/nix/default.nix b/cerulean/default.nix similarity index 92% rename from nix/default.nix rename to cerulean/default.nix index 6c488a1..80240c0 100644 --- a/nix/default.nix +++ b/cerulean/default.nix @@ -21,7 +21,10 @@ mix.newMixture args (mixture: { ./snow ]; - version = "0.2.6-alpha"; + version = "0.2.5-alpha"; + + # WARNING: legacy + mkFlake = mixture.snow.flake; overlays = [ # build deploy-rs as a package not from the flake input, diff --git a/nix/home/default.nix b/cerulean/home/default.nix similarity index 100% rename from nix/home/default.nix rename to cerulean/home/default.nix diff --git a/nix/nixos/default.nix b/cerulean/nixos/default.nix similarity index 100% rename from nix/nixos/default.nix rename to cerulean/nixos/default.nix diff --git a/nix/nixos/home.nix b/cerulean/nixos/home.nix similarity index 100% rename from nix/nixos/home.nix rename to cerulean/nixos/home.nix diff --git a/nix/nixos/microvm-child.nix b/cerulean/nixos/microvm-child.nix similarity index 100% rename from nix/nixos/microvm-child.nix rename to cerulean/nixos/microvm-child.nix diff --git a/nix/nixos/microvm-parent.nix b/cerulean/nixos/microvm-parent.nix similarity index 100% rename from nix/nixos/microvm-parent.nix rename to cerulean/nixos/microvm-parent.nix diff --git a/nix/nixos/nixpkgs.nix b/cerulean/nixos/nixpkgs.nix similarity index 100% rename from nix/nixos/nixpkgs.nix rename to cerulean/nixos/nixpkgs.nix diff --git a/nix/nixos/remote-deploy/default.nix b/cerulean/nixos/remote-deploy/default.nix similarity index 100% rename from nix/nixos/remote-deploy/default.nix rename to cerulean/nixos/remote-deploy/default.nix diff --git a/cerulean/snow/default.nix b/cerulean/snow/default.nix new file mode 100644 index 0000000..6993ff1 --- /dev/null +++ b/cerulean/snow/default.nix @@ -0,0 +1,191 @@ +# Copyright 2025-2026 _cry64 (Emile Clark-Boman) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +{ + this, + self, + inputs, + systems, + nt, + mix, + ... +} @ args: let + inherit + (builtins) + all + attrNames + elem + mapAttrs + warn + ; + + inherit (inputs.nixpkgs) lib; + + inherit (nt) findImport; +in + mix.newMixture args (mixture: let + inherit (mixture) mapNodes; + in { + includes.private = [ + ./lib/nodes.nix + ]; + + inherit findImport; + + # snow.flake + flake = flakeInputs: root: let + module = lib.evalModules { + class = "snowflake"; + # TODO: abort if inputs contains reserved names + specialArgs = + (flakeInputs + // { + inherit systems root; + inherit (this) snow; + inputs = flakeInputs; + }) + |> (x: builtins.removeAttrs x ["self" "nodes"]); + + modules = [ + ./module.nix + ({config, ...}: { + _module.args = { + self = config; + nodes = config.nodes.nodes; + }; + }) + ]; + }; + + nodes = module.config.nodes; + in rec { + nixosConfigurations = mapNodes nodes ( + { + base, + lib, + name, + node, + groupModules, + ... + }: let + homeManager = + if node.homeManager != null + then node.homeManager + else if nodes.homeManager != null + then nodes.homeManager + else + warn '' + [snowflake] Neither `nodes.homeManager` nor `nodes.nodes.${name}.homeManager` were specified! + [snowflake] home-manager will NOT be used! User configuration will be ignored! + '' + null; + + userArgs = nodes.args // node.args; + ceruleanArgs = { + inherit systems root base nodes node; + inherit (node) system; + inherit (this) snow; + hostname = name; + + _cerulean = { + inherit inputs userArgs ceruleanArgs homeManager; + specialArgs = userArgs // ceruleanArgs; + }; + }; + specialArgs = assert (userArgs + |> attrNames + |> all (argName: + ! ceruleanArgs ? argName + || abort '' + `specialArgs` are like super important to Cerulean my love... rollback; + magicRollback = magicRollback -> rollback; + activationTimeout = activationTimeout; + confirmTimeout = confirmTimeout; + + remoteBuild = remoteBuild; + sshUser = ssh.user; + sshOpts = + ssh.opts + ++ ( + if elem "-p" ssh.opts + then [] + else ["-p" (toString ssh.port)] + ) + ++ ( + if elem "-A" ssh.opts + then [] + else ["-A"] + ); + }; + }); + + checks = + inputs.deploy-rs.lib + |> mapAttrs (system: deployLib: + deployLib.deployChecks deploy); + }; + }) diff --git a/nix/snow/lib/nodes.nix b/cerulean/snow/lib/nodes.nix similarity index 100% rename from nix/snow/lib/nodes.nix rename to cerulean/snow/lib/nodes.nix diff --git a/nix/snow/module.nix b/cerulean/snow/module.nix similarity index 85% rename from nix/snow/module.nix rename to cerulean/snow/module.nix index c61a9df..79b8804 100644 --- a/nix/snow/module.nix +++ b/cerulean/snow/module.nix @@ -15,14 +15,9 @@ root, snow, ... -}: let - snowFlake = snow.findImport /${root}/snow; -in { +}: { imports = [ - ./modules ./nodes - snowFlake + (snow.findImport /${root}/snow) ]; - - outputs = snowFlake; } diff --git a/nix/snow/nodes/default.nix b/cerulean/snow/nodes/default.nix similarity index 100% rename from nix/snow/nodes/default.nix rename to cerulean/snow/nodes/default.nix diff --git a/nix/snow/nodes/shared.nix b/cerulean/snow/nodes/shared.nix similarity index 100% rename from nix/snow/nodes/shared.nix rename to cerulean/snow/nodes/shared.nix diff --git a/nix/snow/nodes/submodule.nix b/cerulean/snow/nodes/submodule.nix similarity index 100% rename from nix/snow/nodes/submodule.nix rename to cerulean/snow/nodes/submodule.nix diff --git a/flake.lock b/flake.lock index a8c1976..fc8e402 100644 --- a/flake.lock +++ b/flake.lock @@ -185,30 +185,9 @@ "microvm": "microvm", "nixpkgs": "nixpkgs", "nt": "nt", - "sops-nix": "sops-nix", "systems": "systems_3" } }, - "sops-nix": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1773096132, - "narHash": "sha256-M3zEnq9OElB7zqc+mjgPlByPm1O5t2fbUrH3t/Hm5Ag=", - "owner": "Mic92", - "repo": "sops-nix", - "rev": "d1ff3b1034d5bab5d7d8086a7803c5a5968cd784", - "type": "github" - }, - "original": { - "owner": "Mic92", - "repo": "sops-nix", - "type": "github" - } - }, "spectrum": { "flake": false, "locked": { diff --git a/flake.nix b/flake.nix index 83bb612..80faf5c 100644 --- a/flake.nix +++ b/flake.nix @@ -44,7 +44,7 @@ nt, ... } @ inputs: - import ./nix + import ./cerulean { inherit inputs self nt; inherit (nt) mix; diff --git a/nix/nixos/isoImage/default.nix b/nix/nixos/isoImage/default.nix deleted file mode 100644 index b09d25e..0000000 --- a/nix/nixos/isoImage/default.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ - modulesPath, - config, - lib, - pkgs, - ... -}: { - config = lib.mkIf (config?isoImage) { - # TODO: do i really need to import ALL of this? - imports = [(modulesPath + "/installer/cd-dvd/installation-cd-minimal.nix")]; - - environment.systemPackages = [ - pkgs.neovim - ]; - }; -} diff --git a/nix/snow/default.nix b/nix/snow/default.nix deleted file mode 100644 index 3a8a5aa..0000000 --- a/nix/snow/default.nix +++ /dev/null @@ -1,195 +0,0 @@ -# Copyright 2025-2026 _cry64 (Emile Clark-Boman) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -{ - this, - self, - inputs, - systems, - nt, - mix, - ... -} @ args: let - inherit - (builtins) - all - attrNames - elem - mapAttrs - warn - ; - - inherit (inputs.nixpkgs) lib; - - inherit (nt) findImport; -in - mix.newMixture args (mixture: let - inherit (mixture) mapNodes; - in { - includes.private = [ - ./lib/nodes.nix - ]; - - inherit findImport; - - # snow.flake - flake = flakeInputs: root: let - module = lib.evalModules { - class = "snowflake"; - # TODO: abort if inputs contains reserved names - specialArgs = - (flakeInputs - // { - inherit systems root; - inherit (this) snow; - inputs = flakeInputs; - }) - |> (x: builtins.removeAttrs x ["self" "nodes"]); - - modules = [ - ./module.nix - ({config, ...}: { - _module.args = { - self = config; - nodes = config.nodes.nodes; - }; - }) - ]; - }; - - inherit (module) config; - nodes = config.nodes; - in - # TODO: maybe use flake-parts or another module to all merging - config.outputs - // rec { - nixosConfigurations = mapNodes nodes ( - { - base, - lib, - name, - node, - groupModules, - ... - }: let - homeManager = - if node.homeManager != null - then node.homeManager - else if nodes.homeManager != null - then nodes.homeManager - else - warn '' - [snowflake] Neither `nodes.homeManager` nor `nodes.nodes.${name}.homeManager` were specified! - [snowflake] home-manager will NOT be used! User configuration will be ignored! - '' - null; - - userArgs = nodes.args // node.args; - ceruleanArgs = { - inherit systems root base nodes node; - inherit (node) system; - inherit (this) snow; - hostname = name; - - _cerulean = { - inherit inputs userArgs ceruleanArgs homeManager; - specialArgs = userArgs // ceruleanArgs; - }; - }; - specialArgs = assert (userArgs - |> attrNames - |> all (argName: - ! ceruleanArgs ? argName - || abort '' - `specialArgs` are like super important to Cerulean my love... rollback; - magicRollback = magicRollback -> rollback; - activationTimeout = activationTimeout; - confirmTimeout = confirmTimeout; - - remoteBuild = remoteBuild; - sshUser = ssh.user; - sshOpts = - ssh.opts - ++ ( - if elem "-p" ssh.opts - then [] - else ["-p" (toString ssh.port)] - ) - ++ ( - if elem "-A" ssh.opts - then [] - else ["-A"] - ); - }; - }); - - checks = - inputs.deploy-rs.lib - |> mapAttrs (system: deployLib: - deployLib.deployChecks deploy); - }; - }) diff --git a/nix/snow/modules/default.nix b/nix/snow/modules/default.nix deleted file mode 100644 index a5d9f55..0000000 --- a/nix/snow/modules/default.nix +++ /dev/null @@ -1,5 +0,0 @@ -{...}: { - imports = [ - ./outputs.nix - ]; -} diff --git a/nix/snow/modules/outputs.nix b/nix/snow/modules/outputs.nix deleted file mode 100644 index 4f971c4..0000000 --- a/nix/snow/modules/outputs.nix +++ /dev/null @@ -1,37 +0,0 @@ -{lib, ...}: let - inherit - (lib) - mkOption - types - ; -in { - options = { - outputs = mkOption { - type = types.submoduleWith { - modules = [ - { - freeformType = - types.lazyAttrsOf - (types.unique - { - message = '' - No option has been declared for this flake output attribute, so its definitions can't be merged automatically. - Possible solutions: - - Load a module that defines this flake output attribute - - Declare an option for this flake output attribute - - Make sure the output attribute is spelled correctly - - Define the value only once, with a single definition in a single module - ''; - } - types.raw); - } - ]; - }; - description = '' - Raw flake output attributes. Any attribute can be set here, but some - attributes are represented by options, to provide appropriate - configuration merging. - ''; - }; - }; -} diff --git a/snow/Cargo.lock b/snow/Cargo.lock deleted file mode 100644 index 740e3bd..0000000 --- a/snow/Cargo.lock +++ /dev/null @@ -1,1057 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 4 - -[[package]] -name = "aho-corasick" -version = "1.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" -dependencies = [ - "memchr", -] - -[[package]] -name = "anstream" -version = "0.6.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "is_terminal_polyfill", - "utf8parse", -] - -[[package]] -name = "anstyle" -version = "1.0.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" - -[[package]] -name = "anstyle-parse" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" -dependencies = [ - "windows-sys 0.61.2", -] - -[[package]] -name = "anstyle-wincon" -version = "3.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" -dependencies = [ - "anstyle", - "once_cell_polyfill", - "windows-sys 0.61.2", -] - -[[package]] -name = "anyhow" -version = "1.0.102" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" - -[[package]] -name = "bindgen" -version = "0.69.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" -dependencies = [ - "bitflags", - "cexpr", - "clang-sys", - "itertools", - "lazy_static", - "lazycell", - "log", - "prettyplease", - "proc-macro2", - "quote", - "regex", - "rustc-hash", - "shlex", - "syn", - "which", -] - -[[package]] -name = "bitflags" -version = "2.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af" - -[[package]] -name = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom", -] - -[[package]] -name = "cfg-if" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" - -[[package]] -name = "clang-sys" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" -dependencies = [ - "glob", - "libc", - "libloading", -] - -[[package]] -name = "clap" -version = "4.5.60" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2797f34da339ce31042b27d23607e051786132987f595b02ba4f6a6dffb7030a" -dependencies = [ - "clap_builder", - "clap_derive", -] - -[[package]] -name = "clap_builder" -version = "4.5.60" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24a241312cea5059b13574bb9b3861cabf758b879c15190b37b6d6fd63ab6876" -dependencies = [ - "anstream", - "anstyle", - "clap_lex", - "strsim", -] - -[[package]] -name = "clap_derive" -version = "4.5.55" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a92793da1a46a5f2a02a6f4c46c6496b28c43638adea8306fcb0caa1634f24e5" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "clap_lex" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a822ea5bc7590f9d40f1ba12c0dc3c2760f3482c6984db1573ad11031420831" - -[[package]] -name = "colorchoice" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" - -[[package]] -name = "colored" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c" -dependencies = [ - "lazy_static", - "windows-sys 0.59.0", -] - -[[package]] -name = "cstr" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68523903c8ae5aacfa32a0d9ae60cadeb764e1da14ee0d26b1f3089f13a54636" -dependencies = [ - "proc-macro2", - "quote", -] - -[[package]] -name = "ctor" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a2785755761f3ddc1492979ce1e48d2c00d09311c39e4466429188f3dd6501" -dependencies = [ - "quote", - "syn", -] - -[[package]] -name = "either" -version = "1.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" - -[[package]] -name = "equivalent" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" - -[[package]] -name = "errno" -version = "0.3.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" -dependencies = [ - "libc", - "windows-sys 0.61.2", -] - -[[package]] -name = "fastrand" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" - -[[package]] -name = "fern" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4316185f709b23713e41e3195f90edef7fb00c3ed4adc79769cf09cc762a3b29" -dependencies = [ - "colored", - "log", -] - -[[package]] -name = "foldhash" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" - -[[package]] -name = "getrandom" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" -dependencies = [ - "cfg-if", - "libc", - "r-efi", - "wasip2", - "wasip3", -] - -[[package]] -name = "glob" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" - -[[package]] -name = "hashbrown" -version = "0.15.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" -dependencies = [ - "foldhash", -] - -[[package]] -name = "hashbrown" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" - -[[package]] -name = "heck" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" - -[[package]] -name = "home" -version = "0.5.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc627f471c528ff0c4a49e1d5e60450c8f6461dd6d10ba9dcd3a61d3dff7728d" -dependencies = [ - "windows-sys 0.61.2", -] - -[[package]] -name = "humantime" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "135b12329e5e3ce057a9f972339ea52bc954fe1e9358ef27f95e89716fbc5424" - -[[package]] -name = "id-arena" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" - -[[package]] -name = "indexmap" -version = "2.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" -dependencies = [ - "equivalent", - "hashbrown 0.16.1", - "serde", - "serde_core", -] - -[[package]] -name = "indoc" -version = "2.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706" -dependencies = [ - "rustversion", -] - -[[package]] -name = "is_terminal_polyfill" -version = "1.70.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" - -[[package]] -name = "itertools" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" - -[[package]] -name = "lazy_static" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" - -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - -[[package]] -name = "leb128fmt" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" - -[[package]] -name = "libc" -version = "0.2.183" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d" - -[[package]] -name = "libloading" -version = "0.8.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" -dependencies = [ - "cfg-if", - "windows-link", -] - -[[package]] -name = "linux-raw-sys" -version = "0.4.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" - -[[package]] -name = "linux-raw-sys" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" - -[[package]] -name = "log" -version = "0.4.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" - -[[package]] -name = "memchr" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" - -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - -[[package]] -name = "nix-bindings-bdwgc-sys" -version = "0.2.1" -source = "git+https://tearforge.net/cry/nixide#716c028bb159e62d3d295c5101d50ee117f027c6" -dependencies = [ - "bindgen", - "pkg-config", -] - -[[package]] -name = "nix-bindings-expr" -version = "0.2.1" -source = "git+https://tearforge.net/cry/nixide#716c028bb159e62d3d295c5101d50ee117f027c6" -dependencies = [ - "anyhow", - "cstr", - "ctor", - "nix-bindings-bdwgc-sys", - "nix-bindings-expr-sys", - "nix-bindings-store", - "nix-bindings-store-sys", - "nix-bindings-util", - "nix-bindings-util-sys", - "pkg-config", - "tempfile", -] - -[[package]] -name = "nix-bindings-expr-sys" -version = "0.2.1" -source = "git+https://tearforge.net/cry/nixide#716c028bb159e62d3d295c5101d50ee117f027c6" -dependencies = [ - "bindgen", - "nix-bindings-store-sys", - "nix-bindings-util-sys", - "pkg-config", -] - -[[package]] -name = "nix-bindings-fetchers" -version = "0.2.1" -source = "git+https://tearforge.net/cry/nixide#716c028bb159e62d3d295c5101d50ee117f027c6" -dependencies = [ - "anyhow", - "cstr", - "ctor", - "nix-bindings-fetchers-sys", - "nix-bindings-store", - "nix-bindings-util", - "tempfile", -] - -[[package]] -name = "nix-bindings-fetchers-sys" -version = "0.2.1" -source = "git+https://tearforge.net/cry/nixide#716c028bb159e62d3d295c5101d50ee117f027c6" -dependencies = [ - "bindgen", - "nix-bindings-util-sys", - "pkg-config", -] - -[[package]] -name = "nix-bindings-flake" -version = "0.2.1" -source = "git+https://tearforge.net/cry/nixide#716c028bb159e62d3d295c5101d50ee117f027c6" -dependencies = [ - "anyhow", - "cstr", - "ctor", - "nix-bindings-expr", - "nix-bindings-fetchers", - "nix-bindings-flake-sys", - "nix-bindings-store", - "nix-bindings-util", - "tempfile", -] - -[[package]] -name = "nix-bindings-flake-sys" -version = "0.2.1" -source = "git+https://tearforge.net/cry/nixide#716c028bb159e62d3d295c5101d50ee117f027c6" -dependencies = [ - "bindgen", - "nix-bindings-bdwgc-sys", - "nix-bindings-expr-sys", - "nix-bindings-fetchers-sys", - "nix-bindings-store-sys", - "nix-bindings-util-sys", - "pkg-config", -] - -[[package]] -name = "nix-bindings-store" -version = "0.2.1" -source = "git+https://tearforge.net/cry/nixide#716c028bb159e62d3d295c5101d50ee117f027c6" -dependencies = [ - "anyhow", - "nix-bindings-store-sys", - "nix-bindings-util", - "nix-bindings-util-sys", - "pkg-config", - "zerocopy", -] - -[[package]] -name = "nix-bindings-store-sys" -version = "0.2.1" -source = "git+https://tearforge.net/cry/nixide#716c028bb159e62d3d295c5101d50ee117f027c6" -dependencies = [ - "bindgen", - "nix-bindings-util-sys", - "pkg-config", - "zerocopy", -] - -[[package]] -name = "nix-bindings-util" -version = "0.2.1" -source = "git+https://tearforge.net/cry/nixide#716c028bb159e62d3d295c5101d50ee117f027c6" -dependencies = [ - "anyhow", - "nix-bindings-util-sys", -] - -[[package]] -name = "nix-bindings-util-sys" -version = "0.2.1" -source = "git+https://tearforge.net/cry/nixide#716c028bb159e62d3d295c5101d50ee117f027c6" -dependencies = [ - "bindgen", - "pkg-config", -] - -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - -[[package]] -name = "once_cell" -version = "1.21.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" - -[[package]] -name = "once_cell_polyfill" -version = "1.70.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" - -[[package]] -name = "pkg-config" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" - -[[package]] -name = "prettyplease" -version = "0.2.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" -dependencies = [ - "proc-macro2", - "syn", -] - -[[package]] -name = "proc-macro2" -version = "1.0.106" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "r-efi" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" - -[[package]] -name = "regex" -version = "1.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" - -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - -[[package]] -name = "rustix" -version = "0.38.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" -dependencies = [ - "bitflags", - "errno", - "libc", - "linux-raw-sys 0.4.15", - "windows-sys 0.59.0", -] - -[[package]] -name = "rustix" -version = "1.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" -dependencies = [ - "bitflags", - "errno", - "libc", - "linux-raw-sys 0.12.1", - "windows-sys 0.61.2", -] - -[[package]] -name = "rustversion" -version = "1.0.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" - -[[package]] -name = "semver" -version = "1.0.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" - -[[package]] -name = "serde" -version = "1.0.228" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" -dependencies = [ - "serde_core", -] - -[[package]] -name = "serde_core" -version = "1.0.228" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.228" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "serde_json" -version = "1.0.149" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" -dependencies = [ - "itoa", - "memchr", - "serde", - "serde_core", - "zmij", -] - -[[package]] -name = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - -[[package]] -name = "snow" -version = "0.1.0" -dependencies = [ - "anyhow", - "clap", - "fern", - "humantime", - "indoc", - "log", - "nix-bindings-expr", - "nix-bindings-fetchers", - "nix-bindings-flake", - "nix-bindings-store", -] - -[[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.117" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "tempfile" -version = "3.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" -dependencies = [ - "fastrand", - "getrandom", - "once_cell", - "rustix 1.1.4", - "windows-sys 0.61.2", -] - -[[package]] -name = "unicode-ident" -version = "1.0.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" - -[[package]] -name = "unicode-xid" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" - -[[package]] -name = "utf8parse" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" - -[[package]] -name = "wasip2" -version = "1.0.2+wasi-0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" -dependencies = [ - "wit-bindgen", -] - -[[package]] -name = "wasip3" -version = "0.4.0+wasi-0.3.0-rc-2026-01-06" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" -dependencies = [ - "wit-bindgen", -] - -[[package]] -name = "wasm-encoder" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" -dependencies = [ - "leb128fmt", - "wasmparser", -] - -[[package]] -name = "wasm-metadata" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" -dependencies = [ - "anyhow", - "indexmap", - "wasm-encoder", - "wasmparser", -] - -[[package]] -name = "wasmparser" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" -dependencies = [ - "bitflags", - "hashbrown 0.15.5", - "indexmap", - "semver", -] - -[[package]] -name = "which" -version = "4.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" -dependencies = [ - "either", - "home", - "once_cell", - "rustix 0.38.44", -] - -[[package]] -name = "windows-link" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" - -[[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-sys" -version = "0.61.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" -dependencies = [ - "windows-link", -] - -[[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 = "wit-bindgen" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" -dependencies = [ - "wit-bindgen-rust-macro", -] - -[[package]] -name = "wit-bindgen-core" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc" -dependencies = [ - "anyhow", - "heck", - "wit-parser", -] - -[[package]] -name = "wit-bindgen-rust" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" -dependencies = [ - "anyhow", - "heck", - "indexmap", - "prettyplease", - "syn", - "wasm-metadata", - "wit-bindgen-core", - "wit-component", -] - -[[package]] -name = "wit-bindgen-rust-macro" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a" -dependencies = [ - "anyhow", - "prettyplease", - "proc-macro2", - "quote", - "syn", - "wit-bindgen-core", - "wit-bindgen-rust", -] - -[[package]] -name = "wit-component" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" -dependencies = [ - "anyhow", - "bitflags", - "indexmap", - "log", - "serde", - "serde_derive", - "serde_json", - "wasm-encoder", - "wasm-metadata", - "wasmparser", - "wit-parser", -] - -[[package]] -name = "wit-parser" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" -dependencies = [ - "anyhow", - "id-arena", - "indexmap", - "log", - "semver", - "serde", - "serde_derive", - "serde_json", - "unicode-xid", - "wasmparser", -] - -[[package]] -name = "zerocopy" -version = "0.8.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2578b716f8a7a858b7f02d5bd870c14bf4ddbbcf3a4c05414ba6503640505e3" -dependencies = [ - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.8.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e6cc098ea4d3bd6246687de65af3f920c430e236bee1e3bf2e441463f08a02f" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "zmij" -version = "1.0.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" diff --git a/snow/Cargo.toml b/snow/Cargo.toml deleted file mode 100644 index 2604bda..0000000 --- a/snow/Cargo.toml +++ /dev/null @@ -1,20 +0,0 @@ -[package] -name = "snow" -description = "Cerulean CLI (Wowzers!!)" -version = "0.1.0" -authors = ["_cry64 "] -edition = "2024" - -[dependencies] -nix-bindings-expr = { git = "https://tearforge.net/cry/nixide" } -nix-bindings-flake = { git = "https://tearforge.net/cry/nixide" } -nix-bindings-fetchers = { git = "https://tearforge.net/cry/nixide" } -nix-bindings-store = { git = "https://tearforge.net/cry/nixide" } - -indoc = "2" -anyhow = "1.0.102" - -clap = { version = "4.5.60", features = ["derive"] } -log = "0.4.29" -fern = { version="0.7.1", features = ["colored"] } -humantime = "2.3.0" diff --git a/snow/flake.bak/crates.nix b/snow/flake.bak/crates.nix deleted file mode 100644 index d47c0ab..0000000 --- a/snow/flake.bak/crates.nix +++ /dev/null @@ -1,49 +0,0 @@ -{...}: { - perSystem = { - config, - pkgs, - ... - }: { - nix-bindings-rust.nixPackage = pkgs.nix; - - # declare projects - nci.projects."cerulean-project" = { - path = ./.; - # export all crates (packages and devshell) in flake outputs - # alternatively you can access the outputs and export them yourself - export = true; - - depsDrvConfig = { - imports = [config.nix-bindings-rust.nciBuildConfig]; - }; - }; - # configure crates - nci.crates."cerulean" = rec { - # profiles.release = rec { - default = true; - runTests = true; - - drvConfig = - depsDrvConfig - // { - env.CARGO_TERM_VERBOSE = "true"; - }; - - depsDrvConfig = rec { - env.LD_LIBRARY_PATH = "$LD_LIBRARY_PATH:${builtins.toString (pkgs.lib.makeLibraryPath mkDerivation.buildInputs)}"; - - mkDerivation = { - buildInputs = with pkgs; [ - boehmgc.dev - nix.dev - ]; - nativeBuildInputs = with pkgs; [ - pkg-config - rustPlatform.bindgenHook - ]; - }; - }; - # }; - }; - }; -} diff --git a/snow/flake.bak/flake.lock b/snow/flake.bak/flake.lock deleted file mode 100644 index 419d1fe..0000000 --- a/snow/flake.bak/flake.lock +++ /dev/null @@ -1,787 +0,0 @@ -{ - "nodes": { - "crane": { - "flake": false, - "locked": { - "lastModified": 1758758545, - "narHash": "sha256-NU5WaEdfwF6i8faJ2Yh+jcK9vVFrofLcwlD/mP65JrI=", - "owner": "ipetkov", - "repo": "crane", - "rev": "95d528a5f54eaba0d12102249ce42f4d01f4e364", - "type": "github" - }, - "original": { - "owner": "ipetkov", - "ref": "v0.21.1", - "repo": "crane", - "type": "github" - } - }, - "crane_2": { - "flake": false, - "locked": { - "lastModified": 1758758545, - "narHash": "sha256-NU5WaEdfwF6i8faJ2Yh+jcK9vVFrofLcwlD/mP65JrI=", - "owner": "ipetkov", - "repo": "crane", - "rev": "95d528a5f54eaba0d12102249ce42f4d01f4e364", - "type": "github" - }, - "original": { - "owner": "ipetkov", - "ref": "v0.21.1", - "repo": "crane", - "type": "github" - } - }, - "dream2nix": { - "inputs": { - "nixpkgs": [ - "nci", - "nixpkgs" - ], - "purescript-overlay": "purescript-overlay", - "pyproject-nix": "pyproject-nix" - }, - "locked": { - "lastModified": 1765953015, - "narHash": "sha256-5FBZbbWR1Csp3Y2icfRkxMJw/a/5FGg8hCXej2//bbI=", - "owner": "nix-community", - "repo": "dream2nix", - "rev": "69eb01fa0995e1e90add49d8ca5bcba213b0416f", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "dream2nix", - "type": "github" - } - }, - "dream2nix_2": { - "inputs": { - "nixpkgs": [ - "nix-bindings-rust", - "nix-cargo-integration", - "nixpkgs" - ], - "purescript-overlay": "purescript-overlay_2", - "pyproject-nix": "pyproject-nix_2" - }, - "locked": { - "lastModified": 1765953015, - "narHash": "sha256-5FBZbbWR1Csp3Y2icfRkxMJw/a/5FGg8hCXej2//bbI=", - "owner": "nix-community", - "repo": "dream2nix", - "rev": "69eb01fa0995e1e90add49d8ca5bcba213b0416f", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "dream2nix", - "type": "github" - } - }, - "fenix": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ], - "rust-analyzer-src": "rust-analyzer-src" - }, - "locked": { - "lastModified": 1772953398, - "narHash": "sha256-fTTHCaEvPLzWyZFxPud/G9HM3pNYmW/64Kj58hdH4+k=", - "owner": "nix-community", - "repo": "fenix", - "rev": "fc4863887d98fd879cf5f11af1d23d44d9bdd8ae", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "fenix", - "type": "github" - } - }, - "flake-compat": { - "flake": false, - "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_2": { - "flake": false, - "locked": { - "lastModified": 1767039857, - "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", - "owner": "NixOS", - "repo": "flake-compat", - "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_3": { - "flake": false, - "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-parts": { - "inputs": { - "nixpkgs-lib": "nixpkgs-lib" - }, - "locked": { - "lastModified": 1769996383, - "narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "57928607ea566b5db3ad13af0e57e921e6b12381", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_2": { - "inputs": { - "nixpkgs-lib": [ - "nix-bindings-rust", - "nix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1733312601, - "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "git-hooks-nix": { - "inputs": { - "flake-compat": [ - "nix-bindings-rust", - "nix" - ], - "gitignore": [ - "nix-bindings-rust", - "nix" - ], - "nixpkgs": [ - "nix-bindings-rust", - "nix", - "nixpkgs" - ], - "nixpkgs-stable": [ - "nix-bindings-rust", - "nix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1734279981, - "narHash": "sha256-NdaCraHPp8iYMWzdXAt5Nv6sA3MUzlCiGiR586TCwo0=", - "owner": "cachix", - "repo": "git-hooks.nix", - "rev": "aa9f40c906904ebd83da78e7f328cd8aeaeae785", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "git-hooks.nix", - "type": "github" - } - }, - "mk-naked-shell": { - "flake": false, - "locked": { - "lastModified": 1681286841, - "narHash": "sha256-3XlJrwlR0nBiREnuogoa5i1b4+w/XPe0z8bbrJASw0g=", - "owner": "90-008", - "repo": "mk-naked-shell", - "rev": "7612f828dd6f22b7fb332cc69440e839d7ffe6bd", - "type": "github" - }, - "original": { - "owner": "90-008", - "repo": "mk-naked-shell", - "type": "github" - } - }, - "mk-naked-shell_2": { - "flake": false, - "locked": { - "lastModified": 1681286841, - "narHash": "sha256-3XlJrwlR0nBiREnuogoa5i1b4+w/XPe0z8bbrJASw0g=", - "owner": "90-008", - "repo": "mk-naked-shell", - "rev": "7612f828dd6f22b7fb332cc69440e839d7ffe6bd", - "type": "github" - }, - "original": { - "owner": "90-008", - "repo": "mk-naked-shell", - "type": "github" - } - }, - "nci": { - "inputs": { - "crane": "crane", - "dream2nix": "dream2nix", - "mk-naked-shell": "mk-naked-shell", - "nixpkgs": [ - "nixpkgs" - ], - "parts": "parts", - "rust-overlay": "rust-overlay", - "treefmt": "treefmt" - }, - "locked": { - "lastModified": 1772951573, - "narHash": "sha256-ALlAShJadjr4NpaqrJeXX8nrpqJGk571/1JVsSQ0OMI=", - "owner": "90-008", - "repo": "nix-cargo-integration", - "rev": "a7a34450d5a99c6bffa48497528ed9bf809085d6", - "type": "github" - }, - "original": { - "owner": "90-008", - "repo": "nix-cargo-integration", - "type": "github" - } - }, - "nix": { - "inputs": { - "flake-compat": "flake-compat_2", - "flake-parts": "flake-parts_2", - "git-hooks-nix": "git-hooks-nix", - "nixpkgs": [ - "nix-bindings-rust", - "nixpkgs" - ], - "nixpkgs-23-11": "nixpkgs-23-11", - "nixpkgs-regression": "nixpkgs-regression" - }, - "locked": { - "lastModified": 1772224943, - "narHash": "sha256-jJIlRLPPVYu860MVFx4gsRx3sskmLDSRWXXue5tYncw=", - "owner": "NixOS", - "repo": "nix", - "rev": "0acd0566e85e4597269482824711bcde7b518600", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "nix", - "type": "github" - } - }, - "nix-bindings-rust": { - "inputs": { - "flake-parts": "flake-parts", - "nix": "nix", - "nix-cargo-integration": "nix-cargo-integration", - "nixpkgs": "nixpkgs" - }, - "locked": { - "lastModified": 1772492331, - "narHash": "sha256-UrYoUqNVwXLtAB5Q/KIkm0xPLA0DeK+9YbB4HTES558=", - "owner": "nixops4", - "repo": "nix-bindings-rust", - "rev": "7de15fa26057c8cf0b6178ff166e529c09ea89a7", - "type": "github" - }, - "original": { - "owner": "nixops4", - "repo": "nix-bindings-rust", - "type": "github" - } - }, - "nix-cargo-integration": { - "inputs": { - "crane": "crane_2", - "dream2nix": "dream2nix_2", - "mk-naked-shell": "mk-naked-shell_2", - "nixpkgs": [ - "nix-bindings-rust", - "nixpkgs" - ], - "parts": "parts_2", - "rust-overlay": "rust-overlay_2", - "treefmt": "treefmt_2" - }, - "locked": { - "lastModified": 1772260057, - "narHash": "sha256-NaUqM0i6XIGdgRNxxQ9sfgCAVeE2Ko9rz7e19RsNUKw=", - "owner": "90-008", - "repo": "nix-cargo-integration", - "rev": "c783c5dff02c06f2af6226d4dd4d494542d0a4d2", - "type": "github" - }, - "original": { - "owner": "90-008", - "repo": "nix-cargo-integration", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1772198003, - "narHash": "sha256-I45esRSssFtJ8p/gLHUZ1OUaaTaVLluNkABkk6arQwE=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "dd9b079222d43e1943b6ebd802f04fd959dc8e61", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-23-11": { - "locked": { - "lastModified": 1717159533, - "narHash": "sha256-oamiKNfr2MS6yH64rUn99mIZjc45nGJlj9eGth/3Xuw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "a62e6edd6d5e1fa0329b8653c801147986f8d446", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "a62e6edd6d5e1fa0329b8653c801147986f8d446", - "type": "github" - } - }, - "nixpkgs-lib": { - "locked": { - "lastModified": 1769909678, - "narHash": "sha256-cBEymOf4/o3FD5AZnzC3J9hLbiZ+QDT/KDuyHXVJOpM=", - "owner": "nix-community", - "repo": "nixpkgs.lib", - "rev": "72716169fe93074c333e8d0173151350670b824c", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixpkgs.lib", - "type": "github" - } - }, - "nixpkgs-lib_2": { - "locked": { - "lastModified": 1772328832, - "narHash": "sha256-e+/T/pmEkLP6BHhYjx6GmwP5ivonQQn0bJdH9YrRB+Q=", - "owner": "nix-community", - "repo": "nixpkgs.lib", - "rev": "c185c7a5e5dd8f9add5b2f8ebeff00888b070742", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixpkgs.lib", - "type": "github" - } - }, - "nixpkgs-regression": { - "locked": { - "lastModified": 1643052045, - "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1772773019, - "narHash": "sha256-E1bxHxNKfDoQUuvriG71+f+s/NT0qWkImXsYZNFFfCs=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "aca4d95fce4914b3892661bcb80b8087293536c6", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "parts": { - "inputs": { - "nixpkgs-lib": [ - "nci", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1772408722, - "narHash": "sha256-rHuJtdcOjK7rAHpHphUb1iCvgkU3GpfvicLMwwnfMT0=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "f20dc5d9b8027381c474144ecabc9034d6a839a3", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "parts_2": { - "inputs": { - "nixpkgs-lib": [ - "nix-bindings-rust", - "nix-cargo-integration", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1769996383, - "narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "57928607ea566b5db3ad13af0e57e921e6b12381", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "parts_3": { - "inputs": { - "nixpkgs-lib": "nixpkgs-lib_2" - }, - "locked": { - "lastModified": 1772408722, - "narHash": "sha256-rHuJtdcOjK7rAHpHphUb1iCvgkU3GpfvicLMwwnfMT0=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "f20dc5d9b8027381c474144ecabc9034d6a839a3", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "purescript-overlay": { - "inputs": { - "flake-compat": "flake-compat", - "nixpkgs": [ - "nci", - "dream2nix", - "nixpkgs" - ], - "slimlock": "slimlock" - }, - "locked": { - "lastModified": 1728546539, - "narHash": "sha256-Sws7w0tlnjD+Bjck1nv29NjC5DbL6nH5auL9Ex9Iz2A=", - "owner": "thomashoneyman", - "repo": "purescript-overlay", - "rev": "4ad4c15d07bd899d7346b331f377606631eb0ee4", - "type": "github" - }, - "original": { - "owner": "thomashoneyman", - "repo": "purescript-overlay", - "type": "github" - } - }, - "purescript-overlay_2": { - "inputs": { - "flake-compat": "flake-compat_3", - "nixpkgs": [ - "nix-bindings-rust", - "nix-cargo-integration", - "dream2nix", - "nixpkgs" - ], - "slimlock": "slimlock_2" - }, - "locked": { - "lastModified": 1728546539, - "narHash": "sha256-Sws7w0tlnjD+Bjck1nv29NjC5DbL6nH5auL9Ex9Iz2A=", - "owner": "thomashoneyman", - "repo": "purescript-overlay", - "rev": "4ad4c15d07bd899d7346b331f377606631eb0ee4", - "type": "github" - }, - "original": { - "owner": "thomashoneyman", - "repo": "purescript-overlay", - "type": "github" - } - }, - "pyproject-nix": { - "inputs": { - "nixpkgs": [ - "nci", - "dream2nix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1763017646, - "narHash": "sha256-Z+R2lveIp6Skn1VPH3taQIuMhABg1IizJd8oVdmdHsQ=", - "owner": "pyproject-nix", - "repo": "pyproject.nix", - "rev": "47bd6f296502842643078d66128f7b5e5370790c", - "type": "github" - }, - "original": { - "owner": "pyproject-nix", - "repo": "pyproject.nix", - "type": "github" - } - }, - "pyproject-nix_2": { - "inputs": { - "nixpkgs": [ - "nix-bindings-rust", - "nix-cargo-integration", - "dream2nix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1763017646, - "narHash": "sha256-Z+R2lveIp6Skn1VPH3taQIuMhABg1IizJd8oVdmdHsQ=", - "owner": "pyproject-nix", - "repo": "pyproject.nix", - "rev": "47bd6f296502842643078d66128f7b5e5370790c", - "type": "github" - }, - "original": { - "owner": "pyproject-nix", - "repo": "pyproject.nix", - "type": "github" - } - }, - "root": { - "inputs": { - "fenix": "fenix", - "nci": "nci", - "nix-bindings-rust": "nix-bindings-rust", - "nixpkgs": "nixpkgs_2", - "parts": "parts_3", - "systems": "systems" - } - }, - "rust-analyzer-src": { - "flake": false, - "locked": { - "lastModified": 1772877513, - "narHash": "sha256-RcRGv2Bng5I9y75XwFX7oK2l6mLH1dtbTTG9U8qun0c=", - "owner": "rust-lang", - "repo": "rust-analyzer", - "rev": "a1b86d600f88be98643e5dd61d6ed26eda17c09e", - "type": "github" - }, - "original": { - "owner": "rust-lang", - "ref": "nightly", - "repo": "rust-analyzer", - "type": "github" - } - }, - "rust-overlay": { - "inputs": { - "nixpkgs": [ - "nci", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1772939270, - "narHash": "sha256-HbxD5DJAKxzo0G8on5wdY+OZNiUWt3FTvGmXmVEmg7g=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "bb93f191a07c0165992ed6d0b4197ee5c7e6e641", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, - "rust-overlay_2": { - "inputs": { - "nixpkgs": [ - "nix-bindings-rust", - "nix-cargo-integration", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1772247314, - "narHash": "sha256-x6IFQ9bL7YYfW2m2z8D3Em2YtAA3HE8kiCFwai2fwrw=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "a1ab5e89ab12e1a37c0b264af6386a7472d68a15", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, - "slimlock": { - "inputs": { - "nixpkgs": [ - "nci", - "dream2nix", - "purescript-overlay", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1688756706, - "narHash": "sha256-xzkkMv3neJJJ89zo3o2ojp7nFeaZc2G0fYwNXNJRFlo=", - "owner": "thomashoneyman", - "repo": "slimlock", - "rev": "cf72723f59e2340d24881fd7bf61cb113b4c407c", - "type": "github" - }, - "original": { - "owner": "thomashoneyman", - "repo": "slimlock", - "type": "github" - } - }, - "slimlock_2": { - "inputs": { - "nixpkgs": [ - "nix-bindings-rust", - "nix-cargo-integration", - "dream2nix", - "purescript-overlay", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1688756706, - "narHash": "sha256-xzkkMv3neJJJ89zo3o2ojp7nFeaZc2G0fYwNXNJRFlo=", - "owner": "thomashoneyman", - "repo": "slimlock", - "rev": "cf72723f59e2340d24881fd7bf61cb113b4c407c", - "type": "github" - }, - "original": { - "owner": "thomashoneyman", - "repo": "slimlock", - "type": "github" - } - }, - "systems": { - "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", - "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default-linux", - "type": "github" - } - }, - "treefmt": { - "inputs": { - "nixpkgs": [ - "nci", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1772660329, - "narHash": "sha256-IjU1FxYqm+VDe5qIOxoW+pISBlGvVApRjiw/Y/ttJzY=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "3710e0e1218041bbad640352a0440114b1e10428", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" - } - }, - "treefmt_2": { - "inputs": { - "nixpkgs": [ - "nix-bindings-rust", - "nix-cargo-integration", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1770228511, - "narHash": "sha256-wQ6NJSuFqAEmIg2VMnLdCnUc0b7vslUohqqGGD+Fyxk=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "337a4fe074be1042a35086f15481d763b8ddc0e7", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/snow/flake.bak/flake.nix b/snow/flake.bak/flake.nix deleted file mode 100644 index dade3d1..0000000 --- a/snow/flake.bak/flake.nix +++ /dev/null @@ -1,61 +0,0 @@ -{ - description = "Cerulean CLI"; - - inputs = { - systems.url = "github:nix-systems/default-linux"; - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - - parts = { - url = "github:hercules-ci/flake-parts"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - nci = { - url = "github:90-008/nix-cargo-integration"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - nix-bindings-rust.url = "github:nixops4/nix-bindings-rust"; - - fenix = { - url = "github:nix-community/fenix"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - }; - - outputs = inputs @ { - parts, - nci, - nix-bindings-rust, - ... - }: - parts.lib.mkFlake {inherit inputs;} { - imports = [ - parts.flakeModules.easyOverlay - nci.flakeModule - nix-bindings-rust.modules.flake.default - ./crates.nix - ]; - - systems = import inputs.systems; - - perSystem = { - config, - pkgs, - ... - }: let - outputs = config.nci.outputs; - in { - overlayAttrs = { - cerulean = outputs."cerulean".packages.default; - }; - - # nix-bindings-rust.nixPackage = pkgs.nix; - - devShells.default = outputs."cerulean-project".devShell; - - packages = rec { - inherit (pkgs) cerulean; - default = cerulean; - }; - }; - }; -} diff --git a/snow/flake.lock b/snow/flake.lock deleted file mode 100644 index 67d4e29..0000000 --- a/snow/flake.lock +++ /dev/null @@ -1,82 +0,0 @@ -{ - "nodes": { - "fenix": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ], - "rust-analyzer-src": "rust-analyzer-src" - }, - "locked": { - "lastModified": 1772953398, - "narHash": "sha256-fTTHCaEvPLzWyZFxPud/G9HM3pNYmW/64Kj58hdH4+k=", - "owner": "nix-community", - "repo": "fenix", - "rev": "fc4863887d98fd879cf5f11af1d23d44d9bdd8ae", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "fenix", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1772822230, - "narHash": "sha256-yf3iYLGbGVlIthlQIk5/4/EQDZNNEmuqKZkQssMljuw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "71caefce12ba78d84fe618cf61644dce01cf3a96", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-25.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "fenix": "fenix", - "nixpkgs": "nixpkgs", - "systems": "systems" - } - }, - "rust-analyzer-src": { - "flake": false, - "locked": { - "lastModified": 1772877513, - "narHash": "sha256-RcRGv2Bng5I9y75XwFX7oK2l6mLH1dtbTTG9U8qun0c=", - "owner": "rust-lang", - "repo": "rust-analyzer", - "rev": "a1b86d600f88be98643e5dd61d6ed26eda17c09e", - "type": "github" - }, - "original": { - "owner": "rust-lang", - "ref": "nightly", - "repo": "rust-analyzer", - "type": "github" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/snow/flake.nix b/snow/flake.nix deleted file mode 100644 index f2b9703..0000000 --- a/snow/flake.nix +++ /dev/null @@ -1,99 +0,0 @@ -{ - description = "Cerulean CLI"; - - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11"; - systems.url = "github:nix-systems/default"; - - fenix.url = "github:nix-community/fenix"; - fenix.inputs.nixpkgs.follows = "nixpkgs"; - }; - - outputs = { - self, - nixpkgs, - ... - } @ inputs: let - systems = import inputs.systems; - - mkPkgs = system: repo: - import repo { - inherit system; - allowUnfree = false; - allowBroken = false; - overlays = builtins.attrValues self.overlays or {}; - }; - - forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system (mkPkgs system nixpkgs)); - in { - overlays.default = final: prev: { - libclang = prev.llvmPackages_21.libclang; - - # ttywire = pkgs.rustPlatform.buildRustPackage { - # pname = "cerulean"; - # version = "0.1.0"; - # src = ./.; - # - # cargoHash = "sha256-NxFdFCuB456uBeVeqT2bsRtBrIoLdijBaga7VB9KPF8="; - # - # # runtime dependencies (propagated out of derivation) - # buildInputs = with pkgs; [ - # boehmgc.dev - # nix.dev - # ]; - # - # # build-time/shellHook dependencies (not propagates) - # nativeBuildInputs = with pkgs; [ - # pkg-config - # ]; - # - # meta = with lib; { - # description = "Cerulean CLI"; - # homepage = "https://github.com/cry128/cerulean"; - # license = lib.licenses.asl20; - # maintainers = with maintainers; [ - # cry64 - # ]; - # }; - # }; - }; - - checks = self.packages or {}; - - # packages = forAllSystems ( - # system: pkgs: rec { - # inherit (pkgs) ttywire; - # default = ttywire; - # } - # ); - - devShells = forAllSystems ( - system: pkgs: { - default = pkgs.mkShell rec { - shell = "${pkgs.bash}/bin/bash"; - strictDeps = true; - - packages = with pkgs; [ - cargo - rustc - inputs.fenix.packages.${system}.complete.rustfmt - ]; - - # packages we should be able to link against - buildInputs = with pkgs; [ - boehmgc.dev - nix.dev - ]; - - # packages we run at build time / shellHook - nativeBuildInputs = with pkgs; [ - pkg-config - rustPlatform.bindgenHook - ]; - - LD_LIBRARY_PATH = "$LD_LIBRARY_PATH:${builtins.toString (pkgs.lib.makeLibraryPath buildInputs)}"; - }; - } - ); - }; -} diff --git a/snow/src/main.rs b/snow/src/main.rs deleted file mode 100644 index ea800e1..0000000 --- a/snow/src/main.rs +++ /dev/null @@ -1,28 +0,0 @@ -mod nix; - -use nix_bindings_expr::eval_state::{gc_register_my_thread, init, EvalState}; -use nix_bindings_store::store::Store; -use std::collections::HashMap; - -fn main() -> anyhow::Result<()> { - // Initialize Nix library and register thread with GC - init()?; - let guard = gc_register_my_thread()?; - - // Open a store connection and create an evaluation state - let store = Store::open(None, HashMap::new())?; - let mut eval_state = EvalState::new(store, [])?; - - // Evaluate a Nix expression - let value = eval_state.eval_from_string("[1 2 3]", "")?; - - // Extract typed values - let elements: Vec<_> = eval_state.require_list_strict(&value)?; - for element in elements { - let num = eval_state.require_int(&element)?; - println!("Element: {}", num); - } - - drop(guard); - Ok(()) -} diff --git a/snow/src/nix/flake.rs b/snow/src/nix/flake.rs deleted file mode 100644 index a741f66..0000000 --- a/snow/src/nix/flake.rs +++ /dev/null @@ -1,114 +0,0 @@ -use std::{cell::RefCell, collections::HashMap, rc::Rc}; - -use anyhow::Result; -use nix_bindings_expr::{eval_state::EvalState, value::Value}; -use nix_bindings_fetchers::FetchersSettings; -use nix_bindings_flake::{FlakeLockFlags, FlakeSettings, LockedFlake}; -use nix_bindings_store::store::Store; - -use crate::nix::FlakeRef; - -#[derive(Debug, Clone)] -pub enum FlakeLockMode { - /// Configures [LockedFlake::lock] to make incremental changes to the lock file as needed. Changes are written to file. - WriteAsNeeded, - - /// Like [FlakeLockMode::WriteAsNeeded], but does not write to the lock file. - Virtual, - - /// Make [LockedFlake::lock] check if the lock file is up to date. If not, an error is returned. - Check, -} - -pub struct FlakeBuilder { - flake_ref: Rc>, - - lock_mode: FlakeLockMode, - lock_flags: FlakeLockFlags, - eval_state: Option, -} - -pub struct Flake { - flake_ref: Rc>, - locked_flake: LockedFlake, - - lock_mode: FlakeLockMode, - eval_state: EvalState, -} - -impl FlakeBuilder { - pub fn new(flake_ref: Rc>, lock_mode: FlakeLockMode) -> Result { - let mut lock_flags = FlakeLockFlags::new(&flake_ref.as_ref().borrow().flake_settings)?; - - match lock_mode { - FlakeLockMode::WriteAsNeeded => lock_flags.set_mode_write_as_needed(), - FlakeLockMode::Virtual => lock_flags.set_mode_virtual(), - FlakeLockMode::Check => lock_flags.set_mode_check(), - }?; - - Ok(FlakeBuilder { - flake_ref: flake_ref, - - lock_mode, - lock_flags, - eval_state: None, - }) - } - - /// Adds an input override to the lock file that will be produced. - /// The [LockedFlake::lock] operation will not write to the lock file. - /// - /// # Arguments - /// - /// * `path` - The input name/path to override (must not be empty) - /// * `flake_ref` - The flake reference to use as the override - pub fn override_input(mut self, path: &str, flake_ref: &FlakeRef) -> Result { - assert!( - !path.is_empty(), - "The input path for `FlakeBuilder::override_input` cannot be an empty string slice!" - ); - - self.lock_flags.add_input_override(path, &flake_ref.ref_)?; - Ok(self) - } - - pub fn build(&mut self) -> Result { - let eval_state = match self.eval_state.take() { - Some(state) => state, - None => { - let store = Store::open(None, HashMap::new())?; - EvalState::new(store, [])? - } - }; - - let locked_flake = LockedFlake::lock( - &FetchersSettings::new()?, - &FlakeSettings::new()?, - &eval_state, - &self.lock_flags, - &self.flake_ref.as_ref().borrow().ref_, - )?; - - Ok(Flake { - flake_ref: Rc::clone(&self.flake_ref), - locked_flake, - - lock_mode: self.lock_mode.clone(), - eval_state, - }) - } -} - -impl Flake { - pub fn new(flake_ref: Rc>, lock_mode: FlakeLockMode) -> Result { - let mut builder = FlakeBuilder::new(flake_ref, lock_mode)?; - builder.build() - } - - pub fn outputs(&mut self) -> Result { - self.locked_flake.outputs( - &self.flake_ref.as_ref().borrow().flake_settings, - &mut self.eval_state, - ) - } -} diff --git a/snow/src/nix/flakeref.rs b/snow/src/nix/flakeref.rs deleted file mode 100644 index 6bc99be..0000000 --- a/snow/src/nix/flakeref.rs +++ /dev/null @@ -1,79 +0,0 @@ -use std::path::{Path, PathBuf}; - -use anyhow::{Context, Result}; -use indoc::indoc; -use nix_bindings_fetchers::FetchersSettings; -use nix_bindings_flake::{FlakeReference, FlakeReferenceParseFlags, FlakeSettings}; - -pub struct FlakeRef { - pub(super) ref_: FlakeReference, - pub path: PathBuf, - - pub flake_settings: FlakeSettings, - pub fetch_settings: FetchersSettings, -} - -impl FlakeRef { - /// Parse a flake reference from a string. - /// The string must be a valid flake reference, such as `github:owner/repo`. - /// It may also be suffixed with a `#` and a fragment, such as `github:owner/repo#something`, - /// in which case, the returned `flake_ref.path` will contain the fragment. - pub fn new>(reference: &str, base_directory: Option

) -> Result { - let flake_settings = FlakeSettings::new()?; - let fetch_settings = FetchersSettings::new()?; - - let mut flags = FlakeReferenceParseFlags::new(&flake_settings)?; - - if let Some(base_directory) = base_directory { - flags.set_base_directory( - base_directory - .as_ref() - .to_str() - .context("The given flake reference path is not provided as valid unicode")?, - )?; - } else { - // TODO: try see if libnix uses the cwd as a fallback (aka is this assert pointless?) - assert!( - reference.starts_with("."), - indoc! {" - Attempted to construct FlakeRef from relative path without declaring `base_directory`! - Call to `FlakeRef::absolute(&str)` should actually be `FlakeRef::relative(&str, dyn AsRef)`. - "} - ); - } - - FlakeReference::parse_with_fragment(&fetch_settings, &flake_settings, &flags, reference) - .map(|(reference, path)| FlakeRef { - ref_: reference, - path: PathBuf::from(path), - flake_settings, - fetch_settings, - }) - } - - /// >[!WARNING] - /// > Do not use [FlakeRef::absolute(&str)](FlakeRef::absolute) to construct a [FlakeRef] from a relative path! - /// > Use [FlakeRef::relative(&str, dyn AsRef)](FlakeRef::relative) instead to declare the `base_directory`. - /// - /// Parse a flake reference from a string. - /// The string must be a valid flake reference, such as `github:owner/repo`. - /// It may also be suffixed with a `#` and a fragment, such as `github:owner/repo#something`, - /// in which case, the returned `flake_ref.path` will contain the fragment. - pub fn absolute(reference: &str) -> Result { - FlakeRef::new(reference, None::<&Path>) - } - - /// Parse a flake reference from a string. - /// The string must be a valid flake reference, such as `github:owner/repo`. - /// It may also be suffixed with a `#` and a fragment, such as `github:owner/repo#something`, - /// in which case, the returned `flake_ref.path` will contain the fragment. - pub fn relative>(reference: &str, base_directory: P) -> Result { - FlakeRef::new(reference, Some(base_directory)) - } -} - -impl Into for FlakeRef { - fn into(self) -> FlakeReference { - self.ref_ - } -} diff --git a/snow/src/nix/mod.rs b/snow/src/nix/mod.rs deleted file mode 100644 index 35ddad3..0000000 --- a/snow/src/nix/mod.rs +++ /dev/null @@ -1,9 +0,0 @@ -mod flake; -mod flakeref; -mod nix; -mod primop; - -pub use flake::{Flake, FlakeBuilder, FlakeLockMode}; -pub use flakeref::FlakeRef; -pub use nix::Nix; -pub use primop::PrimOp; diff --git a/snow/src/nix/nix.rs b/snow/src/nix/nix.rs deleted file mode 100644 index 7b4eebb..0000000 --- a/snow/src/nix/nix.rs +++ /dev/null @@ -1,10 +0,0 @@ -use std::path::Path; - -use anyhow::{Context, Result}; -use derive_more::From; -use nix_bindings_fetchers::FetchersSettings; -use nix_bindings_flake::{FlakeReference, FlakeReferenceParseFlags, FlakeSettings}; - -pub struct Nix {} - -impl Nix {} diff --git a/snow/src/nix/primop.rs b/snow/src/nix/primop.rs deleted file mode 100644 index dab96b5..0000000 --- a/snow/src/nix/primop.rs +++ /dev/null @@ -1,40 +0,0 @@ -use std::ffi::{CStr, CString, NulError}; - -use anyhow::Result; -use nix_bindings_expr::{eval_state::EvalState, primop::PrimOpMeta, value::Value}; - -pub struct PrimOp<'a, const N: usize> { - // pub name: &'a CStr, - // pub doc: &'a CStr, - // pub args: [&'a CStr; N], - meta: PrimOpMeta<'a, N>, - // f: Box Result>, -} - -impl<'a, const N: usize> PrimOp<'a, N> { - pub fn new(name: S, doc: S, args: [&'a CStr; N]) -> Result - where - S: AsRef, - { - let name = CString::new(name.as_ref())?.as_ref(); - let doc = CString::new(doc.as_ref())?.as_ref(); - // let args = args - // .iter() - // .map(|x| CString::new(x.as_ref()).as_ref()) - // .collect::, &NulError>>()? - // .iter() - // .map(|x| x.as_ref()) - // .collect::>() - // .as_slice(); - - Ok(PrimOp { - // name, - // doc, - // args, - meta: PrimOpMeta { name, doc, args }, - }) - // Ok(PrimOp { - // meta: PrimOpMeta { name, doc, args }, - // }) - } -}