From 2883ed33f38a266d24357c59c03adc0a7551372f Mon Sep 17 00:00:00 2001 From: Nathan Regner Date: Sat, 26 Oct 2024 21:44:12 -0600 Subject: [PATCH 1/6] build: update inputs --- examples/marlin/platformio2nix.lock | 24 ++++++++--------- flake.lock | 41 +++++++++++++---------------- flake.nix | 6 ++--- 3 files changed, 32 insertions(+), 39 deletions(-) diff --git a/examples/marlin/platformio2nix.lock b/examples/marlin/platformio2nix.lock index 9e3c607..1dfe428 100644 --- a/examples/marlin/platformio2nix.lock +++ b/examples/marlin/platformio2nix.lock @@ -5,7 +5,7 @@ "name": "atmelavr", "install_path": "platforms/atmelavr", "version": "4.0.1", - "manifest": "{\"type\":\"platform\",\"version\":\"4.0.1\",\"spec\":{\"owner\":\"platformio\",\"name\":\"atmelavr\",\"uri\":null,\"id\":8006,\"requirements\":null},\"name\":\"atmelavr\"}", + "manifest": "{\"type\":\"platform\",\"version\":\"4.0.1\",\"spec\":{\"owner\":\"platformio\",\"name\":\"atmelavr\",\"id\":8006,\"requirements\":null,\"uri\":null},\"name\":\"atmelavr\"}", "systems": { "aarch64-linux": { "url": "https://dl.registry.platformio.org/download/platformio/platform/atmelavr/4.0.1/atmelavr-4.0.1.tar.gz", @@ -29,7 +29,7 @@ "name": "framework-arduino-avr", "install_path": "packages/framework-arduino-avr", "version": "5.1.0", - "manifest": "{\"type\":\"tool\",\"version\":\"5.1.0\",\"spec\":{\"owner\":\"platformio\",\"name\":\"framework-arduino-avr\",\"uri\":null,\"requirements\":null,\"id\":8039},\"name\":\"framework-arduino-avr\"}", + "manifest": "{\"type\":\"tool\",\"version\":\"5.1.0\",\"spec\":{\"owner\":\"platformio\",\"name\":\"framework-arduino-avr\",\"id\":8039,\"requirements\":null,\"uri\":null},\"name\":\"framework-arduino-avr\"}", "systems": { "aarch64-linux": { "url": "https://dl.registry.platformio.org/download/platformio/tool/framework-arduino-avr/5.1.0/framework-arduino-avr-5.1.0.tar.gz", @@ -52,24 +52,24 @@ "tool-scons": { "name": "tool-scons", "install_path": "packages/tool-scons", - "version": "4.40502.0", - "manifest": "{\"type\":\"tool\",\"version\":\"4.40502.0\",\"spec\":{\"owner\":\"platformio\",\"name\":\"tool-scons\",\"requirements\":null,\"id\":8192,\"uri\":null},\"name\":\"tool-scons\"}", + "version": "4.40700.0", + "manifest": "{\"type\":\"tool\",\"version\":\"4.40700.0\",\"spec\":{\"owner\":\"platformio\",\"name\":\"tool-scons\",\"id\":8192,\"requirements\":null,\"uri\":null},\"name\":\"tool-scons\"}", "systems": { "aarch64-linux": { - "url": "https://dl.registry.platformio.org/download/platformio/tool/tool-scons/4.40502.0/tool-scons-4.40502.0.tar.gz", - "hash": "sha256-6WGOHHj5JnIJXfiEm5Kj4Hyg/BFv8jH/FRRwAjhs2zU=" + "url": "https://dl.registry.platformio.org/download/platformio/tool/tool-scons/4.40700.0/tool-scons-4.40700.0.tar.gz", + "hash": "sha256-AtWAJ9UsR99TNBJ6rb6YZvp+Ega/IZIGb4mx/qIP2VM=" }, "aarch64-darwin": { - "url": "https://dl.registry.platformio.org/download/platformio/tool/tool-scons/4.40502.0/tool-scons-4.40502.0.tar.gz", - "hash": "sha256-6WGOHHj5JnIJXfiEm5Kj4Hyg/BFv8jH/FRRwAjhs2zU=" + "url": "https://dl.registry.platformio.org/download/platformio/tool/tool-scons/4.40700.0/tool-scons-4.40700.0.tar.gz", + "hash": "sha256-AtWAJ9UsR99TNBJ6rb6YZvp+Ega/IZIGb4mx/qIP2VM=" }, "x86_64-linux": { - "url": "https://dl.registry.platformio.org/download/platformio/tool/tool-scons/4.40502.0/tool-scons-4.40502.0.tar.gz", - "hash": "sha256-6WGOHHj5JnIJXfiEm5Kj4Hyg/BFv8jH/FRRwAjhs2zU=" + "url": "https://dl.registry.platformio.org/download/platformio/tool/tool-scons/4.40700.0/tool-scons-4.40700.0.tar.gz", + "hash": "sha256-AtWAJ9UsR99TNBJ6rb6YZvp+Ega/IZIGb4mx/qIP2VM=" }, "x86_64-darwin": { - "url": "https://dl.registry.platformio.org/download/platformio/tool/tool-scons/4.40502.0/tool-scons-4.40502.0.tar.gz", - "hash": "sha256-6WGOHHj5JnIJXfiEm5Kj4Hyg/BFv8jH/FRRwAjhs2zU=" + "url": "https://dl.registry.platformio.org/download/platformio/tool/tool-scons/4.40700.0/tool-scons-4.40700.0.tar.gz", + "hash": "sha256-AtWAJ9UsR99TNBJ6rb6YZvp+Ega/IZIGb4mx/qIP2VM=" } } }, diff --git a/flake.lock b/flake.lock index eeca22f..fc9be8f 100644 --- a/flake.lock +++ b/flake.lock @@ -3,11 +3,11 @@ "advisory-db": { "flake": false, "locked": { - "lastModified": 1719963577, - "narHash": "sha256-So9xYt8LIamo5Cc+DPmj183JbBSyIYLV+QiWqKiTW8E=", + "lastModified": 1729881936, + "narHash": "sha256-Fgyr39xQ0tmGhA9aEZW0onvH8QMKXU5osr48Hz4wvp4=", "owner": "rustsec", "repo": "advisory-db", - "rev": "b4ec7ce7e01ec5b96701cda052493e0a402c8655", + "rev": "c586bd65ec3543e2fe2f21e358f0645220822325", "type": "github" }, "original": { @@ -17,17 +17,12 @@ } }, "crane": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, "locked": { - "lastModified": 1720226507, - "narHash": "sha256-yHVvNsgrpyNTXZBEokL8uyB2J6gB1wEx0KOJzoeZi1A=", + "lastModified": 1729741221, + "narHash": "sha256-8AHZZXs1lFkERfBY0C8cZGElSo33D/et7NKEpLRmvzo=", "owner": "ipetkov", "repo": "crane", - "rev": "0aed560c5c0a61c9385bddff471a13036203e11c", + "rev": "f235b656ee5b2bfd6d94c3bfd67896a575d4a6ed", "type": "github" }, "original": { @@ -41,11 +36,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "lastModified": 1726560853, + "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", "type": "github" }, "original": { @@ -56,11 +51,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1723151389, - "narHash": "sha256-9AVY0ReCmSGXHrlx78+1RrqcDgVSRhHUKDVV1LLBy28=", + "lastModified": 1729951556, + "narHash": "sha256-bpb6r3GjzhNW8l+mWtRtLNg5PhJIae041sPyqcFNGb4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "13fe00cb6c75461901f072ae62b5805baef9f8b2", + "rev": "4e0eec54db79d4d0909f45a88037210ff8eaffee", "type": "github" }, "original": { @@ -87,11 +82,11 @@ ] }, "locked": { - "lastModified": 1720318855, - "narHash": "sha256-w3CCVK9LJ5aznXGkO1IyAlbvMNJfyA+dBF7Z1Zwx1LA=", + "lastModified": 1729996302, + "narHash": "sha256-QEU1NQq1+7s1na69Chig9K0iDDTKN0O4Zreo9A9rccA=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "3eed08a074cd2000884a69d448d70da2843f7103", + "rev": "a1b337569f334ff0a01b57627f17b201d746d24c", "type": "github" }, "original": { @@ -122,11 +117,11 @@ ] }, "locked": { - "lastModified": 1719887753, - "narHash": "sha256-p0B2r98UtZzRDM5miGRafL4h7TwGRC4DII+XXHDHqek=", + "lastModified": 1729613947, + "narHash": "sha256-XGOvuIPW1XRfPgHtGYXd5MAmJzZtOuwlfKDgxX5KT3s=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "bdb6355009562d8f9313d9460c0d3860f525bc6c", + "rev": "aac86347fb5063960eccb19493e0cadcdb4205ca", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index f483dde..f849102 100644 --- a/flake.nix +++ b/flake.nix @@ -6,10 +6,8 @@ flake-utils.url = "github:numtide/flake-utils"; # rust - crane = { - url = "github:ipetkov/crane"; - inputs.nixpkgs.follows = "nixpkgs"; - }; + crane.url = "github:ipetkov/crane"; + rust-overlay = { url = "github:oxalica/rust-overlay"; inputs.nixpkgs.follows = "nixpkgs"; From 21b6c727648c4ce2410b7ed232647e861e98fdb4 Mon Sep 17 00:00:00 2001 From: Nathan Regner Date: Sat, 26 Oct 2024 21:47:55 -0600 Subject: [PATCH 2/6] build: update dependencies --- cli/Cargo.lock | 594 ++++++++++++++++++++----------------------------- 1 file changed, 245 insertions(+), 349 deletions(-) diff --git a/cli/Cargo.lock b/cli/Cargo.lock index f62e46b..adee326 100644 --- a/cli/Cargo.lock +++ b/cli/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "addr2line" @@ -19,9 +19,9 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "anstream" -version = "0.6.14" +version = "0.6.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +checksum = "23a1e53f0f5d86382dafe1cf314783b2044280f406e7e1506368220ad11b1338" dependencies = [ "anstyle", "anstyle-parse", @@ -34,49 +34,49 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.7" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" +checksum = "8365de52b16c035ff4fcafe0092ba9390540e3e352870ac09933bebcaa2c8c56" [[package]] name = "anstyle-parse" -version = "0.2.4" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.0" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.3" +version = "3.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" dependencies = [ "anstyle", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "anyhow" -version = "1.0.86" +version = "1.0.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +checksum = "c042108f3ed77fd83760a5fd79b53be043192bb3b9dba91d8c574c0ada7850c8" [[package]] name = "async-trait" -version = "0.1.80" +version = "0.1.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", @@ -91,9 +91,9 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "backtrace" @@ -131,12 +131,6 @@ dependencies = [ "serde", ] -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - [[package]] name = "bitflags" version = "2.6.0" @@ -160,9 +154,9 @@ checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bytes" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" [[package]] name = "cacache" @@ -193,9 +187,12 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.104" +version = "1.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74b6a57f98764a267ff415d50a25e6e166f3831a5071af4995296ea97d210490" +checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f" +dependencies = [ + "shlex", +] [[package]] name = "cfg-if" @@ -203,11 +200,17 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + [[package]] name = "clap" -version = "4.5.8" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84b3edb18336f4df585bc9aa31dd99c036dfa5dc5e9a2939a722a188f3a8970d" +checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8" dependencies = [ "clap_builder", "clap_derive", @@ -215,9 +218,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.8" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1c09dd5ada6c6c78075d6fd0da3f90d8080651e2d6cc8eb2f1aaa4034ced708" +checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54" dependencies = [ "anstream", "anstyle", @@ -227,9 +230,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.8" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bac35c6dafb060fd4d275d9a4ffae97917c13a6327903a8be2153cd964f7085" +checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" dependencies = [ "heck", "proc-macro2", @@ -239,9 +242,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" [[package]] name = "color-eyre" @@ -272,9 +275,9 @@ dependencies = [ [[package]] name = "colorchoice" -version = "1.0.1" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "core-foundation" @@ -288,15 +291,15 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" dependencies = [ "libc", ] @@ -338,9 +341,9 @@ checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "encoding_rs" -version = "0.8.34" +version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ "cfg-if", ] @@ -373,9 +376,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "fnv" @@ -409,9 +412,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -424,9 +427,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -434,15 +437,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -451,15 +454,15 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", @@ -468,21 +471,21 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -525,9 +528,9 @@ checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "h2" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab" +checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" dependencies = [ "atomic-waker", "bytes", @@ -544,9 +547,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.5" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" [[package]] name = "heck" @@ -571,9 +574,9 @@ dependencies = [ [[package]] name = "homedir" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bed305c13ce3829a09d627f5d43ff738482a09361ae4eb8039993b55fb10e5e" +checksum = "5bdbbd5bc8c5749697ccaa352fa45aff8730cf21c68029c0eef1ffed7c3d6ba2" dependencies = [ "cfg-if", "nix", @@ -594,9 +597,9 @@ dependencies = [ [[package]] name = "http-body" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", "http", @@ -672,9 +675,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.9.4" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" +checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" [[package]] name = "httpdate" @@ -684,9 +687,9 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4fe55fb7a772d59a5ff1dfbff4fe0258d19b89fec4b233e75d35d5d2316badc" +checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a" dependencies = [ "bytes", "futures-channel", @@ -704,9 +707,9 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.2" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155" +checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" dependencies = [ "futures-util", "http", @@ -737,9 +740,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.6" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ab92f4f49ee4fb4f997c784b7a2e0fa70050211e0b6a287f898c3c9785ca956" +checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" dependencies = [ "bytes", "futures-channel", @@ -750,7 +753,6 @@ dependencies = [ "pin-project-lite", "socket2", "tokio", - "tower", "tower-service", "tracing", ] @@ -773,9 +775,9 @@ checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" [[package]] name = "indexmap" -version = "2.2.6" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", "hashbrown", @@ -783,15 +785,15 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.9.0" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" [[package]] name = "is_terminal_polyfill" -version = "1.70.0" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "itoa" @@ -801,9 +803,9 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" dependencies = [ "wasm-bindgen", ] @@ -816,9 +818,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.155" +version = "0.2.161" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" [[package]] name = "linux-raw-sys" @@ -847,15 +849,6 @@ dependencies = [ "libc", ] -[[package]] -name = "memoffset" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" -dependencies = [ - "autocfg", -] - [[package]] name = "miette" version = "5.10.0" @@ -896,13 +889,14 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.11" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ + "hermit-abi", "libc", "wasi", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -924,15 +918,14 @@ dependencies = [ [[package]] name = "nix" -version = "0.26.4" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" +checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" dependencies = [ - "bitflags 1.3.2", + "bitflags", "cfg-if", + "cfg_aliases", "libc", - "memoffset", - "pin-utils", ] [[package]] @@ -941,16 +934,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi", - "libc", -] - [[package]] name = "object" version = "0.32.2" @@ -962,17 +945,17 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "openssl" -version = "0.10.64" +version = "0.10.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" +checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" dependencies = [ - "bitflags 2.6.0", + "bitflags", "cfg-if", "foreign-types", "libc", @@ -1000,9 +983,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.102" +version = "0.9.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" +checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" dependencies = [ "cc", "libc", @@ -1022,31 +1005,11 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" -[[package]] -name = "pin-project" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" [[package]] name = "pin-utils" @@ -1056,9 +1019,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "platformio2nix" @@ -1091,18 +1054,18 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -1120,9 +1083,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.12.5" +version = "0.12.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7d6d2a27d57148378eb5e111173f4276ad26340ecc5c49a4a2152167a2d6a37" +checksum = "f713147fbe92361e52392c73b8c9e48c04c6625bce969ef54dc901e58e042a7b" dependencies = [ "base64 0.22.1", "bytes", @@ -1159,14 +1122,14 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "winreg", + "windows-registry", ] [[package]] name = "reqwest-middleware" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39346a33ddfe6be00cbc17a34ce996818b97b230b87229f10114693becca1268" +checksum = "562ceb5a604d3f7c885a792d42c199fd8af239d0a51b2fa6a78aafa092452b04" dependencies = [ "anyhow", "async-trait", @@ -1200,11 +1163,11 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" dependencies = [ - "bitflags 2.6.0", + "bitflags", "errno", "libc", "linux-raw-sys", @@ -1213,9 +1176,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.10" +version = "0.23.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05cff451f60db80f490f3c182b77c35260baace73209e9cdbbe526bfe3a4d402" +checksum = "5fbb44d7acc4e873d613422379f69f237a1b141928c02f6bc6ccfddddc2d7993" dependencies = [ "once_cell", "rustls-pki-types", @@ -1226,25 +1189,24 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "2.1.2" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" dependencies = [ - "base64 0.22.1", "rustls-pki-types", ] [[package]] name = "rustls-pki-types" -version = "1.7.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" +checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" [[package]] name = "rustls-webpki" -version = "0.102.5" +version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a6fccd794a42c2c105b513a2f62bc3fd8f3ba57a4593677ceb0bd035164d78" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ "ring", "rustls-pki-types", @@ -1268,20 +1230,20 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.23" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "01227be5826fa0690321a2ba6c5cd57a19cf3f6a09e76973b58e61de6ab9d1c1" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "security-framework" -version = "2.11.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.6.0", + "bitflags", "core-foundation", "core-foundation-sys", "libc", @@ -1290,9 +1252,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.0" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" +checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" dependencies = [ "core-foundation-sys", "libc", @@ -1309,18 +1271,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.203" +version = "1.0.213" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" +checksum = "3ea7893ff5e2466df8d720bb615088341b295f849602c6956047f8f80f0e9bc1" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.203" +version = "1.0.213" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" +checksum = "7e85ad2009c50b58e87caa8cd6dac16bdf511bbfb7af6c33df902396aa480fa5" dependencies = [ "proc-macro2", "quote", @@ -1329,11 +1291,12 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.120" +version = "1.0.132" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" +checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] @@ -1402,6 +1365,12 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "slab" version = "0.4.9" @@ -1464,9 +1433,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" -version = "2.0.68" +version = "2.0.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "901fa70d88b9d6c98022e23b4136f9f3e54e4662c3bc1bd1d84a42a9a0f0c1e9" +checksum = "5023162dfcd14ef8f32034d8bcd4cc5ddc61ef7a247c024a33e24e1f24d21b56" dependencies = [ "proc-macro2", "quote", @@ -1478,23 +1447,26 @@ name = "sync_wrapper" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +dependencies = [ + "futures-core", +] [[package]] name = "system-configuration" -version = "0.5.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ - "bitflags 1.3.2", + "bitflags", "core-foundation", "system-configuration-sys", ] [[package]] name = "system-configuration-sys" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" dependencies = [ "core-foundation-sys", "libc", @@ -1502,30 +1474,31 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.10.1" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" dependencies = [ "cfg-if", "fastrand", + "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "thiserror" -version = "1.0.61" +version = "1.0.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" +checksum = "5d11abd9594d9b38965ef50805c5e469ca9cc6f197f883f717e0269a3057b3d5" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.61" +version = "1.0.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" +checksum = "ae71770322cbd277e69d762a16c444af02aa0575ac0d174f0b9562d3b37f8602" dependencies = [ "proc-macro2", "quote", @@ -1575,9 +1548,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.6.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c55115c6fbe2d2bef26eb09ad74bde02d8255476fc0c7b515ef09fbb35742d82" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ "tinyvec_macros", ] @@ -1590,26 +1563,25 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.38.0" +version = "1.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" +checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb" dependencies = [ "backtrace", "bytes", "libc", "mio", - "num_cpus", "pin-project-lite", "socket2", "tokio-macros", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "tokio-macros" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", @@ -1639,9 +1611,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" +checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" dependencies = [ "futures-core", "pin-project-lite", @@ -1650,9 +1622,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.11" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" dependencies = [ "bytes", "futures-core", @@ -1661,32 +1633,11 @@ dependencies = [ "tokio", ] -[[package]] -name = "tower" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" -dependencies = [ - "futures-core", - "futures-util", - "pin-project", - "pin-project-lite", - "tokio", - "tower-layer", - "tower-service", -] - -[[package]] -name = "tower-layer" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" - [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -1743,30 +1694,30 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "unicode-bidi" -version = "0.3.15" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" dependencies = [ "tinyvec", ] [[package]] name = "unicode-width" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" [[package]] name = "untrusted" @@ -1806,9 +1757,9 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "walkdir" @@ -1837,19 +1788,20 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" dependencies = [ "bumpalo", "log", @@ -1862,9 +1814,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" dependencies = [ "cfg-if", "js-sys", @@ -1874,9 +1826,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1884,9 +1836,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", @@ -1897,15 +1849,15 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" dependencies = [ "js-sys", "wasm-bindgen", @@ -1919,11 +1871,11 @@ checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311" [[package]] name = "winapi-util" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -1933,7 +1885,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12342cb4d8e3b046f3d80effd474a7a02447231330ef77d71daa6fbc40681143" dependencies = [ "windows-core 0.57.0", - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -1943,7 +1895,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" dependencies = [ "windows-core 0.58.0", - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -1955,7 +1907,7 @@ dependencies = [ "windows-implement 0.57.0", "windows-interface 0.57.0", "windows-result 0.1.2", - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -1968,7 +1920,7 @@ dependencies = [ "windows-interface 0.58.0", "windows-result 0.2.0", "windows-strings", - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -2015,13 +1967,24 @@ dependencies = [ "syn", ] +[[package]] +name = "windows-registry" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +dependencies = [ + "windows-result 0.2.0", + "windows-strings", + "windows-targets", +] + [[package]] name = "windows-result" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8" dependencies = [ - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -2030,7 +1993,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" dependencies = [ - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -2040,16 +2003,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" dependencies = [ "windows-result 0.2.0", - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", + "windows-targets", ] [[package]] @@ -2058,22 +2012,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.6", + "windows-targets", ] [[package]] -name = "windows-targets" -version = "0.48.5" +name = "windows-sys" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", + "windows-targets", ] [[package]] @@ -2082,46 +2030,28 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - [[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.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - [[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.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - [[package]] name = "windows_i686_gnu" version = "0.52.6" @@ -2134,64 +2064,30 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - [[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.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - [[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.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - [[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.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - [[package]] name = "windows_x86_64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" -[[package]] -name = "winreg" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - [[package]] name = "xdg" version = "2.5.2" @@ -2200,9 +2096,9 @@ checksum = "213b7324336b53d2414b2db8537e56544d981803139155afa84f76eeebb7a546" [[package]] name = "xxhash-rust" -version = "0.8.11" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63658493314859b4dfdf3fb8c1defd61587839def09582db50b8a4e93afca6bb" +checksum = "6a5cbf750400958819fb6178eaa83bee5cd9c29a26a40cc241df8c70fdd46984" [[package]] name = "zeroize" From 06af8668d31165bef109ba025a9eb27d36ea1ff3 Mon Sep 17 00:00:00 2001 From: Nathan Regner Date: Sat, 26 Oct 2024 21:58:19 -0600 Subject: [PATCH 3/6] fix: don't require package versions conforming to semver (fixes #1) --- cli/src/lockfile.rs | 4 +- cli/src/manifest.rs | 2 +- cli/src/registry/mod.rs | 18 +- cli/src/registry/test/simplefoc.json | 246 +++++++++++++++++++++++++++ 4 files changed, 266 insertions(+), 4 deletions(-) create mode 100644 cli/src/registry/test/simplefoc.json diff --git a/cli/src/lockfile.rs b/cli/src/lockfile.rs index 49c2f11..838b07c 100644 --- a/cli/src/lockfile.rs +++ b/cli/src/lockfile.rs @@ -65,7 +65,7 @@ impl NixSystem { pub struct Dependency { pub name: String, pub install_path: String, - pub version: semver::Version, + pub version: String, pub manifest: String, pub systems: BTreeMap, } @@ -104,7 +104,7 @@ impl Dependency { fn new( manifest: &Manifest, name: String, - version: semver::Version, + version: String, systems: BTreeMap, ) -> Self { let install_path = format!( diff --git a/cli/src/manifest.rs b/cli/src/manifest.rs index a0524d6..7e53d78 100644 --- a/cli/src/manifest.rs +++ b/cli/src/manifest.rs @@ -29,7 +29,7 @@ impl PackageType { pub struct Manifest { #[serde(rename = "type")] pub ty: PackageType, - pub version: semver::Version, + pub version: String, pub spec: PackageSpec, #[serde(flatten)] diff --git a/cli/src/registry/mod.rs b/cli/src/registry/mod.rs index c8b8177..b5d705e 100644 --- a/cli/src/registry/mod.rs +++ b/cli/src/registry/mod.rs @@ -180,7 +180,7 @@ pub struct PackageSpec { #[derive(Deserialize, Clone, Debug)] pub struct VersionSpec { - pub name: semver::Version, + pub name: String, pub files: Vec, } @@ -412,4 +412,20 @@ mod tests { let version = spec.pick_latest_compatible("~1".parse().unwrap(), &System::LinuxX86_64); assert_eq!(version.map(|v| &v.name), Some(&"1.1.0".parse().unwrap())); } */ + + #[test] + fn deserialize_lib_package_spec_invalid_semver() { + let json = include_str!("./test/simplefoc.json"); + let de = &mut serde_json::Deserializer::from_str(json); + let spec = serde_path_to_error::deserialize::<_, PackageSpec>(de); + // TODO: snapshot test? + match spec { + Ok(spec) => { + println!("{:?}", spec); + } + Err(err) => { + panic!("failed to deserialize: {err}"); + } + } + } } diff --git a/cli/src/registry/test/simplefoc.json b/cli/src/registry/test/simplefoc.json new file mode 100644 index 0000000..7f72a4d --- /dev/null +++ b/cli/src/registry/test/simplefoc.json @@ -0,0 +1,246 @@ +{ + "id": 7229, + "type": "library", + "tier": "community", + "owner": { + "username": "askuric", + "firstname": "Antun", + "lastname": "Skuric", + "is_org": false + }, + "name": "Simple FOC", + "description": "A library demistifying FOC for BLDC motors. Simple library intended for hobby comunity to run the BLDC and Stepper motor using FOC algorithm. It is intended to support as many BLDC/Stepper motor+sensor+driver combinations as possible and in the same time maintain simplicity of usage. Library supports Arudino devices such as Arduino UNO, MEGA, NANO and similar, stm32 boards such as Nucleo and Bluepill, ESP32 and Teensy boards.", + "added_at": "2020-04-11T16:38:49Z", + "updated_at": "2024-07-21T17:15:01Z", + "modified_at": "2024-07-21T13:13:21Z", + "downloads_trend": -174, + "popularity_trend": -1, + "popularity_rank": 148, + "open_issues_count": 72, + "stars_count": 1961, + "examples_count": 64, + "title": null, + "license": "MIT", + "homepage": "https://docs.simplefoc.com", + "repository_url": "https://github.com/simplefoc/Arduino-FOC.git", + "keywords": ["device", "control"], + "authors": [ + { "maintainer": true, "email": "info@simplefoc.com", "name": "Simplefoc" } + ], + "headers": [ + "BLDCDriver3PWM.h", + "BLDCDriver6PWM.h", + "BLDCMotor.h", + "Commander.h", + "Encoder.h", + "HallSensor.h", + "InlineCurrentSense.h", + "LowsideCurrentSense.h", + "MagneticSensorAnalog.h", + "MagneticSensorI2C.h", + "MagneticSensorPWM.h", + "MagneticSensorSPI.h", + "SimpleFOC.h", + "StepDirListener.h", + "StepperDriver2PWM.h", + "StepperDriver4PWM.h", + "StepperMotor.h", + "commands.h", + "defaults.h", + "foc_utils.h", + "hardware_api.h", + "lowpass_filter.h", + "pid.h", + "time_utils.h" + ], + "frameworks": ["arduino"], + "platforms": ["*"], + "dependencies_count": 0, + "dependents_count": 3, + "top_dependencies": [], + "top_dependents": [ + { + "id": 13496, + "type": "library", + "owner": { "username": "simplefoc" }, + "name": "SimpleFOCDrivers" + }, + { + "id": 15220, + "type": "library", + "owner": { "username": "simplefoc" }, + "name": "SimpleDCMotor" + }, + { + "id": 11678, + "type": "library", + "owner": { "username": "jschoch" }, + "name": "Hap" + } + ], + "version": { + "id": 38940, + "name": "2.2", + "unpacked_size": 597078, + "released_at": "2021-10-02T18:57:37Z", + "files": [ + { + "name": "SimpleFOC-2.2.tar.gz", + "size": 119012, + "checksum": { + "sha256": "268b700b07aa7b8f42307d20d9a4145480423e8caf3f72d05fcb26e92e838d88" + }, + "system": "*", + "download_url": "https://dl.registry.platformio.org/download/askuric/library/Simple%20FOC/2.2/SimpleFOC-2.2.tar.gz" + } + ], + "is_latest": false + }, + "versions": [ + { + "id": 64412, + "name": "2.3.4", + "unpacked_size": 1017464, + "released_at": "2024-07-21T13:13:12Z", + "files": [ + { + "name": "SimpleFOC-2.3.4.tar.gz", + "size": 188789, + "checksum": { + "sha256": "8bbdafd893f6d9f4eaa9a6187ebbc9ae1299e4d254027a1de643f03b36a2e4fe" + }, + "system": "*", + "download_url": "https://dl.registry.platformio.org/download/askuric/library/Simple%20FOC/2.3.4/SimpleFOC-2.3.4.tar.gz" + } + ], + "is_latest": true + }, + { + "id": 61865, + "name": "2.3.3", + "unpacked_size": 973245, + "released_at": "2024-04-19T18:26:27Z", + "files": [ + { + "name": "SimpleFOC-2.3.3.tar.gz", + "size": 176935, + "checksum": { + "sha256": "85e5beeacc541e07c766519d7107a55147f7ed5667abb09a100fba4d3a9fe418" + }, + "system": "*", + "download_url": "https://dl.registry.platformio.org/download/askuric/library/Simple%20FOC/2.3.3/SimpleFOC-2.3.3.tar.gz" + } + ], + "is_latest": false + }, + { + "id": 57896, + "name": "2.3.2", + "unpacked_size": 909413, + "released_at": "2023-12-01T22:19:22Z", + "files": [ + { + "name": "SimpleFOC-2.3.2.tar.gz", + "size": 166923, + "checksum": { + "sha256": "583d7d46db18ba00ee4193211028be3efd1014078a0a1c37272e396773a56a80" + }, + "system": "*", + "download_url": "https://dl.registry.platformio.org/download/askuric/library/Simple%20FOC/2.3.2/SimpleFOC-2.3.2.tar.gz" + } + ], + "is_latest": false + }, + { + "id": 55824, + "name": "2.3.1", + "unpacked_size": 909212, + "released_at": "2023-09-23T08:51:26Z", + "files": [ + { + "name": "SimpleFOC-2.3.1.tar.gz", + "size": 167290, + "checksum": { + "sha256": "8576c53d9c8e5f1155be38f69d73fb75688f7d32f701746ee27f332995de20d0" + }, + "system": "*", + "download_url": "https://dl.registry.platformio.org/download/askuric/library/Simple%20FOC/2.3.1/SimpleFOC-2.3.1.tar.gz" + } + ], + "is_latest": false + }, + { + "id": 51688, + "name": "2.3.0", + "unpacked_size": 877598, + "released_at": "2023-03-18T12:00:31Z", + "files": [ + { + "name": "SimpleFOC-2.3.0.tar.gz", + "size": 160894, + "checksum": { + "sha256": "6612fbbd787bc130942e0e16c37a60f0716294a1f876315a92fb36ee58f11232" + }, + "system": "*", + "download_url": "https://dl.registry.platformio.org/download/askuric/library/Simple%20FOC/2.3.0/SimpleFOC-2.3.0.tar.gz" + } + ], + "is_latest": false + }, + { + "id": 47614, + "name": "2.2.3", + "unpacked_size": 786611, + "released_at": "2022-10-15T09:02:08Z", + "files": [ + { + "name": "SimpleFOC-2.2.3.tar.gz", + "size": 147144, + "checksum": { + "sha256": "973c3268774850df58a381bb6db2b2882c24eb0c72b137f25cff4c4c2667dc27" + }, + "system": "*", + "download_url": "https://dl.registry.platformio.org/download/askuric/library/Simple%20FOC/2.2.3/SimpleFOC-2.2.3.tar.gz" + } + ], + "is_latest": false + }, + { + "id": 42000, + "name": "2.2.1", + "unpacked_size": 646667, + "released_at": "2022-02-03T17:03:10Z", + "files": [ + { + "name": "SimpleFOC-2.2.1.tar.gz", + "size": 126739, + "checksum": { + "sha256": "ad3390206d86afcb4f42371b6ddbca12a5d32be8c2125898b8e73dc48f922eec" + }, + "system": "*", + "download_url": "https://dl.registry.platformio.org/download/askuric/library/Simple%20FOC/2.2.1/SimpleFOC-2.2.1.tar.gz" + } + ], + "is_latest": false + }, + { + "id": 38940, + "name": "2.2", + "unpacked_size": 597078, + "released_at": "2021-10-02T18:57:37Z", + "files": [ + { + "name": "SimpleFOC-2.2.tar.gz", + "size": 119012, + "checksum": { + "sha256": "268b700b07aa7b8f42307d20d9a4145480423e8caf3f72d05fcb26e92e838d88" + }, + "system": "*", + "download_url": "https://dl.registry.platformio.org/download/askuric/library/Simple%20FOC/2.2/SimpleFOC-2.2.tar.gz" + } + ], + "is_latest": false + } + ], + "readme_url": "https://dl.registry.platformio.org/libraries/36/58/812fff96102dd2e13cb023d192ca53d7e35ad896a25554cade4bf31b01e2/README.md" +} From 4c3bcbf60c01dca164f5a09fd2596459ff65a251 Mon Sep 17 00:00:00 2001 From: Nathan Regner Date: Sat, 26 Oct 2024 21:59:31 -0600 Subject: [PATCH 4/6] refactor: remove dead code --- cli/Cargo.lock | 10 --- cli/Cargo.toml | 1 - cli/src/main.rs | 2 +- cli/src/registry/mod.rs | 144 +--------------------------------------- 4 files changed, 2 insertions(+), 155 deletions(-) diff --git a/cli/Cargo.lock b/cli/Cargo.lock index adee326..16856a1 100644 --- a/cli/Cargo.lock +++ b/cli/Cargo.lock @@ -1036,7 +1036,6 @@ dependencies = [ "http-cache-reqwest", "reqwest", "reqwest-middleware", - "semver", "serde", "serde_json", "serde_path_to_error", @@ -1260,15 +1259,6 @@ dependencies = [ "libc", ] -[[package]] -name = "semver" -version = "1.0.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" -dependencies = [ - "serde", -] - [[package]] name = "serde" version = "1.0.213" diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 5a30811..4870e82 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -13,7 +13,6 @@ homedir = "0.3.3" http-cache-reqwest = "0.14.0" reqwest = { version = "0.12.5", features = ["blocking", "json"] } reqwest-middleware = "0.3.2" -semver = { version = "1.0.23", features = ["serde"] } serde = { version = "1.0.203", features = ["derive"] } serde_json = "1.0.120" serde_path_to_error = "0.1.16" diff --git a/cli/src/main.rs b/cli/src/main.rs index b385f60..f6f62fb 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -14,7 +14,7 @@ use manifest::extract_manifests; use registry::RegistryClient; use serde::Deserialize; -/// Simple program to greet a person +/// Generate a platformio2nix lockfile to stdout #[derive(Parser, Debug)] #[command(version, about, long_about = None)] struct Args { diff --git a/cli/src/registry/mod.rs b/cli/src/registry/mod.rs index b5d705e..9a88329 100644 --- a/cli/src/registry/mod.rs +++ b/cli/src/registry/mod.rs @@ -86,20 +86,7 @@ impl RegistryClient { if let Some(version) = version { url.query_pairs_mut().append_pair("version", &version); } - // TODO: remove - eprintln!("url: {}", url); - let response = self.client.get(url).send().await?; - extract_json(response).await - } - - pub async fn search(&self, params: SearchParams<'_>) -> eyre::Result { - let mut url = self.registry_url.clone(); - url.path_segments_mut() - .expect("base path") - .push("v3") - .push("search"); - url.query_pairs_mut() - .append_pair("query", ¶ms.to_query()); + eprintln!("fetching package spec: {}", url); let response = self.client.get(url).send().await?; extract_json(response).await } @@ -118,66 +105,12 @@ async fn extract_json(response: reqwest::Response) -> Resul Ok(body) } -pub struct SearchParams<'s> { - pub names: &'s [&'s str], -} - -impl<'s> SearchParams<'s> { - pub fn to_query(&self) -> String { - let mut query = String::new(); - for name in self.names { - if !query.is_empty() { - query.push(' '); - } - query.push_str("name:"); - query.push_str(&serde_json::to_string(name).expect("name is serializable")); - } - query - } -} - -#[derive(Deserialize, Debug)] -pub struct SearchResults { - pub items: Vec, -} - -#[derive(Deserialize, Debug)] -pub struct PackageMeta { - pub owner: PackageMetaOwner, - pub name: String, - #[serde(rename = "type")] - pub ty: String, - #[serde(rename = "version")] - pub latest_version: VersionSpec, -} - -#[derive(Deserialize, Debug)] -pub struct PackageMetaOwner { - pub username: String, -} - #[derive(Deserialize, Debug)] pub struct PackageSpec { pub name: String, - #[serde(rename = "type")] - pub ty: String, pub version: VersionSpec, - pub versions: Vec, } -// impl PackageSpec { -// pub fn pick_latest_compatible( -// &self, -// version: VersionReq, -// system: &System, -// ) -> Option<&VersionSpec> { -// self.versions -// .iter() -// .filter(|v| version.matches(&v.name) && v.supports(system).is_some()) -// .max_by(|a, b| a.name.cmp(&b.name)) -// } -// } - #[derive(Deserialize, Clone, Debug)] pub struct VersionSpec { pub name: String, @@ -291,18 +224,6 @@ mod tests { // println!("{:?}", spec); // } - // #[tokio::test] - // async fn search() { - // let client = RegistryClient::default(); - // let spec = client - // .search(SearchParams { - // names: &["tool-scons"], - // }) - // .await - // .unwrap(); - // assert!(!spec.items.is_empty()); - // } - #[test] fn deserialize_system() { fn assert(input: &str, expected: System) { @@ -318,22 +239,6 @@ mod tests { assert("linux_aarch64", System::LinuxAarch64); } - #[test] - fn deserialize_search_result() { - let json = include_str!("./test/search.json"); - let de = &mut serde_json::Deserializer::from_str(json); - let spec = serde_path_to_error::deserialize::<_, SearchResults>(de); - // TODO: snapshot test? - match spec { - Ok(spec) => { - println!("{:?}", spec); - } - Err(err) => { - panic!("failed to deserialize: {err}"); - } - } - } - #[test] fn deserialize_platform_package_spec_atmelavr() { let json = include_str!("./test/platform-atmelavr.json"); @@ -366,53 +271,6 @@ mod tests { } } - // TODO - /* #[test] - fn pick_latest_compatible() { - let systems = SystemSpec::Systems(vec![System::LinuxX86_64]); - let latest = VersionSpec { - name: "2.0.0".parse().unwrap(), - files: vec![File { - system: systems.clone(), - download_url: Url::parse("https://example.com").unwrap(), - checksum: Checksum { - sha256: "deadbeef".to_string(), - }, - }], - }; - let spec = PackageSpec { - name: "test".to_string(), - ty: "platform".to_string(), - version: latest.clone(), - versions: vec![ - VersionSpec { - name: "1.0.0".parse().unwrap(), - files: vec![File { - system: systems.clone(), - download_url: Url::parse("https://example.com").unwrap(), - checksum: Checksum { - sha256: "deadbeef".to_string(), - }, - }], - }, - VersionSpec { - name: "1.1.0".parse().unwrap(), - files: vec![File { - system: systems.clone(), - download_url: Url::parse("https://example.com").unwrap(), - checksum: Checksum { - sha256: "deadbeef".to_string(), - }, - }], - }, - latest, - ], - }; - - let version = spec.pick_latest_compatible("~1".parse().unwrap(), &System::LinuxX86_64); - assert_eq!(version.map(|v| &v.name), Some(&"1.1.0".parse().unwrap())); - } */ - #[test] fn deserialize_lib_package_spec_invalid_semver() { let json = include_str!("./test/simplefoc.json"); From 76e58af962a813d97767b89728687b286a352238 Mon Sep 17 00:00:00 2001 From: Nathan Regner Date: Sat, 26 Oct 2024 22:28:23 -0600 Subject: [PATCH 5/6] fix: external-deps example --- examples/external-deps/package.nix | 10 +- examples/external-deps/platformio.ini | 1 + examples/external-deps/platformio2nix.lock | 188 ++++++--------------- 3 files changed, 58 insertions(+), 141 deletions(-) diff --git a/examples/external-deps/package.nix b/examples/external-deps/package.nix index 1c8811a..252d242 100644 --- a/examples/external-deps/package.nix +++ b/examples/external-deps/package.nix @@ -1,5 +1,6 @@ { gnumake, + libarchive, makePlatformIOSetupHook, platformio, stdenv, @@ -11,7 +12,14 @@ let setupHook = makePlatformIOSetupHook { lockfile = ./platformio2nix.lock; overrides = ( - final: prev: { SlowSoftWire = prev.SlowSoftWire.overrideAttrs { dontUnpack = true; }; } + final: prev: { + SlowSoftWire = prev.SlowSoftWire.overrideAttrs { + nativeBuildInputs = [ libarchive ]; + unpackPhase = '' + bsdtar xf $src --strip-components=1 + ''; + }; + } ); }; in diff --git a/examples/external-deps/platformio.ini b/examples/external-deps/platformio.ini index 1701147..245941d 100644 --- a/examples/external-deps/platformio.ini +++ b/examples/external-deps/platformio.ini @@ -14,3 +14,4 @@ board = uno framework = arduino lib_deps = https://github.com/felias-fogg/SlowSoftWire/archive/f34d777f39.zip + felias-fogg/SlowSoftI2CMaster@^1.0.0 diff --git a/examples/external-deps/platformio2nix.lock b/examples/external-deps/platformio2nix.lock index e78f57e..c8c095c 100644 --- a/examples/external-deps/platformio2nix.lock +++ b/examples/external-deps/platformio2nix.lock @@ -1,75 +1,75 @@ { "version": "V1", "dependencies": { - "SlowSoftWire": { - "name": "SlowSoftWire", - "install_path": "lib/SlowSoftWire", - "version": "0.0.0+20240705183635", - "manifest": "{\"type\":\"library\",\"version\":\"0.0.0+20240705183635\",\"spec\":{\"name\":\"SlowSoftWire\",\"uri\":\"https://github.com/felias-fogg/SlowSoftWire/archive/f34d777f39.zip\",\"id\":null,\"owner\":null,\"requirements\":null},\"name\":\"SlowSoftWire\"}", + "SlowSoftI2CMaster": { + "name": "SlowSoftI2CMaster", + "install_path": "libdeps/SlowSoftI2CMaster", + "version": "1.0.0", + "manifest": "{\"type\":\"library\",\"version\":\"1.0.0\",\"spec\":{\"owner\":\"felias-fogg\",\"name\":\"SlowSoftI2CMaster\",\"id\":7005,\"requirements\":null,\"uri\":null},\"name\":\"SlowSoftI2CMaster\"}", "systems": { "aarch64-linux": { - "url": "https://github.com/felias-fogg/SlowSoftWire/archive/f34d777f39.zip", - "hash": "sha256-FhoHDjfPYRlWeJZig5cz12iPYbL6j0bEivR1+qNmXLc=" + "url": "https://dl.registry.platformio.org/download/felias-fogg/library/SlowSoftI2CMaster/1.0.0/SlowSoftI2CMaster-1.0.0.tar.gz", + "hash": "sha256-DVPlZAOtAd0/zMgiKk76A0pGyI2MHGSbZsgvJAjt/bY=" }, "aarch64-darwin": { - "url": "https://github.com/felias-fogg/SlowSoftWire/archive/f34d777f39.zip", - "hash": "sha256-FhoHDjfPYRlWeJZig5cz12iPYbL6j0bEivR1+qNmXLc=" + "url": "https://dl.registry.platformio.org/download/felias-fogg/library/SlowSoftI2CMaster/1.0.0/SlowSoftI2CMaster-1.0.0.tar.gz", + "hash": "sha256-DVPlZAOtAd0/zMgiKk76A0pGyI2MHGSbZsgvJAjt/bY=" }, "x86_64-linux": { - "url": "https://github.com/felias-fogg/SlowSoftWire/archive/f34d777f39.zip", - "hash": "sha256-FhoHDjfPYRlWeJZig5cz12iPYbL6j0bEivR1+qNmXLc=" + "url": "https://dl.registry.platformio.org/download/felias-fogg/library/SlowSoftI2CMaster/1.0.0/SlowSoftI2CMaster-1.0.0.tar.gz", + "hash": "sha256-DVPlZAOtAd0/zMgiKk76A0pGyI2MHGSbZsgvJAjt/bY=" }, "x86_64-darwin": { - "url": "https://github.com/felias-fogg/SlowSoftWire/archive/f34d777f39.zip", - "hash": "sha256-FhoHDjfPYRlWeJZig5cz12iPYbL6j0bEivR1+qNmXLc=" + "url": "https://dl.registry.platformio.org/download/felias-fogg/library/SlowSoftI2CMaster/1.0.0/SlowSoftI2CMaster-1.0.0.tar.gz", + "hash": "sha256-DVPlZAOtAd0/zMgiKk76A0pGyI2MHGSbZsgvJAjt/bY=" } } }, - "U8glib-HAL": { - "name": "U8glib-HAL", - "install_path": "lib/U8glib-HAL", - "version": "0.5.4", - "manifest": "{\"type\":\"library\",\"version\":\"0.5.4\",\"spec\":{\"owner\":\"marlinfirmware\",\"name\":\"U8glib-HAL\",\"uri\":null,\"requirements\":null,\"id\":1932},\"name\":\"U8glib-HAL\"}", + "SlowSoftWire": { + "name": "SlowSoftWire", + "install_path": "libdeps/SlowSoftWire", + "version": "0.0.0+20241026221146", + "manifest": "{\"type\":\"library\",\"version\":\"0.0.0+20241026221146\",\"spec\":{\"name\":\"SlowSoftWire\",\"uri\":\"https://github.com/felias-fogg/SlowSoftWire/archive/f34d777f39.zip\",\"id\":null,\"owner\":null,\"requirements\":null},\"name\":\"SlowSoftWire\"}", "systems": { "aarch64-linux": { - "url": "https://dl.registry.platformio.org/download/marlinfirmware/library/U8glib-HAL/0.5.4/U8glib-HAL-0.5.4.tar.gz", - "hash": "sha256-DKdiN3zS2NXY94fY4IRwm/5SiI0xeGiJdahXb7X9Sak=" + "url": "https://github.com/felias-fogg/SlowSoftWire/archive/f34d777f39.zip", + "hash": "sha256-FhoHDjfPYRlWeJZig5cz12iPYbL6j0bEivR1+qNmXLc=" }, "aarch64-darwin": { - "url": "https://dl.registry.platformio.org/download/marlinfirmware/library/U8glib-HAL/0.5.4/U8glib-HAL-0.5.4.tar.gz", - "hash": "sha256-DKdiN3zS2NXY94fY4IRwm/5SiI0xeGiJdahXb7X9Sak=" + "url": "https://github.com/felias-fogg/SlowSoftWire/archive/f34d777f39.zip", + "hash": "sha256-FhoHDjfPYRlWeJZig5cz12iPYbL6j0bEivR1+qNmXLc=" }, "x86_64-linux": { - "url": "https://dl.registry.platformio.org/download/marlinfirmware/library/U8glib-HAL/0.5.4/U8glib-HAL-0.5.4.tar.gz", - "hash": "sha256-DKdiN3zS2NXY94fY4IRwm/5SiI0xeGiJdahXb7X9Sak=" + "url": "https://github.com/felias-fogg/SlowSoftWire/archive/f34d777f39.zip", + "hash": "sha256-FhoHDjfPYRlWeJZig5cz12iPYbL6j0bEivR1+qNmXLc=" }, "x86_64-darwin": { - "url": "https://dl.registry.platformio.org/download/marlinfirmware/library/U8glib-HAL/0.5.4/U8glib-HAL-0.5.4.tar.gz", - "hash": "sha256-DKdiN3zS2NXY94fY4IRwm/5SiI0xeGiJdahXb7X9Sak=" + "url": "https://github.com/felias-fogg/SlowSoftWire/archive/f34d777f39.zip", + "hash": "sha256-FhoHDjfPYRlWeJZig5cz12iPYbL6j0bEivR1+qNmXLc=" } } }, "atmelavr": { "name": "atmelavr", "install_path": "platforms/atmelavr", - "version": "5.0.0", - "manifest": "{\"type\":\"platform\",\"version\":\"5.0.0\",\"spec\":{\"owner\":\"platformio\",\"name\":\"atmelavr\",\"uri\":null,\"id\":8006,\"requirements\":null},\"name\":\"atmelavr\"}", + "version": "5.1.0", + "manifest": "{\"type\":\"platform\",\"version\":\"5.1.0\",\"spec\":{\"owner\":\"platformio\",\"name\":\"atmelavr\",\"id\":8006,\"requirements\":null,\"uri\":null},\"name\":\"atmelavr\"}", "systems": { "aarch64-linux": { - "url": "https://dl.registry.platformio.org/download/platformio/platform/atmelavr/5.0.0/atmelavr-5.0.0.tar.gz", - "hash": "sha256-9PIuBFDJT7XZLWKGTm/nFCgbuFWAzZO8sVmthopmsWw=" + "url": "https://dl.registry.platformio.org/download/platformio/platform/atmelavr/5.1.0/atmelavr-5.1.0.tar.gz", + "hash": "sha256-0XGSJi0KwN04/98qUTlzkmYtm1K95fc4JWJoYIhLQhk=" }, "aarch64-darwin": { - "url": "https://dl.registry.platformio.org/download/platformio/platform/atmelavr/5.0.0/atmelavr-5.0.0.tar.gz", - "hash": "sha256-9PIuBFDJT7XZLWKGTm/nFCgbuFWAzZO8sVmthopmsWw=" + "url": "https://dl.registry.platformio.org/download/platformio/platform/atmelavr/5.1.0/atmelavr-5.1.0.tar.gz", + "hash": "sha256-0XGSJi0KwN04/98qUTlzkmYtm1K95fc4JWJoYIhLQhk=" }, "x86_64-linux": { - "url": "https://dl.registry.platformio.org/download/platformio/platform/atmelavr/5.0.0/atmelavr-5.0.0.tar.gz", - "hash": "sha256-9PIuBFDJT7XZLWKGTm/nFCgbuFWAzZO8sVmthopmsWw=" + "url": "https://dl.registry.platformio.org/download/platformio/platform/atmelavr/5.1.0/atmelavr-5.1.0.tar.gz", + "hash": "sha256-0XGSJi0KwN04/98qUTlzkmYtm1K95fc4JWJoYIhLQhk=" }, "x86_64-darwin": { - "url": "https://dl.registry.platformio.org/download/platformio/platform/atmelavr/5.0.0/atmelavr-5.0.0.tar.gz", - "hash": "sha256-9PIuBFDJT7XZLWKGTm/nFCgbuFWAzZO8sVmthopmsWw=" + "url": "https://dl.registry.platformio.org/download/platformio/platform/atmelavr/5.1.0/atmelavr-5.1.0.tar.gz", + "hash": "sha256-0XGSJi0KwN04/98qUTlzkmYtm1K95fc4JWJoYIhLQhk=" } } }, @@ -77,7 +77,7 @@ "name": "framework-arduino-avr", "install_path": "packages/framework-arduino-avr", "version": "5.2.0", - "manifest": "{\"type\":\"tool\",\"version\":\"5.2.0\",\"spec\":{\"owner\":\"platformio\",\"name\":\"framework-arduino-avr\",\"requirements\":null,\"uri\":null,\"id\":8039},\"name\":\"framework-arduino-avr\"}", + "manifest": "{\"type\":\"tool\",\"version\":\"5.2.0\",\"spec\":{\"owner\":\"platformio\",\"name\":\"framework-arduino-avr\",\"id\":8039,\"requirements\":null,\"uri\":null},\"name\":\"framework-arduino-avr\"}", "systems": { "aarch64-linux": { "url": "https://dl.registry.platformio.org/download/platformio/tool/framework-arduino-avr/5.2.0/framework-arduino-avr-5.2.0.tar.gz", @@ -97,99 +97,27 @@ } } }, - "framework-arduinoststm32": { - "name": "framework-arduinoststm32", - "install_path": "packages/framework-arduinoststm32", - "version": "4.10900.200819", - "manifest": "{\"type\":\"tool\",\"version\":\"4.10900.200819\",\"spec\":{\"owner\":\"platformio\",\"name\":\"framework-arduinoststm32\",\"requirements\":null,\"uri\":null,\"id\":8080},\"name\":\"framework-arduinoststm32\"}", - "systems": { - "aarch64-linux": { - "url": "https://dl.registry.platformio.org/download/platformio/tool/framework-arduinoststm32/4.10900.200819/framework-arduinoststm32-4.10900.200819.tar.gz", - "hash": "sha256-ztdXAF7AS6v44rvprXky+0CuZczhhYVN6QniL9jlM00=" - }, - "aarch64-darwin": { - "url": "https://dl.registry.platformio.org/download/platformio/tool/framework-arduinoststm32/4.10900.200819/framework-arduinoststm32-4.10900.200819.tar.gz", - "hash": "sha256-ztdXAF7AS6v44rvprXky+0CuZczhhYVN6QniL9jlM00=" - }, - "x86_64-linux": { - "url": "https://dl.registry.platformio.org/download/platformio/tool/framework-arduinoststm32/4.10900.200819/framework-arduinoststm32-4.10900.200819.tar.gz", - "hash": "sha256-ztdXAF7AS6v44rvprXky+0CuZczhhYVN6QniL9jlM00=" - }, - "x86_64-darwin": { - "url": "https://dl.registry.platformio.org/download/platformio/tool/framework-arduinoststm32/4.10900.200819/framework-arduinoststm32-4.10900.200819.tar.gz", - "hash": "sha256-ztdXAF7AS6v44rvprXky+0CuZczhhYVN6QniL9jlM00=" - } - } - }, - "framework-cmsis": { - "name": "framework-cmsis", - "install_path": "packages/framework-cmsis", - "version": "2.50501.200527", - "manifest": "{\"type\":\"tool\",\"version\":\"2.50501.200527\",\"spec\":{\"owner\":\"platformio\",\"name\":\"framework-cmsis\",\"requirements\":null,\"id\":8086,\"uri\":null},\"name\":\"framework-cmsis\"}", - "systems": { - "aarch64-linux": { - "url": "https://dl.registry.platformio.org/download/platformio/tool/framework-cmsis/2.50501.200527/framework-cmsis-2.50501.200527.tar.gz", - "hash": "sha256-3ErJUB7dfsV0aUt7UhFD7eCng8TO42TuwlW0GGa+7Po=" - }, - "aarch64-darwin": { - "url": "https://dl.registry.platformio.org/download/platformio/tool/framework-cmsis/2.50501.200527/framework-cmsis-2.50501.200527.tar.gz", - "hash": "sha256-3ErJUB7dfsV0aUt7UhFD7eCng8TO42TuwlW0GGa+7Po=" - }, - "x86_64-linux": { - "url": "https://dl.registry.platformio.org/download/platformio/tool/framework-cmsis/2.50501.200527/framework-cmsis-2.50501.200527.tar.gz", - "hash": "sha256-3ErJUB7dfsV0aUt7UhFD7eCng8TO42TuwlW0GGa+7Po=" - }, - "x86_64-darwin": { - "url": "https://dl.registry.platformio.org/download/platformio/tool/framework-cmsis/2.50501.200527/framework-cmsis-2.50501.200527.tar.gz", - "hash": "sha256-3ErJUB7dfsV0aUt7UhFD7eCng8TO42TuwlW0GGa+7Po=" - } - } - }, - "ststm32": { - "name": "ststm32", - "install_path": "platforms/ststm32", - "version": "12.1.1", - "manifest": "{\"type\":\"platform\",\"version\":\"12.1.1\",\"spec\":{\"owner\":\"platformio\",\"name\":\"ststm32\",\"uri\":null,\"id\":8020,\"requirements\":null},\"name\":\"ststm32\"}", - "systems": { - "aarch64-linux": { - "url": "https://dl.registry.platformio.org/download/platformio/platform/ststm32/12.1.1/ststm32-12.1.1.tar.gz", - "hash": "sha256-TYRfQCSqDtztp4yT9wNX+fGxpjyFwrL36TCOVv+XJxg=" - }, - "aarch64-darwin": { - "url": "https://dl.registry.platformio.org/download/platformio/platform/ststm32/12.1.1/ststm32-12.1.1.tar.gz", - "hash": "sha256-TYRfQCSqDtztp4yT9wNX+fGxpjyFwrL36TCOVv+XJxg=" - }, - "x86_64-linux": { - "url": "https://dl.registry.platformio.org/download/platformio/platform/ststm32/12.1.1/ststm32-12.1.1.tar.gz", - "hash": "sha256-TYRfQCSqDtztp4yT9wNX+fGxpjyFwrL36TCOVv+XJxg=" - }, - "x86_64-darwin": { - "url": "https://dl.registry.platformio.org/download/platformio/platform/ststm32/12.1.1/ststm32-12.1.1.tar.gz", - "hash": "sha256-TYRfQCSqDtztp4yT9wNX+fGxpjyFwrL36TCOVv+XJxg=" - } - } - }, "tool-scons": { "name": "tool-scons", "install_path": "packages/tool-scons", - "version": "4.40502.0", - "manifest": "{\"type\":\"tool\",\"version\":\"4.40502.0\",\"spec\":{\"owner\":\"platformio\",\"name\":\"tool-scons\",\"requirements\":null,\"id\":8192,\"uri\":null},\"name\":\"tool-scons\"}", + "version": "4.40700.0", + "manifest": "{\"type\":\"tool\",\"version\":\"4.40700.0\",\"spec\":{\"owner\":\"platformio\",\"name\":\"tool-scons\",\"id\":8192,\"requirements\":null,\"uri\":null},\"name\":\"tool-scons\"}", "systems": { "aarch64-linux": { - "url": "https://dl.registry.platformio.org/download/platformio/tool/tool-scons/4.40502.0/tool-scons-4.40502.0.tar.gz", - "hash": "sha256-6WGOHHj5JnIJXfiEm5Kj4Hyg/BFv8jH/FRRwAjhs2zU=" + "url": "https://dl.registry.platformio.org/download/platformio/tool/tool-scons/4.40700.0/tool-scons-4.40700.0.tar.gz", + "hash": "sha256-AtWAJ9UsR99TNBJ6rb6YZvp+Ega/IZIGb4mx/qIP2VM=" }, "aarch64-darwin": { - "url": "https://dl.registry.platformio.org/download/platformio/tool/tool-scons/4.40502.0/tool-scons-4.40502.0.tar.gz", - "hash": "sha256-6WGOHHj5JnIJXfiEm5Kj4Hyg/BFv8jH/FRRwAjhs2zU=" + "url": "https://dl.registry.platformio.org/download/platformio/tool/tool-scons/4.40700.0/tool-scons-4.40700.0.tar.gz", + "hash": "sha256-AtWAJ9UsR99TNBJ6rb6YZvp+Ega/IZIGb4mx/qIP2VM=" }, "x86_64-linux": { - "url": "https://dl.registry.platformio.org/download/platformio/tool/tool-scons/4.40502.0/tool-scons-4.40502.0.tar.gz", - "hash": "sha256-6WGOHHj5JnIJXfiEm5Kj4Hyg/BFv8jH/FRRwAjhs2zU=" + "url": "https://dl.registry.platformio.org/download/platformio/tool/tool-scons/4.40700.0/tool-scons-4.40700.0.tar.gz", + "hash": "sha256-AtWAJ9UsR99TNBJ6rb6YZvp+Ega/IZIGb4mx/qIP2VM=" }, "x86_64-darwin": { - "url": "https://dl.registry.platformio.org/download/platformio/tool/tool-scons/4.40502.0/tool-scons-4.40502.0.tar.gz", - "hash": "sha256-6WGOHHj5JnIJXfiEm5Kj4Hyg/BFv8jH/FRRwAjhs2zU=" + "url": "https://dl.registry.platformio.org/download/platformio/tool/tool-scons/4.40700.0/tool-scons-4.40700.0.tar.gz", + "hash": "sha256-AtWAJ9UsR99TNBJ6rb6YZvp+Ega/IZIGb4mx/qIP2VM=" } } }, @@ -197,7 +125,7 @@ "name": "toolchain-atmelavr", "install_path": "packages/toolchain-atmelavr", "version": "1.70300.191015", - "manifest": "{\"type\":\"tool\",\"version\":\"1.70300.191015\",\"spec\":{\"owner\":\"platformio\",\"name\":\"toolchain-atmelavr\",\"uri\":null,\"id\":8203,\"requirements\":null},\"name\":\"toolchain-atmelavr\"}", + "manifest": "{\"type\":\"tool\",\"version\":\"1.70300.191015\",\"spec\":{\"owner\":\"platformio\",\"name\":\"toolchain-atmelavr\",\"id\":8203,\"requirements\":null,\"uri\":null},\"name\":\"toolchain-atmelavr\"}", "systems": { "aarch64-linux": { "url": "https://dl.registry.platformio.org/download/platformio/tool/toolchain-atmelavr/1.70300.191015/toolchain-atmelavr-linux_aarch64-1.70300.191015.tar.gz", @@ -216,26 +144,6 @@ "hash": "sha256-ZbvIZjFjRU9nj5WSqnRdLvfjvphlS1kIMAmvVmSKBvI=" } } - }, - "toolchain-gccarmnoneeabi": { - "name": "toolchain-gccarmnoneeabi", - "install_path": "packages/toolchain-gccarmnoneeabi", - "version": "1.90201.191206", - "manifest": "{\"type\":\"tool\",\"version\":\"1.90201.191206\",\"spec\":{\"owner\":\"platformio\",\"name\":\"toolchain-gccarmnoneeabi\",\"requirements\":null,\"id\":8207,\"uri\":null},\"name\":\"toolchain-gccarmnoneeabi\"}", - "systems": { - "aarch64-darwin": { - "url": "https://dl.registry.platformio.org/download/platformio/tool/toolchain-gccarmnoneeabi/1.90201.191206/toolchain-gccarmnoneeabi-darwin_x86_64-1.90201.191206.tar.gz", - "hash": "sha256-MJ+3zVwbEvG6japvdVTMlclqgSRrb/SDPLsxQ2+Pat0=" - }, - "x86_64-linux": { - "url": "https://dl.registry.platformio.org/download/platformio/tool/toolchain-gccarmnoneeabi/1.90201.191206/toolchain-gccarmnoneeabi-linux_x86_64-1.90201.191206.tar.gz", - "hash": "sha256-FA+yY3mLncGVCzgxxE2asBGW+IMBK3hlix4AK5A10mw=" - }, - "x86_64-darwin": { - "url": "https://dl.registry.platformio.org/download/platformio/tool/toolchain-gccarmnoneeabi/1.90201.191206/toolchain-gccarmnoneeabi-darwin_x86_64-1.90201.191206.tar.gz", - "hash": "sha256-MJ+3zVwbEvG6japvdVTMlclqgSRrb/SDPLsxQ2+Pat0=" - } - } } } } From f6f01a17f8430cfde72a8bb4f9cf835203c153a7 Mon Sep 17 00:00:00 2001 From: Nathan Regner Date: Sat, 26 Oct 2024 22:30:43 -0600 Subject: [PATCH 6/6] build: add check workflow; prune flake inputs --- .github/workflows/check.yml | 37 ++++++ examples/external-deps/flake.nix | 10 +- examples/marlin/flake.nix | 10 +- flake.lock | 70 ++++------- flake.nix | 194 ++++++++++--------------------- treefmt.nix | 12 +- 6 files changed, 137 insertions(+), 196 deletions(-) create mode 100644 .github/workflows/check.yml diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 0000000..79df975 --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,37 @@ +name: Check PR + +on: + push: + branches: + - master + pull_request: + +jobs: + cli: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # pin@main + - uses: DeterminateSystems/nix-installer-action@b92f66560d6f97d6576405a7bae901ab57e72b6a # pin@main + # with: + # nix-installer-tag: v0.16.1 # https://github.com/DeterminateSystems/nix-installer/tags + - uses: DeterminateSystems/magic-nix-cache-action@a76a83091cd8728db8c37312dbdd0eeb1177a6c0 # pin@main + - uses: DeterminateSystems/flake-checker-action@078f5f7f47ee188aa6cb472527ca5984e195222d # pin@main + - name: Check flake + run: nix flake check + + examples: + runs-on: ubuntu-latest + strategy: + matrix: + example: + - external-deps + - marlin + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # pin@main + - uses: DeterminateSystems/nix-installer-action@b92f66560d6f97d6576405a7bae901ab57e72b6a # pin@main + # with: + # nix-installer-tag: v0.16.1 # https://github.com/DeterminateSystems/nix-installer/tags + - uses: DeterminateSystems/magic-nix-cache-action@a76a83091cd8728db8c37312dbdd0eeb1177a6c0 # pin@main + - name: Check flake + working-directory: examples/${{ matrix.example }} + run: nix flake check diff --git a/examples/external-deps/flake.nix b/examples/external-deps/flake.nix index ea44389..f2830ec 100644 --- a/examples/external-deps/flake.nix +++ b/examples/external-deps/flake.nix @@ -22,13 +22,13 @@ packages = forAllSystems ( system: let - pkgs = nixpkgs.legacyPackages.${system}; + pkgs = import nixpkgs { + inherit system; + overlays = [ platformio2nix.overlays.default ]; + }; in { - default = pkgs.callPackage ./package.nix { - # TODO: provide an overlay - inherit (platformio2nix.packages.${system}) makePlatformIOSetupHook; - }; + default = pkgs.callPackage ./package.nix { }; } ); }; diff --git a/examples/marlin/flake.nix b/examples/marlin/flake.nix index 5bffab3..3746895 100644 --- a/examples/marlin/flake.nix +++ b/examples/marlin/flake.nix @@ -22,13 +22,13 @@ packages = forAllSystems ( system: let - pkgs = nixpkgs.legacyPackages.${system}; + pkgs = import nixpkgs { + inherit system; + overlays = [ platformio2nix.overlays.default ]; + }; in { - default = pkgs.callPackage ./package.nix { - # TODO: provide an overlay - inherit (platformio2nix.packages.${system}) makePlatformIOSetupHook; - }; + default = pkgs.callPackage ./package.nix { }; } ); }; diff --git a/flake.lock b/flake.lock index fc9be8f..0a6bedb 100644 --- a/flake.lock +++ b/flake.lock @@ -1,34 +1,20 @@ { "nodes": { - "advisory-db": { - "flake": false, - "locked": { - "lastModified": 1729881936, - "narHash": "sha256-Fgyr39xQ0tmGhA9aEZW0onvH8QMKXU5osr48Hz4wvp4=", - "owner": "rustsec", - "repo": "advisory-db", - "rev": "c586bd65ec3543e2fe2f21e358f0645220822325", - "type": "github" + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" }, - "original": { - "owner": "rustsec", - "repo": "advisory-db", - "type": "github" - } - }, - "crane": { "locked": { - "lastModified": 1729741221, - "narHash": "sha256-8AHZZXs1lFkERfBY0C8cZGElSo33D/et7NKEpLRmvzo=", - "owner": "ipetkov", - "repo": "crane", - "rev": "f235b656ee5b2bfd6d94c3bfd67896a575d4a6ed", + "lastModified": 1727826117, + "narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1", "type": "github" }, "original": { - "owner": "ipetkov", - "repo": "crane", - "type": "github" + "id": "flake-parts", + "type": "indirect" } }, "flake-utils": { @@ -65,36 +51,26 @@ "type": "github" } }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1727825735, + "narHash": "sha256-0xHYkMkeLVQAMa7gvkddbPqpxph+hDzdu1XdGPJR+Os=", + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz" + } + }, "root": { "inputs": { - "advisory-db": "advisory-db", - "crane": "crane", + "flake-parts": "flake-parts", "flake-utils": "flake-utils", "nixpkgs": "nixpkgs", - "rust-overlay": "rust-overlay", "treefmt-nix": "treefmt-nix" } }, - "rust-overlay": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1729996302, - "narHash": "sha256-QEU1NQq1+7s1na69Chig9K0iDDTKN0O4Zreo9A9rccA=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "a1b337569f334ff0a01b57627f17b201d746d24c", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, "systems": { "locked": { "lastModified": 1681028828, diff --git a/flake.nix b/flake.nix index f849102..3d609b0 100644 --- a/flake.nix +++ b/flake.nix @@ -4,20 +4,6 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; flake-utils.url = "github:numtide/flake-utils"; - - # rust - crane.url = "github:ipetkov/crane"; - - rust-overlay = { - url = "github:oxalica/rust-overlay"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - # checks/formatting - advisory-db = { - url = "github:rustsec/advisory-db"; - flake = false; - }; treefmt-nix = { url = "github:numtide/treefmt-nix"; inputs.nixpkgs.follows = "nixpkgs"; @@ -26,128 +12,74 @@ outputs = { - self, nixpkgs, - advisory-db, - crane, - flake-utils, - rust-overlay, + flake-parts, treefmt-nix, ... - }: - flake-utils.lib.eachDefaultSystem ( - system: - let - pkgs = import nixpkgs { - inherit system; - overlays = [ (import rust-overlay) ]; - }; - - inherit (pkgs) lib; - - rustToolchainWith = - extensions: - pkgs.rust-bin.selectLatestNightlyWith ( - toolchain: toolchain.default.override { inherit extensions; } - ); - rustToolchain = rustToolchainWith [ ]; - craneLib = (crane.mkLib pkgs).overrideToolchain rustToolchain; - src = lib.cleanSourceWith { - src = craneLib.path ./cli; - filter = - path: type: builtins.match "^src/test.*" path != null || (craneLib.filterCargoSources path type); - }; - - commonArgs = { - inherit src; - strictDeps = true; - nativeBuildInputs = ( - with pkgs; - ( - [ pkg-config ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ] - ) - ); - buildInputs = (with pkgs; [ openssl ]); - }; - - # Build *just* the cargo dependencies - cargoArtifacts = craneLib.buildDepsOnly commonArgs; - - # Build the actual crate itself, reusing the dependency artifacts from - # above - platformio2nix = craneLib.buildPackage ( - commonArgs - // { - inherit cargoArtifacts; - doCheck = false; + }@inputs: + flake-parts.lib.mkFlake { inherit inputs; } { + systems = [ + "aarch64-darwin" + "aarch64-linux" + "x86_64-darwin" + "x86_64-linux" + ]; + imports = [ inputs.treefmt-nix.flakeModule ]; + + perSystem = + { + config, + system, + inputs', + pkgs, + lib, + ... + }: + ( + let + platformio2nix = pkgs.rustPlatform.buildRustPackage { + pname = "platformio2nix"; + version = "0.1.1"; + src = ./cli; + cargoLock.lockFile = ./cli/Cargo.lock; + + nativeBuildInputs = + with pkgs; + [ pkg-config ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; + buildInputs = with pkgs; [ openssl ]; + }; + in + { + packages = rec { + default = platformio2nix; + inherit platformio2nix; + }; + + treefmt = import ./treefmt.nix; + + devShells.default = pkgs.mkShell { + inherit (platformio2nix) nativeBuildInputs buildInputs; + packages = ( + with pkgs; + [ + cargo + clippy + config.treefmt.build.wrapper + rust-analyzer + rustfmt + ] + ); + + LD_LIBRARY_PATH = lib.makeLibraryPath [ pkgs.openssl ]; + RUST_SRC_PATH = "${pkgs.rustPlatform.rustLibSrc}"; + }; } ); - treefmt = treefmt-nix.lib.evalModule pkgs ( - import ./treefmt.nix { rustfmt = rustToolchain.passthru.availableComponents.rustfmt; } - ); - in - { - checks = { - # Build the crate as part of `nix flake check` for convenience - crate = platformio2nix; - - # Note that this is done as a separate derivation so that - # we can block the CI if there are issues here, but not - # prevent downstream consumers from building our crate by itself. - clippy = craneLib.cargoClippy ( - commonArgs - // { - inherit cargoArtifacts; - cargoClippyExtraArgs = "--all-targets -- --deny warnings"; - } - ); - - crate-doc = craneLib.cargoDoc (commonArgs // { inherit cargoArtifacts; }); - - # Check formatting - formatting = treefmt.config.build.check self; - - # Audit dependencies - audit = craneLib.cargoAudit { inherit src advisory-db; }; - - # Audit licenses - deny = craneLib.cargoDeny { inherit src; }; - - # Run tests with cargo-nextest. Set `doCheck = false` to prevent tests running twice - nextest = craneLib.cargoNextest (commonArgs // { inherit cargoArtifacts; }); - - # Ensure that example builds - }; - - packages = rec { - default = platformio2nix; - inherit platformio2nix; - - makePlatformIOSetupHook = pkgs.callPackage ./setup-hook.nix { }; + flake = { + overlays.default = final: prev: { + makePlatformIOSetupHook = final.callPackage ./setup-hook.nix { }; }; - - apps.default = flake-utils.lib.mkApp { drv = platformio2nix; }; - - formatter = treefmt.config.build.wrapper; - - devShells.default = - let - rustToolchain = ( - rustToolchainWith [ - "rust-src" - "rust-analyzer" - ] - ); - in - (craneLib.overrideToolchain rustToolchain).devShell { - checks = self.checks.${system}; # inherit inputs from checks - packages = [ - treefmt.config.build.programs.nixfmt - pkgs.platformio - ]; - RUST_SRC_PATH = "${rustToolchain.passthru.availableComponents.rust-src}"; - }; - } - ); + }; + }; } diff --git a/treefmt.nix b/treefmt.nix index 9f5ed5f..179980a 100644 --- a/treefmt.nix +++ b/treefmt.nix @@ -1,14 +1,10 @@ -{ rustfmt }: { ... }: { projectRootFile = "flake.nix"; - programs.rustfmt = { - enable = true; - package = rustfmt; + programs = { + nixfmt.enable = true; + rustfmt.enable = true; + taplo.enable = true; }; - - programs.taplo.enable = true; - - programs.nixfmt.enable = true; }