commit c79324a84315d2092240bccdff15fbd06dc1c558 Author: Savanni D'Gerinel Date: Thu Jan 25 12:07:38 2024 -0500 Minimal flake and resources demo diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..77adcb1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.direnv +/target diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..ef23b84 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,773 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "anyhow" +version = "1.0.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "bitflags" +version = "2.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" + +[[package]] +name = "cairo-rs" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ca26ef0159422fb77631dc9d17b102f253b876fe1586b03b803e63a309b4ee2" +dependencies = [ + "bitflags", + "cairo-sys-rs", + "glib", + "libc", + "once_cell", + "thiserror", +] + +[[package]] +name = "cairo-sys-rs" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "685c9fa8e590b8b3d678873528d83411db17242a73fccaed827770ea0fedda51" +dependencies = [ + "glib-sys", + "libc", + "system-deps", +] + +[[package]] +name = "cfg-expr" +version = "0.15.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6100bc57b6209840798d95cb2775684849d332f7bd788db2a8c8caf7ef82a41a" +dependencies = [ + "smallvec", + "target-lexicon", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "field-offset" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f" +dependencies = [ + "memoffset", + "rustc_version", +] + +[[package]] +name = "futures-channel" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +dependencies = [ + "futures-core", +] + +[[package]] +name = "futures-core" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" + +[[package]] +name = "futures-executor" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" + +[[package]] +name = "futures-macro" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "futures-task" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" + +[[package]] +name = "futures-util" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +dependencies = [ + "futures-core", + "futures-macro", + "futures-task", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "gdk-pixbuf" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50e1f5f1b0bfb830d6ccc8066d18db35c487b1b2b1e8589b5dfe9f07e8defaec" +dependencies = [ + "gdk-pixbuf-sys", + "gio", + "glib", + "libc", + "once_cell", +] + +[[package]] +name = "gdk-pixbuf-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9839ea644ed9c97a34d129ad56d38a25e6756f99f3a88e15cd39c20629caf7" +dependencies = [ + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "gdk4" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7edb019ad581f8ecf8ea8e4baa6df7c483a95b5a59be3140be6a9c3b0c632af6" +dependencies = [ + "cairo-rs", + "gdk-pixbuf", + "gdk4-sys", + "gio", + "glib", + "libc", + "pango", +] + +[[package]] +name = "gdk4-sys" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbab43f332a3cf1df9974da690b5bb0e26720ed09a228178ce52175372dcfef0" +dependencies = [ + "cairo-sys-rs", + "gdk-pixbuf-sys", + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "pango-sys", + "pkg-config", + "system-deps", +] + +[[package]] +name = "gio" +version = "0.18.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4fc8f532f87b79cbc51a79748f16a6828fb784be93145a322fa14d06d354c73" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-util", + "gio-sys", + "glib", + "libc", + "once_cell", + "pin-project-lite", + "smallvec", + "thiserror", +] + +[[package]] +name = "gio-sys" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37566df850baf5e4cb0dfb78af2e4b9898d817ed9263d1090a2df958c64737d2" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", + "winapi", +] + +[[package]] +name = "glib" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233daaf6e83ae6a12a52055f568f9d7cf4671dabb78ff9560ab6da230ce00ee5" +dependencies = [ + "bitflags", + "futures-channel", + "futures-core", + "futures-executor", + "futures-task", + "futures-util", + "gio-sys", + "glib-macros", + "glib-sys", + "gobject-sys", + "libc", + "memchr", + "once_cell", + "smallvec", + "thiserror", +] + +[[package]] +name = "glib-build-tools" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3431c56f463443cba9bc3600248bc6d680cb614c2ee1cdd39dab5415bd12ac5c" + +[[package]] +name = "glib-macros" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bb0228f477c0900c880fd78c8759b95c7636dbd7842707f49e132378aa2acdc" +dependencies = [ + "heck", + "proc-macro-crate 2.0.1", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "glib-sys" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "063ce2eb6a8d0ea93d2bf8ba1957e78dbab6be1c2220dd3daca57d5a9d869898" +dependencies = [ + "libc", + "system-deps", +] + +[[package]] +name = "gobject-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0850127b514d1c4a4654ead6dedadb18198999985908e6ffe4436f53c785ce44" +dependencies = [ + "glib-sys", + "libc", + "system-deps", +] + +[[package]] +name = "graphene-rs" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b2228cda1505613a7a956cca69076892cfbda84fc2b7a62b94a41a272c0c401" +dependencies = [ + "glib", + "graphene-sys", + "libc", +] + +[[package]] +name = "graphene-sys" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc4144cee8fc8788f2a9b73dc5f1d4e1189d1f95305c4cb7bd9c1af1cfa31f59" +dependencies = [ + "glib-sys", + "libc", + "pkg-config", + "system-deps", +] + +[[package]] +name = "gsk4" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d958e351d2f210309b32d081c832d7de0aca0b077aa10d88336c6379bd01f7e" +dependencies = [ + "cairo-rs", + "gdk4", + "glib", + "graphene-rs", + "gsk4-sys", + "libc", + "pango", +] + +[[package]] +name = "gsk4-sys" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12bd9e3effea989f020e8f1ff3fa3b8c63ba93d43b899c11a118868853a56d55" +dependencies = [ + "cairo-sys-rs", + "gdk4-sys", + "glib-sys", + "gobject-sys", + "graphene-sys", + "libc", + "pango-sys", + "system-deps", +] + +[[package]] +name = "gtk4" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aeb51aa3e9728575a053e1f43543cd9992ac2477e1b186ad824fd4adfb70842" +dependencies = [ + "cairo-rs", + "field-offset", + "futures-channel", + "gdk-pixbuf", + "gdk4", + "gio", + "glib", + "graphene-rs", + "gsk4", + "gtk4-macros", + "gtk4-sys", + "libc", + "pango", +] + +[[package]] +name = "gtk4-macros" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d57ec49cf9b657f69a05bca8027cff0a8dfd0c49e812be026fc7311f2163832f" +dependencies = [ + "anyhow", + "proc-macro-crate 1.3.1", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "gtk4-sys" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54d8c4aa23638ce9faa2caf7e2a27d4a1295af2155c8e8d28c4d4eeca7a65eb8" +dependencies = [ + "cairo-sys-rs", + "gdk-pixbuf-sys", + "gdk4-sys", + "gio-sys", + "glib-sys", + "gobject-sys", + "graphene-sys", + "gsk4-sys", + "libc", + "pango-sys", + "system-deps", +] + +[[package]] +name = "hashbrown" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "indexmap" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +dependencies = [ + "equivalent", + "hashbrown", +] + +[[package]] +name = "libc" +version = "0.2.152" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" + +[[package]] +name = "memchr" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" + +[[package]] +name = "memoffset" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +dependencies = [ + "autocfg", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "pango" +version = "0.18.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ca27ec1eb0457ab26f3036ea52229edbdb74dee1edd29063f5b9b010e7ebee4" +dependencies = [ + "gio", + "glib", + "libc", + "once_cell", + "pango-sys", +] + +[[package]] +name = "pango-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "436737e391a843e5933d6d9aa102cb126d501e815b83601365a948a518555dc5" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkg-config" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" + +[[package]] +name = "proc-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit 0.19.15", +] + +[[package]] +name = "proc-macro-crate" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97dc5fea232fc28d2f597b37c4876b348a40e33f3b02cc975c8d006d78d94b1a" +dependencies = [ + "toml_datetime", + "toml_edit 0.20.2", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn 1.0.109", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro2" +version = "1.0.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "resources_demo" +version = "0.1.0" +dependencies = [ + "glib-build-tools", + "gtk4", +] + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] + +[[package]] +name = "semver" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" + +[[package]] +name = "serde" +version = "1.0.195" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.195" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "serde_spanned" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +dependencies = [ + "serde", +] + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "system-deps" +version = "6.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a2d580ff6a20c55dfb86be5f9c238f67835d0e81cbdea8bf5680e0897320331" +dependencies = [ + "cfg-expr", + "heck", + "pkg-config", + "toml", + "version-compare", +] + +[[package]] +name = "target-lexicon" +version = "0.12.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69758bda2e78f098e4ccb393021a0963bb3442eac05f135c30f61b7370bbafae" + +[[package]] +name = "thiserror" +version = "1.0.56" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.56" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "toml" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.20.2", +] + +[[package]] +name = "toml_datetime" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap", + "toml_datetime", + "winnow", +] + +[[package]] +name = "toml_edit" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "version-compare" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "579a42fc0b8e0c63b76519a339be31bed574929511fa53c1a3acae26eb258f29" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "winnow" +version = "0.5.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7cf47b659b318dccbd69cc4797a39ae128f533dce7902a1096044d1967b9c16" +dependencies = [ + "memchr", +] diff --git a/Cargo.nix b/Cargo.nix new file mode 100644 index 0000000..537c5cc --- /dev/null +++ b/Cargo.nix @@ -0,0 +1,3011 @@ + +# This file was @generated by crate2nix 0.11.0 with the command: +# "generate" +# See https://github.com/kolloch/crate2nix for more info. + +{ nixpkgs ? +, pkgs ? import nixpkgs { config = {}; } +, lib ? pkgs.lib +, stdenv ? pkgs.stdenv +, buildRustCrateForPkgs ? pkgs: pkgs.buildRustCrate + # This is used as the `crateOverrides` argument for `buildRustCrate`. +, defaultCrateOverrides ? pkgs.defaultCrateOverrides + # The features to enable for the root_crate or the workspace_members. +, rootFeatures ? [ "default" ] + # If true, throw errors instead of issueing deprecation warnings. +, strictDeprecation ? false + # Used for conditional compilation based on CPU feature detection. +, targetFeatures ? [] + # Whether to perform release builds: longer compile times, faster binaries. +, release ? true + # Additional crate2nix configuration if it exists. +, crateConfig + ? if builtins.pathExists ./crate-config.nix + then pkgs.callPackage ./crate-config.nix {} + else {} +}: + +rec { + # + # "public" attributes that we attempt to keep stable with new versions of crate2nix. + # + + rootCrate = rec { + packageId = "resources_demo"; + + # Use this attribute to refer to the derivation building your root crate package. + # You can override the features with rootCrate.build.override { features = [ "default" "feature1" ... ]; }. + build = internal.buildRustCrateWithFeatures { + inherit packageId; + }; + + # Debug support which might change between releases. + # File a bug if you depend on any for non-debug work! + debug = internal.debugCrate { inherit packageId; }; + }; + # Refer your crate build derivation by name here. + # You can override the features with + # workspaceMembers."${crateName}".build.override { features = [ "default" "feature1" ... ]; }. + workspaceMembers = { + "resources_demo" = rec { + packageId = "resources_demo"; + build = internal.buildRustCrateWithFeatures { + packageId = "resources_demo"; + }; + + # Debug support which might change between releases. + # File a bug if you depend on any for non-debug work! + debug = internal.debugCrate { inherit packageId; }; + }; + }; + + # A derivation that joins the outputs of all workspace members together. + allWorkspaceMembers = pkgs.symlinkJoin { + name = "all-workspace-members"; + paths = + let members = builtins.attrValues workspaceMembers; + in builtins.map (m: m.build) members; + }; + + # + # "internal" ("private") attributes that may change in every new version of crate2nix. + # + + internal = rec { + # Build and dependency information for crates. + # Many of the fields are passed one-to-one to buildRustCrate. + # + # Noteworthy: + # * `dependencies`/`buildDependencies`: similar to the corresponding fields for buildRustCrate. + # but with additional information which is used during dependency/feature resolution. + # * `resolvedDependencies`: the selected default features reported by cargo - only included for debugging. + # * `devDependencies` as of now not used by `buildRustCrate` but used to + # inject test dependencies into the build + + crates = { + "anyhow" = rec { + crateName = "anyhow"; + version = "1.0.79"; + edition = "2018"; + sha256 = "1ji5irqiwr8yprgqj8zvnli7zd7fz9kzaiddq44jnrl2l289h3h8"; + authors = [ + "David Tolnay " + ]; + features = { + "backtrace" = [ "dep:backtrace" ]; + "default" = [ "std" ]; + }; + resolvedDefaultFeatures = [ "default" "std" ]; + }; + "autocfg" = rec { + crateName = "autocfg"; + version = "1.1.0"; + edition = "2015"; + sha256 = "1ylp3cb47ylzabimazvbz9ms6ap784zhb6syaz6c1jqpmcmq0s6l"; + authors = [ + "Josh Stone " + ]; + + }; + "bitflags" = rec { + crateName = "bitflags"; + version = "2.4.2"; + edition = "2021"; + sha256 = "1pqd142hyqlzr7p9djxq2ff0jx07a2sb2xp9lhw69cbf80s0jmzd"; + authors = [ + "The Rust Project Developers" + ]; + features = { + "arbitrary" = [ "dep:arbitrary" ]; + "bytemuck" = [ "dep:bytemuck" ]; + "compiler_builtins" = [ "dep:compiler_builtins" ]; + "core" = [ "dep:core" ]; + "rustc-dep-of-std" = [ "core" "compiler_builtins" ]; + "serde" = [ "dep:serde" ]; + }; + }; + "cairo-rs" = rec { + crateName = "cairo-rs"; + version = "0.18.5"; + edition = "2021"; + sha256 = "1qjfkcq3mrh3p01nnn71dy3kn99g21xx3j8xcdvzn8ll2pq6x8lc"; + libName = "cairo"; + authors = [ + "The gtk-rs Project Developers" + ]; + dependencies = [ + { + name = "bitflags"; + packageId = "bitflags"; + } + { + name = "cairo-sys-rs"; + packageId = "cairo-sys-rs"; + rename = "ffi"; + } + { + name = "glib"; + packageId = "glib"; + optional = true; + } + { + name = "libc"; + packageId = "libc"; + } + { + name = "once_cell"; + packageId = "once_cell"; + } + { + name = "thiserror"; + packageId = "thiserror"; + } + ]; + features = { + "default" = [ "use_glib" ]; + "freetype" = [ "ffi/freetype" "freetype-rs" ]; + "freetype-rs" = [ "dep:freetype-rs" ]; + "glib" = [ "dep:glib" ]; + "pdf" = [ "ffi/pdf" ]; + "png" = [ "ffi/png" ]; + "ps" = [ "ffi/ps" ]; + "script" = [ "ffi/script" ]; + "svg" = [ "ffi/svg" ]; + "use_glib" = [ "glib" "ffi/use_glib" ]; + "v1_16" = [ "ffi/v1_16" ]; + "v1_18" = [ "v1_16" "ffi/v1_18" ]; + "win32-surface" = [ "ffi/win32-surface" ]; + "xcb" = [ "ffi/xcb" ]; + "xlib" = [ "ffi/xlib" ]; + }; + resolvedDefaultFeatures = [ "default" "glib" "use_glib" ]; + }; + "cairo-sys-rs" = rec { + crateName = "cairo-sys-rs"; + version = "0.18.2"; + edition = "2021"; + sha256 = "0lfsxl7ylw3phbnwmz3k58j1gnqi6kc2hdc7g3bb7f4hwnl9yp38"; + libName = "cairo_sys"; + authors = [ + "The gtk-rs Project Developers" + ]; + dependencies = [ + { + name = "glib-sys"; + packageId = "glib-sys"; + rename = "glib"; + optional = true; + } + { + name = "libc"; + packageId = "libc"; + } + ]; + buildDependencies = [ + { + name = "system-deps"; + packageId = "system-deps"; + } + ]; + features = { + "glib" = [ "dep:glib" ]; + "use_glib" = [ "glib" ]; + "v1_18" = [ "v1_16" ]; + "win32-surface" = [ "winapi" ]; + "winapi" = [ "dep:winapi" ]; + "x11" = [ "dep:x11" ]; + "xlib" = [ "x11" ]; + }; + resolvedDefaultFeatures = [ "glib" "use_glib" ]; + }; + "cfg-expr" = rec { + crateName = "cfg-expr"; + version = "0.15.6"; + edition = "2021"; + sha256 = "06m4hbpzgjn8m2r8sy5xywrd6ja8d1sjgjwmimwl1610nrbvq031"; + authors = [ + "Embark " + "Jake Shadle " + ]; + dependencies = [ + { + name = "smallvec"; + packageId = "smallvec"; + } + { + name = "target-lexicon"; + packageId = "target-lexicon"; + optional = true; + } + ]; + features = { + "target-lexicon" = [ "dep:target-lexicon" ]; + "targets" = [ "target-lexicon" ]; + }; + resolvedDefaultFeatures = [ "default" "target-lexicon" "targets" ]; + }; + "equivalent" = rec { + crateName = "equivalent"; + version = "1.0.1"; + edition = "2015"; + sha256 = "1malmx5f4lkfvqasz319lq6gb3ddg19yzf9s8cykfsgzdmyq0hsl"; + + }; + "field-offset" = rec { + crateName = "field-offset"; + version = "0.3.6"; + edition = "2015"; + sha256 = "0zq5sssaa2ckmcmxxbly8qgz3sxpb8g1lwv90sdh1z74qif2gqiq"; + authors = [ + "Diggory Blake " + ]; + dependencies = [ + { + name = "memoffset"; + packageId = "memoffset"; + } + ]; + buildDependencies = [ + { + name = "rustc_version"; + packageId = "rustc_version"; + } + ]; + + }; + "futures-channel" = rec { + crateName = "futures-channel"; + version = "0.3.30"; + edition = "2018"; + sha256 = "0y6b7xxqdjm9hlcjpakcg41qfl7lihf6gavk8fyqijsxhvbzgj7a"; + dependencies = [ + { + name = "futures-core"; + packageId = "futures-core"; + usesDefaultFeatures = false; + } + ]; + features = { + "alloc" = [ "futures-core/alloc" ]; + "default" = [ "std" ]; + "futures-sink" = [ "dep:futures-sink" ]; + "sink" = [ "futures-sink" ]; + "std" = [ "alloc" "futures-core/std" ]; + }; + resolvedDefaultFeatures = [ "alloc" "default" "std" ]; + }; + "futures-core" = rec { + crateName = "futures-core"; + version = "0.3.30"; + edition = "2018"; + sha256 = "07aslayrn3lbggj54kci0ishmd1pr367fp7iks7adia1p05miinz"; + features = { + "default" = [ "std" ]; + "portable-atomic" = [ "dep:portable-atomic" ]; + "std" = [ "alloc" ]; + }; + resolvedDefaultFeatures = [ "alloc" "std" ]; + }; + "futures-executor" = rec { + crateName = "futures-executor"; + version = "0.3.30"; + edition = "2018"; + sha256 = "07dh08gs9vfll2h36kq32q9xd86xm6lyl9xikmmwlkqnmrrgqxm5"; + dependencies = [ + { + name = "futures-core"; + packageId = "futures-core"; + usesDefaultFeatures = false; + } + { + name = "futures-task"; + packageId = "futures-task"; + usesDefaultFeatures = false; + } + { + name = "futures-util"; + packageId = "futures-util"; + usesDefaultFeatures = false; + } + ]; + features = { + "default" = [ "std" ]; + "num_cpus" = [ "dep:num_cpus" ]; + "std" = [ "futures-core/std" "futures-task/std" "futures-util/std" ]; + "thread-pool" = [ "std" "num_cpus" ]; + }; + resolvedDefaultFeatures = [ "default" "std" ]; + }; + "futures-io" = rec { + crateName = "futures-io"; + version = "0.3.30"; + edition = "2018"; + sha256 = "1hgh25isvsr4ybibywhr4dpys8mjnscw4wfxxwca70cn1gi26im4"; + features = { + "default" = [ "std" ]; + }; + resolvedDefaultFeatures = [ "default" "std" ]; + }; + "futures-macro" = rec { + crateName = "futures-macro"; + version = "0.3.30"; + edition = "2018"; + sha256 = "1b49qh9d402y8nka4q6wvvj0c88qq91wbr192mdn5h54nzs0qxc7"; + procMacro = true; + dependencies = [ + { + name = "proc-macro2"; + packageId = "proc-macro2"; + } + { + name = "quote"; + packageId = "quote"; + } + { + name = "syn"; + packageId = "syn 2.0.48"; + features = [ "full" ]; + } + ]; + + }; + "futures-task" = rec { + crateName = "futures-task"; + version = "0.3.30"; + edition = "2018"; + sha256 = "013h1724454hj8qczp8vvs10qfiqrxr937qsrv6rhii68ahlzn1q"; + features = { + "default" = [ "std" ]; + "std" = [ "alloc" ]; + }; + resolvedDefaultFeatures = [ "alloc" "std" ]; + }; + "futures-util" = rec { + crateName = "futures-util"; + version = "0.3.30"; + edition = "2018"; + sha256 = "0j0xqhcir1zf2dcbpd421kgw6wvsk0rpxflylcysn1rlp3g02r1x"; + dependencies = [ + { + name = "futures-core"; + packageId = "futures-core"; + usesDefaultFeatures = false; + } + { + name = "futures-macro"; + packageId = "futures-macro"; + optional = true; + usesDefaultFeatures = false; + } + { + name = "futures-task"; + packageId = "futures-task"; + usesDefaultFeatures = false; + } + { + name = "pin-project-lite"; + packageId = "pin-project-lite"; + } + { + name = "pin-utils"; + packageId = "pin-utils"; + } + { + name = "slab"; + packageId = "slab"; + optional = true; + } + ]; + features = { + "alloc" = [ "futures-core/alloc" "futures-task/alloc" ]; + "async-await-macro" = [ "async-await" "futures-macro" ]; + "channel" = [ "std" "futures-channel" ]; + "compat" = [ "std" "futures_01" ]; + "default" = [ "std" "async-await" "async-await-macro" ]; + "futures-channel" = [ "dep:futures-channel" ]; + "futures-io" = [ "dep:futures-io" ]; + "futures-macro" = [ "dep:futures-macro" ]; + "futures-sink" = [ "dep:futures-sink" ]; + "futures_01" = [ "dep:futures_01" ]; + "io" = [ "std" "futures-io" "memchr" ]; + "io-compat" = [ "io" "compat" "tokio-io" ]; + "memchr" = [ "dep:memchr" ]; + "portable-atomic" = [ "futures-core/portable-atomic" ]; + "sink" = [ "futures-sink" ]; + "slab" = [ "dep:slab" ]; + "std" = [ "alloc" "futures-core/std" "futures-task/std" "slab" ]; + "tokio-io" = [ "dep:tokio-io" ]; + "unstable" = [ "futures-core/unstable" "futures-task/unstable" ]; + "write-all-vectored" = [ "io" ]; + }; + resolvedDefaultFeatures = [ "alloc" "async-await" "async-await-macro" "default" "futures-macro" "slab" "std" ]; + }; + "gdk-pixbuf" = rec { + crateName = "gdk-pixbuf"; + version = "0.18.5"; + edition = "2021"; + sha256 = "1v7svvl0g7zybndmis5inaqqgi1mvcc6s1n8rkb31f5zn3qzbqah"; + libName = "gdk_pixbuf"; + authors = [ + "The gtk-rs Project Developers" + ]; + dependencies = [ + { + name = "gdk-pixbuf-sys"; + packageId = "gdk-pixbuf-sys"; + rename = "ffi"; + } + { + name = "gio"; + packageId = "gio"; + } + { + name = "glib"; + packageId = "glib"; + } + { + name = "libc"; + packageId = "libc"; + } + { + name = "once_cell"; + packageId = "once_cell"; + } + ]; + features = { + "v2_40" = [ "ffi/v2_40" ]; + "v2_42" = [ "v2_40" "ffi/v2_42" ]; + }; + }; + "gdk-pixbuf-sys" = rec { + crateName = "gdk-pixbuf-sys"; + version = "0.18.0"; + edition = "2021"; + sha256 = "1xya543c4ffd2n7aiwwrdxsyc9casdbasafi6ixcknafckm3k61z"; + libName = "gdk_pixbuf_sys"; + authors = [ + "The gtk-rs Project Developers" + ]; + dependencies = [ + { + name = "gio-sys"; + packageId = "gio-sys"; + rename = "gio"; + } + { + name = "glib-sys"; + packageId = "glib-sys"; + rename = "glib"; + } + { + name = "gobject-sys"; + packageId = "gobject-sys"; + rename = "gobject"; + } + { + name = "libc"; + packageId = "libc"; + } + ]; + buildDependencies = [ + { + name = "system-deps"; + packageId = "system-deps"; + } + ]; + features = { + "v2_42" = [ "v2_40" ]; + }; + }; + "gdk4" = rec { + crateName = "gdk4"; + version = "0.7.3"; + edition = "2021"; + sha256 = "1xiacc63p73apr033gjrb9dsk0y4yxnsljwfxbwfry41snd03nvy"; + authors = [ + "The gtk-rs Project Developers" + ]; + dependencies = [ + { + name = "cairo-rs"; + packageId = "cairo-rs"; + } + { + name = "gdk-pixbuf"; + packageId = "gdk-pixbuf"; + } + { + name = "gdk4-sys"; + packageId = "gdk4-sys"; + rename = "ffi"; + } + { + name = "gio"; + packageId = "gio"; + features = [ "v2_66" ]; + } + { + name = "glib"; + packageId = "glib"; + features = [ "v2_66" ]; + } + { + name = "libc"; + packageId = "libc"; + } + { + name = "pango"; + packageId = "pango"; + features = [ "v1_46" ]; + } + ]; + features = { + "gl" = [ "dep:gl" ]; + "v4_10" = [ "ffi/v4_10" "v4_8" ]; + "v4_12" = [ "ffi/v4_12" "v4_10" ]; + "v4_2" = [ "ffi/v4_2" ]; + "v4_4" = [ "ffi/v4_4" "v4_2" ]; + "v4_6" = [ "ffi/v4_6" "v4_4" ]; + "v4_8" = [ "ffi/v4_8" "v4_6" ]; + }; + resolvedDefaultFeatures = [ "v4_10" "v4_2" "v4_4" "v4_6" "v4_8" ]; + }; + "gdk4-sys" = rec { + crateName = "gdk4-sys"; + version = "0.7.2"; + edition = "2021"; + sha256 = "1w7yvir565sjrrw828lss07749hfpfsr19jdjzwivkx36brl7ayv"; + libName = "gdk4_sys"; + authors = [ + "The gtk-rs Project Developers" + ]; + dependencies = [ + { + name = "cairo-sys-rs"; + packageId = "cairo-sys-rs"; + rename = "cairo"; + } + { + name = "gdk-pixbuf-sys"; + packageId = "gdk-pixbuf-sys"; + rename = "gdk_pixbuf"; + } + { + name = "gio-sys"; + packageId = "gio-sys"; + rename = "gio"; + } + { + name = "glib-sys"; + packageId = "glib-sys"; + rename = "glib"; + } + { + name = "gobject-sys"; + packageId = "gobject-sys"; + rename = "gobject"; + } + { + name = "libc"; + packageId = "libc"; + } + { + name = "pango-sys"; + packageId = "pango-sys"; + rename = "pango"; + } + ]; + buildDependencies = [ + { + name = "pkg-config"; + packageId = "pkg-config"; + } + { + name = "system-deps"; + packageId = "system-deps"; + } + ]; + features = { + "v4_10" = [ "v4_8" ]; + "v4_12" = [ "v4_10" ]; + "v4_4" = [ "v4_2" ]; + "v4_6" = [ "v4_4" ]; + "v4_8" = [ "v4_6" ]; + }; + resolvedDefaultFeatures = [ "v4_10" "v4_2" "v4_4" "v4_6" "v4_8" ]; + }; + "gio" = rec { + crateName = "gio"; + version = "0.18.4"; + edition = "2021"; + sha256 = "0wsc6mnx057s4ailacg99dwgna38dbqli5x7a6y9rdw75x9qzz6l"; + authors = [ + "The gtk-rs Project Developers" + ]; + dependencies = [ + { + name = "futures-channel"; + packageId = "futures-channel"; + } + { + name = "futures-core"; + packageId = "futures-core"; + usesDefaultFeatures = false; + } + { + name = "futures-io"; + packageId = "futures-io"; + } + { + name = "futures-util"; + packageId = "futures-util"; + usesDefaultFeatures = false; + } + { + name = "gio-sys"; + packageId = "gio-sys"; + rename = "ffi"; + } + { + name = "glib"; + packageId = "glib"; + } + { + name = "libc"; + packageId = "libc"; + } + { + name = "once_cell"; + packageId = "once_cell"; + } + { + name = "pin-project-lite"; + packageId = "pin-project-lite"; + } + { + name = "smallvec"; + packageId = "smallvec"; + } + { + name = "thiserror"; + packageId = "thiserror"; + } + ]; + devDependencies = [ + { + name = "futures-util"; + packageId = "futures-util"; + features = [ "io" ]; + } + ]; + features = { + "v2_58" = [ "ffi/v2_58" "glib/v2_58" ]; + "v2_60" = [ "v2_58" "ffi/v2_60" "glib/v2_60" ]; + "v2_62" = [ "v2_60" "ffi/v2_62" "glib/v2_62" ]; + "v2_64" = [ "v2_62" "ffi/v2_64" "glib/v2_64" ]; + "v2_66" = [ "v2_64" "ffi/v2_66" "glib/v2_66" ]; + "v2_68" = [ "v2_66" "ffi/v2_68" "glib/v2_68" ]; + "v2_70" = [ "v2_68" "ffi/v2_70" "glib/v2_70" ]; + "v2_72" = [ "v2_70" "ffi/v2_72" "glib/v2_72" ]; + "v2_74" = [ "v2_72" "ffi/v2_74" "glib/v2_74" ]; + "v2_76" = [ "v2_74" "ffi/v2_76" "glib/v2_76" ]; + "v2_78" = [ "v2_76" "ffi/v2_78" "glib/v2_78" ]; + }; + resolvedDefaultFeatures = [ "v2_58" "v2_60" "v2_62" "v2_64" "v2_66" ]; + }; + "gio-sys" = rec { + crateName = "gio-sys"; + version = "0.18.1"; + edition = "2021"; + sha256 = "1lip8z35iy9d184x2qwjxlbxi64q9cpayy7v1p5y9xdsa3w6smip"; + libName = "gio_sys"; + authors = [ + "The gtk-rs Project Developers" + ]; + dependencies = [ + { + name = "glib-sys"; + packageId = "glib-sys"; + rename = "glib"; + } + { + name = "gobject-sys"; + packageId = "gobject-sys"; + rename = "gobject"; + } + { + name = "libc"; + packageId = "libc"; + } + { + name = "winapi"; + packageId = "winapi"; + target = { target, features }: (target."windows" or false); + features = [ "ws2def" "winsock2" ]; + } + ]; + buildDependencies = [ + { + name = "system-deps"; + packageId = "system-deps"; + } + ]; + features = { + "v2_60" = [ "v2_58" ]; + "v2_62" = [ "v2_60" ]; + "v2_64" = [ "v2_62" ]; + "v2_66" = [ "v2_64" ]; + "v2_68" = [ "v2_66" ]; + "v2_70" = [ "v2_68" ]; + "v2_72" = [ "v2_70" ]; + "v2_74" = [ "v2_72" ]; + "v2_76" = [ "v2_74" ]; + "v2_78" = [ "v2_76" ]; + }; + resolvedDefaultFeatures = [ "v2_58" "v2_60" "v2_62" "v2_64" "v2_66" ]; + }; + "glib" = rec { + crateName = "glib"; + version = "0.18.5"; + edition = "2021"; + sha256 = "1r8fw0627nmn19bgk3xpmcfngx3wkn7mcpq5a8ma3risx3valg93"; + authors = [ + "The gtk-rs Project Developers" + ]; + dependencies = [ + { + name = "bitflags"; + packageId = "bitflags"; + } + { + name = "futures-channel"; + packageId = "futures-channel"; + } + { + name = "futures-core"; + packageId = "futures-core"; + usesDefaultFeatures = false; + } + { + name = "futures-executor"; + packageId = "futures-executor"; + } + { + name = "futures-task"; + packageId = "futures-task"; + usesDefaultFeatures = false; + } + { + name = "futures-util"; + packageId = "futures-util"; + } + { + name = "gio-sys"; + packageId = "gio-sys"; + rename = "gio_ffi"; + optional = true; + } + { + name = "glib-macros"; + packageId = "glib-macros"; + } + { + name = "glib-sys"; + packageId = "glib-sys"; + rename = "ffi"; + } + { + name = "gobject-sys"; + packageId = "gobject-sys"; + rename = "gobject_ffi"; + } + { + name = "libc"; + packageId = "libc"; + } + { + name = "memchr"; + packageId = "memchr"; + } + { + name = "once_cell"; + packageId = "once_cell"; + } + { + name = "smallvec"; + packageId = "smallvec"; + features = [ "union" "const_generics" "const_new" ]; + } + { + name = "thiserror"; + packageId = "thiserror"; + } + ]; + features = { + "default" = [ "gio" ]; + "gio" = [ "gio_ffi" ]; + "gio_ffi" = [ "dep:gio_ffi" ]; + "log" = [ "rs-log" ]; + "log_macros" = [ "log" ]; + "rs-log" = [ "dep:rs-log" ]; + "v2_58" = [ "ffi/v2_58" "gobject_ffi/v2_58" ]; + "v2_60" = [ "v2_58" "ffi/v2_60" ]; + "v2_62" = [ "v2_60" "ffi/v2_62" "gobject_ffi/v2_62" ]; + "v2_64" = [ "v2_62" "ffi/v2_64" ]; + "v2_66" = [ "v2_64" "ffi/v2_66" "gobject_ffi/v2_66" ]; + "v2_68" = [ "v2_66" "ffi/v2_68" "gobject_ffi/v2_68" ]; + "v2_70" = [ "v2_68" "ffi/v2_70" "gobject_ffi/v2_70" ]; + "v2_72" = [ "v2_70" "ffi/v2_72" "gobject_ffi/v2_72" ]; + "v2_74" = [ "v2_72" "ffi/v2_74" "gobject_ffi/v2_74" ]; + "v2_76" = [ "v2_74" "ffi/v2_76" "gobject_ffi/v2_76" ]; + "v2_78" = [ "v2_76" "ffi/v2_78" "gobject_ffi/v2_78" ]; + }; + resolvedDefaultFeatures = [ "default" "gio" "gio_ffi" "v2_58" "v2_60" "v2_62" "v2_64" "v2_66" ]; + }; + "glib-build-tools" = rec { + crateName = "glib-build-tools"; + version = "0.18.0"; + edition = "2021"; + sha256 = "0p5c2ayiam5bkp9wvq9f9ihwp06nqs5j801npjlwnhrl8rpwac9l"; + authors = [ + "The gtk-rs Project Developers" + ]; + features = { + "gio" = [ "dep:gio" ]; + }; + }; + "glib-macros" = rec { + crateName = "glib-macros"; + version = "0.18.5"; + edition = "2021"; + sha256 = "1p5cla53fcp195zp0hkqpmnn7iwmkdswhy7xh34002bw8y7j5c0b"; + procMacro = true; + authors = [ + "The gtk-rs Project Developers" + ]; + dependencies = [ + { + name = "heck"; + packageId = "heck"; + } + { + name = "proc-macro-crate"; + packageId = "proc-macro-crate 2.0.1"; + } + { + name = "proc-macro-error"; + packageId = "proc-macro-error"; + } + { + name = "proc-macro2"; + packageId = "proc-macro2"; + } + { + name = "quote"; + packageId = "quote"; + } + { + name = "syn"; + packageId = "syn 2.0.48"; + features = [ "full" ]; + } + ]; + + }; + "glib-sys" = rec { + crateName = "glib-sys"; + version = "0.18.1"; + edition = "2021"; + sha256 = "164qhsfmlzd5mhyxs8123jzbdfldwxbikfpq5cysj3lddbmy4g06"; + libName = "glib_sys"; + authors = [ + "The gtk-rs Project Developers" + ]; + dependencies = [ + { + name = "libc"; + packageId = "libc"; + } + ]; + buildDependencies = [ + { + name = "system-deps"; + packageId = "system-deps"; + } + ]; + features = { + "v2_60" = [ "v2_58" ]; + "v2_62" = [ "v2_60" ]; + "v2_64" = [ "v2_62" ]; + "v2_66" = [ "v2_64" ]; + "v2_68" = [ "v2_66" ]; + "v2_70" = [ "v2_68" ]; + "v2_72" = [ "v2_70" ]; + "v2_74" = [ "v2_72" ]; + "v2_76" = [ "v2_74" ]; + "v2_78" = [ "v2_76" ]; + }; + resolvedDefaultFeatures = [ "v2_58" "v2_60" "v2_62" "v2_64" "v2_66" ]; + }; + "gobject-sys" = rec { + crateName = "gobject-sys"; + version = "0.18.0"; + edition = "2021"; + sha256 = "0i6fhp3m6vs3wkzyc22rk2cqj68qvgddxmpaai34l72da5xi4l08"; + libName = "gobject_sys"; + authors = [ + "The gtk-rs Project Developers" + ]; + dependencies = [ + { + name = "glib-sys"; + packageId = "glib-sys"; + rename = "glib"; + } + { + name = "libc"; + packageId = "libc"; + } + ]; + buildDependencies = [ + { + name = "system-deps"; + packageId = "system-deps"; + } + ]; + features = { + "v2_62" = [ "v2_58" ]; + "v2_66" = [ "v2_62" ]; + "v2_68" = [ "v2_66" ]; + "v2_70" = [ "v2_68" ]; + "v2_72" = [ "v2_70" ]; + "v2_74" = [ "v2_72" ]; + "v2_76" = [ "v2_74" ]; + "v2_78" = [ "v2_74" ]; + }; + resolvedDefaultFeatures = [ "v2_58" "v2_62" "v2_66" ]; + }; + "graphene-rs" = rec { + crateName = "graphene-rs"; + version = "0.18.1"; + edition = "2021"; + sha256 = "00f4q1ra4haap5i7lazwhkdgnb49fs8adk2nm6ki6mjhl76jh8iv"; + libName = "graphene"; + authors = [ + "The gtk-rs Project Developers" + ]; + dependencies = [ + { + name = "glib"; + packageId = "glib"; + } + { + name = "graphene-sys"; + packageId = "graphene-sys"; + rename = "ffi"; + } + { + name = "libc"; + packageId = "libc"; + } + ]; + features = { + "v1_12" = [ "ffi/v1_12" ]; + }; + }; + "graphene-sys" = rec { + crateName = "graphene-sys"; + version = "0.18.1"; + edition = "2021"; + sha256 = "0n8zlg7z26lwpnvlqp1hjlgrs671skqwagdpm7r8i1zwx3748hfc"; + libName = "graphene_sys"; + authors = [ + "The gtk-rs Project Developers" + ]; + dependencies = [ + { + name = "glib-sys"; + packageId = "glib-sys"; + rename = "glib"; + } + { + name = "libc"; + packageId = "libc"; + } + ]; + buildDependencies = [ + { + name = "pkg-config"; + packageId = "pkg-config"; + } + { + name = "system-deps"; + packageId = "system-deps"; + } + ]; + features = { + }; + }; + "gsk4" = rec { + crateName = "gsk4"; + version = "0.7.3"; + edition = "2021"; + sha256 = "0zhzs2dkgiinhgc11akpn2harq3x5n1iq21dnc4h689g3lsqx58d"; + authors = [ + "The gtk-rs Project Developers" + ]; + dependencies = [ + { + name = "cairo-rs"; + packageId = "cairo-rs"; + } + { + name = "gdk4"; + packageId = "gdk4"; + rename = "gdk"; + } + { + name = "glib"; + packageId = "glib"; + features = [ "v2_66" ]; + } + { + name = "graphene-rs"; + packageId = "graphene-rs"; + rename = "graphene"; + } + { + name = "gsk4-sys"; + packageId = "gsk4-sys"; + rename = "ffi"; + } + { + name = "libc"; + packageId = "libc"; + } + { + name = "pango"; + packageId = "pango"; + features = [ "v1_46" ]; + } + ]; + features = { + "broadway" = [ "ffi/broadway" ]; + "v4_10" = [ "ffi/v4_10" "gdk/v4_10" "v4_6" ]; + "v4_14" = [ "ffi/v4_14" "v4_10" ]; + "v4_2" = [ "ffi/v4_2" "gdk/v4_2" ]; + "v4_4" = [ "ffi/v4_4" "gdk/v4_4" "v4_2" ]; + "v4_6" = [ "ffi/v4_6" "gdk/v4_6" "v4_4" ]; + "vulkan" = [ "ffi/vulkan" ]; + }; + resolvedDefaultFeatures = [ "v4_10" "v4_2" "v4_4" "v4_6" ]; + }; + "gsk4-sys" = rec { + crateName = "gsk4-sys"; + version = "0.7.3"; + edition = "2021"; + sha256 = "0mbdlm9qi1hql48rr29vsj9vlqwc7gxg67wg1q19z67azwz9xg8j"; + libName = "gsk4_sys"; + authors = [ + "The gtk-rs Project Developers" + ]; + dependencies = [ + { + name = "cairo-sys-rs"; + packageId = "cairo-sys-rs"; + rename = "cairo"; + } + { + name = "gdk4-sys"; + packageId = "gdk4-sys"; + rename = "gdk"; + } + { + name = "glib-sys"; + packageId = "glib-sys"; + rename = "glib"; + } + { + name = "gobject-sys"; + packageId = "gobject-sys"; + rename = "gobject"; + } + { + name = "graphene-sys"; + packageId = "graphene-sys"; + rename = "graphene"; + } + { + name = "libc"; + packageId = "libc"; + } + { + name = "pango-sys"; + packageId = "pango-sys"; + rename = "pango"; + } + ]; + buildDependencies = [ + { + name = "system-deps"; + packageId = "system-deps"; + } + ]; + features = { + "v4_10" = [ "v4_6" ]; + "v4_14" = [ "v4_10" ]; + "v4_4" = [ "v4_2" ]; + "v4_6" = [ "v4_4" ]; + }; + resolvedDefaultFeatures = [ "v4_10" "v4_2" "v4_4" "v4_6" ]; + }; + "gtk4" = rec { + crateName = "gtk4"; + version = "0.7.3"; + edition = "2021"; + sha256 = "0hh8nzglmz94v1m1h6vy8z12m6fr7ia467ry0md5fa4p7sm53sss"; + authors = [ + "The gtk-rs Project Developers" + ]; + dependencies = [ + { + name = "cairo-rs"; + packageId = "cairo-rs"; + } + { + name = "field-offset"; + packageId = "field-offset"; + } + { + name = "futures-channel"; + packageId = "futures-channel"; + } + { + name = "gdk-pixbuf"; + packageId = "gdk-pixbuf"; + } + { + name = "gdk4"; + packageId = "gdk4"; + rename = "gdk"; + } + { + name = "gio"; + packageId = "gio"; + features = [ "v2_66" ]; + } + { + name = "glib"; + packageId = "glib"; + features = [ "v2_66" ]; + } + { + name = "graphene-rs"; + packageId = "graphene-rs"; + rename = "graphene"; + } + { + name = "gsk4"; + packageId = "gsk4"; + rename = "gsk"; + } + { + name = "gtk4-macros"; + packageId = "gtk4-macros"; + } + { + name = "gtk4-sys"; + packageId = "gtk4-sys"; + rename = "ffi"; + } + { + name = "libc"; + packageId = "libc"; + } + { + name = "pango"; + packageId = "pango"; + features = [ "v1_46" ]; + } + ]; + features = { + "blueprint" = [ "gtk4-macros/blueprint" ]; + "gnome_42" = [ "v4_6" "cairo-rs/v1_16" "gdk-pixbuf/v2_42" "gio/v2_72" ]; + "gnome_43" = [ "v4_8" "cairo-rs/v1_16" "gdk-pixbuf/v2_42" "gio/v2_74" ]; + "gnome_44" = [ "v4_10" "cairo-rs/v1_16" "gdk-pixbuf/v2_42" "gio/v2_76" ]; + "gnome_45" = [ "v4_12" "cairo-rs/v1_16" "pango/v1_52" "gdk-pixbuf/v2_42" "gio/v2_78" ]; + "v4_10" = [ "ffi/v4_10" "v4_8" "gdk/v4_10" "gsk/v4_10" ]; + "v4_12" = [ "ffi/v4_12" "v4_10" "gdk/v4_12" ]; + "v4_14" = [ "ffi/v4_14" "v4_12" "gsk/v4_14" ]; + "v4_2" = [ "ffi/v4_2" "gdk/v4_2" "gsk/v4_2" ]; + "v4_4" = [ "ffi/v4_4" "v4_2" "gdk/v4_4" "gsk/v4_4" ]; + "v4_6" = [ "ffi/v4_6" "v4_4" "gdk/v4_6" "gsk/v4_6" "pango/v1_50" ]; + "v4_8" = [ "ffi/v4_8" "v4_6" "gdk/v4_8" ]; + "xml_validation" = [ "gtk4-macros/xml_validation" ]; + }; + resolvedDefaultFeatures = [ "v4_10" "v4_2" "v4_4" "v4_6" "v4_8" ]; + }; + "gtk4-macros" = rec { + crateName = "gtk4-macros"; + version = "0.7.2"; + edition = "2021"; + sha256 = "0bw3cchiycf7dw1bw4p8946gv38azxy05a5w0ndgcmxnz6fc8znm"; + procMacro = true; + authors = [ + "The gtk-rs Project Developers" + ]; + dependencies = [ + { + name = "anyhow"; + packageId = "anyhow"; + } + { + name = "proc-macro-crate"; + packageId = "proc-macro-crate 1.3.1"; + } + { + name = "proc-macro-error"; + packageId = "proc-macro-error"; + } + { + name = "proc-macro2"; + packageId = "proc-macro2"; + } + { + name = "quote"; + packageId = "quote"; + } + { + name = "syn"; + packageId = "syn 1.0.109"; + features = [ "full" ]; + } + ]; + features = { + "quick-xml" = [ "dep:quick-xml" ]; + "xml_validation" = [ "quick-xml" ]; + }; + resolvedDefaultFeatures = [ "default" ]; + }; + "gtk4-sys" = rec { + crateName = "gtk4-sys"; + version = "0.7.3"; + edition = "2021"; + sha256 = "1f2ylskyqkjdik9fij2m46pra4jagnif5xyalbxfk3334fmc9n2l"; + libName = "gtk4_sys"; + authors = [ + "The gtk-rs Project Developers" + ]; + dependencies = [ + { + name = "cairo-sys-rs"; + packageId = "cairo-sys-rs"; + rename = "cairo"; + } + { + name = "gdk-pixbuf-sys"; + packageId = "gdk-pixbuf-sys"; + rename = "gdk_pixbuf"; + } + { + name = "gdk4-sys"; + packageId = "gdk4-sys"; + rename = "gdk"; + } + { + name = "gio-sys"; + packageId = "gio-sys"; + rename = "gio"; + } + { + name = "glib-sys"; + packageId = "glib-sys"; + rename = "glib"; + } + { + name = "gobject-sys"; + packageId = "gobject-sys"; + rename = "gobject"; + } + { + name = "graphene-sys"; + packageId = "graphene-sys"; + rename = "graphene"; + } + { + name = "gsk4-sys"; + packageId = "gsk4-sys"; + rename = "gsk"; + } + { + name = "libc"; + packageId = "libc"; + } + { + name = "pango-sys"; + packageId = "pango-sys"; + rename = "pango"; + } + ]; + buildDependencies = [ + { + name = "system-deps"; + packageId = "system-deps"; + } + ]; + features = { + "v4_10" = [ "v4_8" ]; + "v4_12" = [ "v4_10" ]; + "v4_14" = [ "v4_12" ]; + "v4_4" = [ "v4_2" ]; + "v4_6" = [ "v4_4" ]; + "v4_8" = [ "v4_6" ]; + }; + resolvedDefaultFeatures = [ "v4_10" "v4_2" "v4_4" "v4_6" "v4_8" ]; + }; + "hashbrown" = rec { + crateName = "hashbrown"; + version = "0.14.3"; + edition = "2021"; + sha256 = "012nywlg0lj9kwanh69my5x67vjlfmzfi9a0rq4qvis2j8fil3r9"; + authors = [ + "Amanieu d'Antras " + ]; + features = { + "ahash" = [ "dep:ahash" ]; + "alloc" = [ "dep:alloc" ]; + "allocator-api2" = [ "dep:allocator-api2" ]; + "compiler_builtins" = [ "dep:compiler_builtins" ]; + "core" = [ "dep:core" ]; + "default" = [ "ahash" "inline-more" "allocator-api2" ]; + "equivalent" = [ "dep:equivalent" ]; + "nightly" = [ "allocator-api2?/nightly" "bumpalo/allocator_api" ]; + "rayon" = [ "dep:rayon" ]; + "rkyv" = [ "dep:rkyv" ]; + "rustc-dep-of-std" = [ "nightly" "core" "compiler_builtins" "alloc" "rustc-internal-api" ]; + "serde" = [ "dep:serde" ]; + }; + resolvedDefaultFeatures = [ "raw" ]; + }; + "heck" = rec { + crateName = "heck"; + version = "0.4.1"; + edition = "2018"; + sha256 = "1a7mqsnycv5z4z5vnv1k34548jzmc0ajic7c1j8jsaspnhw5ql4m"; + authors = [ + "Without Boats " + ]; + features = { + "unicode" = [ "unicode-segmentation" ]; + "unicode-segmentation" = [ "dep:unicode-segmentation" ]; + }; + resolvedDefaultFeatures = [ "default" ]; + }; + "indexmap" = rec { + crateName = "indexmap"; + version = "2.1.0"; + edition = "2021"; + sha256 = "07rxrqmryr1xfnmhrjlz8ic6jw28v6h5cig3ws2c9d0wifhy2c6m"; + dependencies = [ + { + name = "equivalent"; + packageId = "equivalent"; + usesDefaultFeatures = false; + } + { + name = "hashbrown"; + packageId = "hashbrown"; + usesDefaultFeatures = false; + features = [ "raw" ]; + } + ]; + features = { + "arbitrary" = [ "dep:arbitrary" ]; + "default" = [ "std" ]; + "quickcheck" = [ "dep:quickcheck" ]; + "rayon" = [ "dep:rayon" ]; + "rustc-rayon" = [ "dep:rustc-rayon" ]; + "serde" = [ "dep:serde" ]; + }; + resolvedDefaultFeatures = [ "default" "std" ]; + }; + "libc" = rec { + crateName = "libc"; + version = "0.2.152"; + edition = "2015"; + sha256 = "1rsnma7hnw22w7jh9yqg43slddvfbnfzrvm3s7s4kinbj1jvzqqk"; + authors = [ + "The Rust Project Developers" + ]; + features = { + "default" = [ "std" ]; + "rustc-dep-of-std" = [ "align" "rustc-std-workspace-core" ]; + "rustc-std-workspace-core" = [ "dep:rustc-std-workspace-core" ]; + "use_std" = [ "std" ]; + }; + resolvedDefaultFeatures = [ "default" "std" ]; + }; + "memchr" = rec { + crateName = "memchr"; + version = "2.7.1"; + edition = "2021"; + sha256 = "0jf1kicqa4vs9lyzj4v4y1p90q0dh87hvhsdd5xvhnp527sw8gaj"; + authors = [ + "Andrew Gallant " + "bluss" + ]; + features = { + "compiler_builtins" = [ "dep:compiler_builtins" ]; + "core" = [ "dep:core" ]; + "default" = [ "std" ]; + "logging" = [ "dep:log" ]; + "rustc-dep-of-std" = [ "core" "compiler_builtins" ]; + "std" = [ "alloc" ]; + "use_std" = [ "std" ]; + }; + resolvedDefaultFeatures = [ "alloc" "default" "std" ]; + }; + "memoffset" = rec { + crateName = "memoffset"; + version = "0.9.0"; + edition = "2015"; + sha256 = "0v20ihhdzkfw1jx00a7zjpk2dcp5qjq6lz302nyqamd9c4f4nqss"; + authors = [ + "Gilad Naaman " + ]; + buildDependencies = [ + { + name = "autocfg"; + packageId = "autocfg"; + } + ]; + features = { + }; + resolvedDefaultFeatures = [ "default" ]; + }; + "once_cell" = rec { + crateName = "once_cell"; + version = "1.19.0"; + edition = "2021"; + sha256 = "14kvw7px5z96dk4dwdm1r9cqhhy2cyj1l5n5b29mynbb8yr15nrz"; + authors = [ + "Aleksey Kladov " + ]; + features = { + "alloc" = [ "race" ]; + "atomic-polyfill" = [ "critical-section" ]; + "critical-section" = [ "dep:critical-section" "portable-atomic" ]; + "default" = [ "std" ]; + "parking_lot" = [ "dep:parking_lot_core" ]; + "portable-atomic" = [ "dep:portable-atomic" ]; + "std" = [ "alloc" ]; + }; + resolvedDefaultFeatures = [ "alloc" "default" "race" "std" ]; + }; + "pango" = rec { + crateName = "pango"; + version = "0.18.3"; + edition = "2021"; + sha256 = "1r5ygq7036sv7w32kp8yxr6vgggd54iaavh3yckanmq4xg0px8kw"; + authors = [ + "The gtk-rs Project Developers" + ]; + dependencies = [ + { + name = "gio"; + packageId = "gio"; + } + { + name = "glib"; + packageId = "glib"; + } + { + name = "libc"; + packageId = "libc"; + } + { + name = "once_cell"; + packageId = "once_cell"; + } + { + name = "pango-sys"; + packageId = "pango-sys"; + rename = "ffi"; + } + ]; + features = { + "v1_42" = [ "ffi/v1_42" ]; + "v1_44" = [ "v1_42" "ffi/v1_44" ]; + "v1_46" = [ "v1_44" "ffi/v1_46" ]; + "v1_48" = [ "v1_46" "ffi/v1_48" ]; + "v1_50" = [ "v1_48" "ffi/v1_50" ]; + "v1_52" = [ "v1_50" "ffi/v1_52" ]; + }; + resolvedDefaultFeatures = [ "v1_42" "v1_44" "v1_46" "v1_48" "v1_50" ]; + }; + "pango-sys" = rec { + crateName = "pango-sys"; + version = "0.18.0"; + edition = "2021"; + sha256 = "1iaxalcaaj59cl9n10svh4g50v8jrc1a36kd7n9yahx8j7ikfrs3"; + libName = "pango_sys"; + authors = [ + "The gtk-rs Project Developers" + ]; + dependencies = [ + { + name = "glib-sys"; + packageId = "glib-sys"; + rename = "glib"; + } + { + name = "gobject-sys"; + packageId = "gobject-sys"; + rename = "gobject"; + } + { + name = "libc"; + packageId = "libc"; + } + ]; + buildDependencies = [ + { + name = "system-deps"; + packageId = "system-deps"; + } + ]; + features = { + "v1_44" = [ "v1_42" ]; + "v1_46" = [ "v1_44" ]; + "v1_48" = [ "v1_46" ]; + "v1_50" = [ "v1_48" ]; + "v1_52" = [ "v1_50" ]; + }; + resolvedDefaultFeatures = [ "v1_42" "v1_44" "v1_46" "v1_48" "v1_50" ]; + }; + "pin-project-lite" = rec { + crateName = "pin-project-lite"; + version = "0.2.13"; + edition = "2018"; + sha256 = "0n0bwr5qxlf0mhn2xkl36sy55118s9qmvx2yl5f3ixkb007lbywa"; + + }; + "pin-utils" = rec { + crateName = "pin-utils"; + version = "0.1.0"; + edition = "2018"; + sha256 = "117ir7vslsl2z1a7qzhws4pd01cg2d3338c47swjyvqv2n60v1wb"; + authors = [ + "Josef Brandl " + ]; + + }; + "pkg-config" = rec { + crateName = "pkg-config"; + version = "0.3.29"; + edition = "2015"; + sha256 = "1jy6158v1316khkpmq2sjj1vgbnbnw51wffx7p0k0l9h9vlys019"; + authors = [ + "Alex Crichton " + ]; + + }; + "proc-macro-crate 1.3.1" = rec { + crateName = "proc-macro-crate"; + version = "1.3.1"; + edition = "2021"; + sha256 = "069r1k56bvgk0f58dm5swlssfcp79im230affwk6d9ck20g04k3z"; + authors = [ + "Bastian Köcher " + ]; + dependencies = [ + { + name = "once_cell"; + packageId = "once_cell"; + } + { + name = "toml_edit"; + packageId = "toml_edit 0.19.15"; + } + ]; + + }; + "proc-macro-crate 2.0.1" = rec { + crateName = "proc-macro-crate"; + version = "2.0.1"; + edition = "2021"; + sha256 = "06jbv5w6s04dbjbwq0iv7zil12ildf3w8dvvb4pqvhig4gm5zp4p"; + authors = [ + "Bastian Köcher " + ]; + dependencies = [ + { + name = "toml_datetime"; + packageId = "toml_datetime"; + } + { + name = "toml_edit"; + packageId = "toml_edit 0.20.2"; + } + ]; + + }; + "proc-macro-error" = rec { + crateName = "proc-macro-error"; + version = "1.0.4"; + edition = "2018"; + sha256 = "1373bhxaf0pagd8zkyd03kkx6bchzf6g0dkwrwzsnal9z47lj9fs"; + authors = [ + "CreepySkeleton " + ]; + dependencies = [ + { + name = "proc-macro-error-attr"; + packageId = "proc-macro-error-attr"; + } + { + name = "proc-macro2"; + packageId = "proc-macro2"; + } + { + name = "quote"; + packageId = "quote"; + } + { + name = "syn"; + packageId = "syn 1.0.109"; + optional = true; + usesDefaultFeatures = false; + } + ]; + buildDependencies = [ + { + name = "version_check"; + packageId = "version_check"; + } + ]; + features = { + "default" = [ "syn-error" ]; + "syn" = [ "dep:syn" ]; + "syn-error" = [ "syn" ]; + }; + resolvedDefaultFeatures = [ "default" "syn" "syn-error" ]; + }; + "proc-macro-error-attr" = rec { + crateName = "proc-macro-error-attr"; + version = "1.0.4"; + edition = "2018"; + sha256 = "0sgq6m5jfmasmwwy8x4mjygx5l7kp8s4j60bv25ckv2j1qc41gm1"; + procMacro = true; + authors = [ + "CreepySkeleton " + ]; + dependencies = [ + { + name = "proc-macro2"; + packageId = "proc-macro2"; + } + { + name = "quote"; + packageId = "quote"; + } + ]; + buildDependencies = [ + { + name = "version_check"; + packageId = "version_check"; + } + ]; + + }; + "proc-macro2" = rec { + crateName = "proc-macro2"; + version = "1.0.78"; + edition = "2021"; + sha256 = "1bjak27pqdn4f4ih1c9nr3manzyavsgqmf76ygw9k76q8pb2lhp2"; + authors = [ + "David Tolnay " + "Alex Crichton " + ]; + dependencies = [ + { + name = "unicode-ident"; + packageId = "unicode-ident"; + } + ]; + features = { + "default" = [ "proc-macro" ]; + }; + resolvedDefaultFeatures = [ "default" "proc-macro" ]; + }; + "quote" = rec { + crateName = "quote"; + version = "1.0.35"; + edition = "2018"; + sha256 = "1vv8r2ncaz4pqdr78x7f138ka595sp2ncr1sa2plm4zxbsmwj7i9"; + authors = [ + "David Tolnay " + ]; + dependencies = [ + { + name = "proc-macro2"; + packageId = "proc-macro2"; + usesDefaultFeatures = false; + } + ]; + features = { + "default" = [ "proc-macro" ]; + "proc-macro" = [ "proc-macro2/proc-macro" ]; + }; + resolvedDefaultFeatures = [ "default" "proc-macro" ]; + }; + "resources_demo" = rec { + crateName = "resources_demo"; + version = "0.1.0"; + edition = "2021"; + crateBin = [ + { + name = "resources_demo"; + path = "src/main.rs"; + requiredFeatures = [ ]; + } + ]; + # We can't filter paths with references in Nix 2.4 + # See https://github.com/NixOS/nix/issues/5410 + src = if ((lib.versionOlder builtins.nixVersion "2.4pre20211007") || (lib.versionOlder "2.5" builtins.nixVersion )) + then lib.cleanSourceWith { filter = sourceFilter; src = ./.; } + else ./.; + dependencies = [ + { + name = "gtk4"; + packageId = "gtk4"; + rename = "gtk"; + features = [ "v4_10" ]; + } + ]; + buildDependencies = [ + { + name = "glib-build-tools"; + packageId = "glib-build-tools"; + } + ]; + + }; + "rustc_version" = rec { + crateName = "rustc_version"; + version = "0.4.0"; + edition = "2018"; + sha256 = "0rpk9rcdk405xhbmgclsh4pai0svn49x35aggl4nhbkd4a2zb85z"; + authors = [ + "Dirkjan Ochtman " + "Marvin Löbel " + ]; + dependencies = [ + { + name = "semver"; + packageId = "semver"; + } + ]; + + }; + "semver" = rec { + crateName = "semver"; + version = "1.0.21"; + edition = "2018"; + sha256 = "1c49snqlfcx93xym1cgwx8zcspmyyxm37xa2fyfgjx1vhalxfzmr"; + authors = [ + "David Tolnay " + ]; + features = { + "default" = [ "std" ]; + "serde" = [ "dep:serde" ]; + }; + resolvedDefaultFeatures = [ "default" "std" ]; + }; + "serde" = rec { + crateName = "serde"; + version = "1.0.195"; + edition = "2018"; + sha256 = "00kbc86kgaihpza0zdglcd2qq5468yg0dvvdmkli2y660bs1s9k3"; + authors = [ + "Erick Tryzelaar " + "David Tolnay " + ]; + dependencies = [ + { + name = "serde_derive"; + packageId = "serde_derive"; + optional = true; + } + { + name = "serde_derive"; + packageId = "serde_derive"; + target = { target, features }: false; + } + ]; + devDependencies = [ + { + name = "serde_derive"; + packageId = "serde_derive"; + } + ]; + features = { + "default" = [ "std" ]; + "derive" = [ "serde_derive" ]; + "serde_derive" = [ "dep:serde_derive" ]; + }; + resolvedDefaultFeatures = [ "default" "std" ]; + }; + "serde_derive" = rec { + crateName = "serde_derive"; + version = "1.0.195"; + edition = "2015"; + sha256 = "0b7ag1qm9q3fgwlmyk2ap5gjbqa9vyf2wfmj4xish6yq0f38zzj6"; + procMacro = true; + authors = [ + "Erick Tryzelaar " + "David Tolnay " + ]; + dependencies = [ + { + name = "proc-macro2"; + packageId = "proc-macro2"; + } + { + name = "quote"; + packageId = "quote"; + } + { + name = "syn"; + packageId = "syn 2.0.48"; + } + ]; + features = { + }; + resolvedDefaultFeatures = [ "default" ]; + }; + "serde_spanned" = rec { + crateName = "serde_spanned"; + version = "0.6.5"; + edition = "2021"; + sha256 = "1hgh6s3jjwyzhfk3xwb6pnnr1misq9nflwq0f026jafi37s24dpb"; + dependencies = [ + { + name = "serde"; + packageId = "serde"; + optional = true; + } + ]; + devDependencies = [ + { + name = "serde"; + packageId = "serde"; + } + ]; + features = { + "serde" = [ "dep:serde" ]; + }; + resolvedDefaultFeatures = [ "serde" ]; + }; + "slab" = rec { + crateName = "slab"; + version = "0.4.9"; + edition = "2018"; + sha256 = "0rxvsgir0qw5lkycrqgb1cxsvxzjv9bmx73bk5y42svnzfba94lg"; + authors = [ + "Carl Lerche " + ]; + buildDependencies = [ + { + name = "autocfg"; + packageId = "autocfg"; + } + ]; + features = { + "default" = [ "std" ]; + "serde" = [ "dep:serde" ]; + }; + resolvedDefaultFeatures = [ "default" "std" ]; + }; + "smallvec" = rec { + crateName = "smallvec"; + version = "1.13.1"; + edition = "2018"; + sha256 = "1mzk9j117pn3k1gabys0b7nz8cdjsx5xc6q7fwnm8r0an62d7v76"; + authors = [ + "The Servo Project Developers" + ]; + features = { + "arbitrary" = [ "dep:arbitrary" ]; + "const_new" = [ "const_generics" ]; + "drain_keep_rest" = [ "drain_filter" ]; + "serde" = [ "dep:serde" ]; + }; + resolvedDefaultFeatures = [ "const_generics" "const_new" "union" ]; + }; + "syn 1.0.109" = rec { + crateName = "syn"; + version = "1.0.109"; + edition = "2018"; + sha256 = "0ds2if4600bd59wsv7jjgfkayfzy3hnazs394kz6zdkmna8l3dkj"; + authors = [ + "David Tolnay " + ]; + dependencies = [ + { + name = "proc-macro2"; + packageId = "proc-macro2"; + usesDefaultFeatures = false; + } + { + name = "quote"; + packageId = "quote"; + optional = true; + usesDefaultFeatures = false; + } + { + name = "unicode-ident"; + packageId = "unicode-ident"; + } + ]; + features = { + "default" = [ "derive" "parsing" "printing" "clone-impls" "proc-macro" ]; + "printing" = [ "quote" ]; + "proc-macro" = [ "proc-macro2/proc-macro" "quote/proc-macro" ]; + "quote" = [ "dep:quote" ]; + "test" = [ "syn-test-suite/all-features" ]; + }; + resolvedDefaultFeatures = [ "clone-impls" "default" "derive" "full" "parsing" "printing" "proc-macro" "quote" ]; + }; + "syn 2.0.48" = rec { + crateName = "syn"; + version = "2.0.48"; + edition = "2021"; + sha256 = "0gqgfygmrxmp8q32lia9p294kdd501ybn6kn2h4gqza0irik2d8g"; + authors = [ + "David Tolnay " + ]; + dependencies = [ + { + name = "proc-macro2"; + packageId = "proc-macro2"; + usesDefaultFeatures = false; + } + { + name = "quote"; + packageId = "quote"; + optional = true; + usesDefaultFeatures = false; + } + { + name = "unicode-ident"; + packageId = "unicode-ident"; + } + ]; + features = { + "default" = [ "derive" "parsing" "printing" "clone-impls" "proc-macro" ]; + "printing" = [ "quote" ]; + "proc-macro" = [ "proc-macro2/proc-macro" "quote/proc-macro" ]; + "quote" = [ "dep:quote" ]; + "test" = [ "syn-test-suite/all-features" ]; + }; + resolvedDefaultFeatures = [ "clone-impls" "default" "derive" "full" "parsing" "printing" "proc-macro" "quote" ]; + }; + "system-deps" = rec { + crateName = "system-deps"; + version = "6.2.0"; + edition = "2018"; + sha256 = "0c836abhh3k8yn5ymg8wx383ay7n731gkrbbp3gma352yq7mhb9a"; + authors = [ + "Guillaume Desmottes " + "Josh Triplett " + ]; + dependencies = [ + { + name = "cfg-expr"; + packageId = "cfg-expr"; + features = [ "targets" ]; + } + { + name = "heck"; + packageId = "heck"; + } + { + name = "pkg-config"; + packageId = "pkg-config"; + } + { + name = "toml"; + packageId = "toml"; + usesDefaultFeatures = false; + features = [ "parse" ]; + } + { + name = "version-compare"; + packageId = "version-compare"; + } + ]; + + }; + "target-lexicon" = rec { + crateName = "target-lexicon"; + version = "0.12.13"; + edition = "2018"; + sha256 = "1bmgpdq766zn61f16py0x9139fv314d054xkrkj9iw3q5vd8nxb9"; + authors = [ + "Dan Gohman " + ]; + features = { + "serde" = [ "dep:serde" ]; + "serde_support" = [ "serde" "std" ]; + }; + resolvedDefaultFeatures = [ "default" ]; + }; + "thiserror" = rec { + crateName = "thiserror"; + version = "1.0.56"; + edition = "2021"; + sha256 = "1b9hnzngjan4d89zjs16i01bcpcnvdwklyh73lj16xk28p37hhym"; + authors = [ + "David Tolnay " + ]; + dependencies = [ + { + name = "thiserror-impl"; + packageId = "thiserror-impl"; + } + ]; + + }; + "thiserror-impl" = rec { + crateName = "thiserror-impl"; + version = "1.0.56"; + edition = "2021"; + sha256 = "0w9ldp8fa574ilz4dn7y7scpcq66vdjy59qal8qdpwsh7faal3zs"; + procMacro = true; + authors = [ + "David Tolnay " + ]; + dependencies = [ + { + name = "proc-macro2"; + packageId = "proc-macro2"; + } + { + name = "quote"; + packageId = "quote"; + } + { + name = "syn"; + packageId = "syn 2.0.48"; + } + ]; + + }; + "toml" = rec { + crateName = "toml"; + version = "0.8.2"; + edition = "2021"; + sha256 = "0g9ysjaqvm2mv8q85xpqfn7hi710hj24sd56k49wyddvvyq8lp8q"; + authors = [ + "Alex Crichton " + ]; + dependencies = [ + { + name = "serde"; + packageId = "serde"; + } + { + name = "serde_spanned"; + packageId = "serde_spanned"; + features = [ "serde" ]; + } + { + name = "toml_datetime"; + packageId = "toml_datetime"; + features = [ "serde" ]; + } + { + name = "toml_edit"; + packageId = "toml_edit 0.20.2"; + optional = true; + features = [ "serde" ]; + } + ]; + devDependencies = [ + { + name = "serde"; + packageId = "serde"; + features = [ "derive" ]; + } + ]; + features = { + "default" = [ "parse" "display" ]; + "display" = [ "dep:toml_edit" ]; + "indexmap" = [ "dep:indexmap" ]; + "parse" = [ "dep:toml_edit" ]; + "preserve_order" = [ "indexmap" ]; + }; + resolvedDefaultFeatures = [ "parse" ]; + }; + "toml_datetime" = rec { + crateName = "toml_datetime"; + version = "0.6.3"; + edition = "2021"; + sha256 = "0jsy7v8bdvmzsci6imj8fzgd255fmy5fzp6zsri14yrry7i77nkw"; + authors = [ + "Alex Crichton " + ]; + dependencies = [ + { + name = "serde"; + packageId = "serde"; + optional = true; + } + ]; + features = { + "serde" = [ "dep:serde" ]; + }; + resolvedDefaultFeatures = [ "serde" ]; + }; + "toml_edit 0.19.15" = rec { + crateName = "toml_edit"; + version = "0.19.15"; + edition = "2021"; + sha256 = "08bl7rp5g6jwmfpad9s8jpw8wjrciadpnbaswgywpr9hv9qbfnqv"; + authors = [ + "Andronik Ordian " + "Ed Page " + ]; + dependencies = [ + { + name = "indexmap"; + packageId = "indexmap"; + features = [ "std" ]; + } + { + name = "toml_datetime"; + packageId = "toml_datetime"; + } + { + name = "winnow"; + packageId = "winnow"; + } + ]; + features = { + "perf" = [ "dep:kstring" ]; + "serde" = [ "dep:serde" "toml_datetime/serde" "dep:serde_spanned" ]; + }; + resolvedDefaultFeatures = [ "default" ]; + }; + "toml_edit 0.20.2" = rec { + crateName = "toml_edit"; + version = "0.20.2"; + edition = "2021"; + sha256 = "0f7k5svmxw98fhi28jpcyv7ldr2s3c867pjbji65bdxjpd44svir"; + authors = [ + "Andronik Ordian " + "Ed Page " + ]; + dependencies = [ + { + name = "indexmap"; + packageId = "indexmap"; + features = [ "std" ]; + } + { + name = "serde"; + packageId = "serde"; + optional = true; + } + { + name = "serde_spanned"; + packageId = "serde_spanned"; + optional = true; + features = [ "serde" ]; + } + { + name = "toml_datetime"; + packageId = "toml_datetime"; + } + { + name = "winnow"; + packageId = "winnow"; + } + ]; + features = { + "perf" = [ "dep:kstring" ]; + "serde" = [ "dep:serde" "toml_datetime/serde" "dep:serde_spanned" ]; + }; + resolvedDefaultFeatures = [ "default" "serde" ]; + }; + "unicode-ident" = rec { + crateName = "unicode-ident"; + version = "1.0.12"; + edition = "2018"; + sha256 = "0jzf1znfpb2gx8nr8mvmyqs1crnv79l57nxnbiszc7xf7ynbjm1k"; + authors = [ + "David Tolnay " + ]; + + }; + "version-compare" = rec { + crateName = "version-compare"; + version = "0.1.1"; + edition = "2018"; + sha256 = "0acg4pmjdbmclg0m7yhijn979mdy66z3k8qrcnvn634f1gy456jp"; + authors = [ + "Tim Visee <3a4fb3964f@sinenomine.email>" + ]; + + }; + "version_check" = rec { + crateName = "version_check"; + version = "0.9.4"; + edition = "2015"; + sha256 = "0gs8grwdlgh0xq660d7wr80x14vxbizmd8dbp29p2pdncx8lp1s9"; + authors = [ + "Sergio Benitez " + ]; + + }; + "winapi" = rec { + crateName = "winapi"; + version = "0.3.9"; + edition = "2015"; + sha256 = "06gl025x418lchw1wxj64ycr7gha83m44cjr5sarhynd9xkrm0sw"; + authors = [ + "Peter Atashian " + ]; + dependencies = [ + { + name = "winapi-i686-pc-windows-gnu"; + packageId = "winapi-i686-pc-windows-gnu"; + target = { target, features }: (pkgs.rust.lib.toRustTarget stdenv.hostPlatform == "i686-pc-windows-gnu"); + } + { + name = "winapi-x86_64-pc-windows-gnu"; + packageId = "winapi-x86_64-pc-windows-gnu"; + target = { target, features }: (pkgs.rust.lib.toRustTarget stdenv.hostPlatform == "x86_64-pc-windows-gnu"); + } + ]; + features = { + "debug" = [ "impl-debug" ]; + }; + resolvedDefaultFeatures = [ "winsock2" "ws2def" ]; + }; + "winapi-i686-pc-windows-gnu" = rec { + crateName = "winapi-i686-pc-windows-gnu"; + version = "0.4.0"; + edition = "2015"; + sha256 = "1dmpa6mvcvzz16zg6d5vrfy4bxgg541wxrcip7cnshi06v38ffxc"; + authors = [ + "Peter Atashian " + ]; + + }; + "winapi-x86_64-pc-windows-gnu" = rec { + crateName = "winapi-x86_64-pc-windows-gnu"; + version = "0.4.0"; + edition = "2015"; + sha256 = "0gqq64czqb64kskjryj8isp62m2sgvx25yyj3kpc2myh85w24bki"; + authors = [ + "Peter Atashian " + ]; + + }; + "winnow" = rec { + crateName = "winnow"; + version = "0.5.34"; + edition = "2021"; + sha256 = "05lwgfbd2i3016hh4yff7m9qy4mf75x7ki4wsv5xq65kb6v4gkxp"; + dependencies = [ + { + name = "memchr"; + packageId = "memchr"; + optional = true; + usesDefaultFeatures = false; + } + ]; + features = { + "debug" = [ "dep:anstream" "dep:anstyle" "dep:is-terminal" "dep:terminal_size" ]; + "default" = [ "std" ]; + "simd" = [ "dep:memchr" ]; + "std" = [ "alloc" "memchr?/std" ]; + "unstable-doc" = [ "alloc" "std" "simd" ]; + }; + resolvedDefaultFeatures = [ "alloc" "default" "std" ]; + }; + }; + + # +# crate2nix/default.nix (excerpt start) +# + + /* Target (platform) data for conditional dependencies. + This corresponds roughly to what buildRustCrate is setting. + */ + makeDefaultTarget = platform: { + unix = platform.isUnix; + windows = platform.isWindows; + fuchsia = true; + test = false; + + /* We are choosing an arbitrary rust version to grab `lib` from, + which is unfortunate, but `lib` has been version-agnostic the + whole time so this is good enough for now. + */ + os = pkgs.rust.lib.toTargetOs platform; + arch = pkgs.rust.lib.toTargetArch platform; + family = pkgs.rust.lib.toTargetFamily platform; + env = "gnu"; + endian = + if platform.parsed.cpu.significantByte.name == "littleEndian" + then "little" else "big"; + pointer_width = toString platform.parsed.cpu.bits; + vendor = platform.parsed.vendor.name; + debug_assertions = false; + }; + + /* Filters common temp files and build files. */ + # TODO(pkolloch): Substitute with gitignore filter + sourceFilter = name: type: + let + baseName = builtins.baseNameOf (builtins.toString name); + in + ! ( + # Filter out git + baseName == ".gitignore" + || (type == "directory" && baseName == ".git") + + # Filter out build results + || ( + type == "directory" && ( + baseName == "target" + || baseName == "_site" + || baseName == ".sass-cache" + || baseName == ".jekyll-metadata" + || baseName == "build-artifacts" + ) + ) + + # Filter out nix-build result symlinks + || ( + type == "symlink" && lib.hasPrefix "result" baseName + ) + + # Filter out IDE config + || ( + type == "directory" && ( + baseName == ".idea" || baseName == ".vscode" + ) + ) || lib.hasSuffix ".iml" baseName + + # Filter out nix build files + || baseName == "Cargo.nix" + + # Filter out editor backup / swap files. + || lib.hasSuffix "~" baseName + || builtins.match "^\\.sw[a-z]$$" baseName != null + || builtins.match "^\\..*\\.sw[a-z]$$" baseName != null + || lib.hasSuffix ".tmp" baseName + || lib.hasSuffix ".bak" baseName + || baseName == "tests.nix" + ); + + /* Returns a crate which depends on successful test execution + of crate given as the second argument. + + testCrateFlags: list of flags to pass to the test exectuable + testInputs: list of packages that should be available during test execution + */ + crateWithTest = { crate, testCrate, testCrateFlags, testInputs, testPreRun, testPostRun }: + assert builtins.typeOf testCrateFlags == "list"; + assert builtins.typeOf testInputs == "list"; + assert builtins.typeOf testPreRun == "string"; + assert builtins.typeOf testPostRun == "string"; + let + # override the `crate` so that it will build and execute tests instead of + # building the actual lib and bin targets We just have to pass `--test` + # to rustc and it will do the right thing. We execute the tests and copy + # their log and the test executables to $out for later inspection. + test = + let + drv = testCrate.override + ( + _: { + buildTests = true; + } + ); + # If the user hasn't set any pre/post commands, we don't want to + # insert empty lines. This means that any existing users of crate2nix + # don't get a spurious rebuild unless they set these explicitly. + testCommand = pkgs.lib.concatStringsSep "\n" + (pkgs.lib.filter (s: s != "") [ + testPreRun + "$f $testCrateFlags 2>&1 | tee -a $out" + testPostRun + ]); + in + pkgs.runCommand "run-tests-${testCrate.name}" + { + inherit testCrateFlags; + buildInputs = testInputs; + } '' + set -e + + export RUST_BACKTRACE=1 + + # recreate a file hierarchy as when running tests with cargo + + # the source for test data + ${pkgs.xorg.lndir}/bin/lndir ${crate.src} + + # build outputs + testRoot=target/debug + mkdir -p $testRoot + + # executables of the crate + # we copy to prevent std::env::current_exe() to resolve to a store location + for i in ${crate}/bin/*; do + cp "$i" "$testRoot" + done + chmod +w -R . + + # test harness executables are suffixed with a hash, like cargo does + # this allows to prevent name collision with the main + # executables of the crate + hash=$(basename $out) + for file in ${drv}/tests/*; do + f=$testRoot/$(basename $file)-$hash + cp $file $f + ${testCommand} + done + ''; + in + pkgs.runCommand "${crate.name}-linked" + { + inherit (crate) outputs crateName; + passthru = (crate.passthru or { }) // { + inherit test; + }; + } '' + echo tested by ${test} + ${lib.concatMapStringsSep "\n" (output: "ln -s ${crate.${output}} ${"$"}${output}") crate.outputs} + ''; + + /* A restricted overridable version of builtRustCratesWithFeatures. */ + buildRustCrateWithFeatures = + { packageId + , features ? rootFeatures + , crateOverrides ? defaultCrateOverrides + , buildRustCrateForPkgsFunc ? null + , runTests ? false + , testCrateFlags ? [ ] + , testInputs ? [ ] + # Any command to run immediatelly before a test is executed. + , testPreRun ? "" + # Any command run immediatelly after a test is executed. + , testPostRun ? "" + }: + lib.makeOverridable + ( + { features + , crateOverrides + , runTests + , testCrateFlags + , testInputs + , testPreRun + , testPostRun + }: + let + buildRustCrateForPkgsFuncOverriden = + if buildRustCrateForPkgsFunc != null + then buildRustCrateForPkgsFunc + else + ( + if crateOverrides == pkgs.defaultCrateOverrides + then buildRustCrateForPkgs + else + pkgs: (buildRustCrateForPkgs pkgs).override { + defaultCrateOverrides = crateOverrides; + } + ); + builtRustCrates = builtRustCratesWithFeatures { + inherit packageId features; + buildRustCrateForPkgsFunc = buildRustCrateForPkgsFuncOverriden; + runTests = false; + }; + builtTestRustCrates = builtRustCratesWithFeatures { + inherit packageId features; + buildRustCrateForPkgsFunc = buildRustCrateForPkgsFuncOverriden; + runTests = true; + }; + drv = builtRustCrates.crates.${packageId}; + testDrv = builtTestRustCrates.crates.${packageId}; + derivation = + if runTests then + crateWithTest + { + crate = drv; + testCrate = testDrv; + inherit testCrateFlags testInputs testPreRun testPostRun; + } + else drv; + in + derivation + ) + { inherit features crateOverrides runTests testCrateFlags testInputs testPreRun testPostRun; }; + + /* Returns an attr set with packageId mapped to the result of buildRustCrateForPkgsFunc + for the corresponding crate. + */ + builtRustCratesWithFeatures = + { packageId + , features + , crateConfigs ? crates + , buildRustCrateForPkgsFunc + , runTests + , makeTarget ? makeDefaultTarget + } @ args: + assert (builtins.isAttrs crateConfigs); + assert (builtins.isString packageId); + assert (builtins.isList features); + assert (builtins.isAttrs (makeTarget stdenv.hostPlatform)); + assert (builtins.isBool runTests); + let + rootPackageId = packageId; + mergedFeatures = mergePackageFeatures + ( + args // { + inherit rootPackageId; + target = makeTarget stdenv.hostPlatform // { test = runTests; }; + } + ); + # Memoize built packages so that reappearing packages are only built once. + builtByPackageIdByPkgs = mkBuiltByPackageIdByPkgs pkgs; + mkBuiltByPackageIdByPkgs = pkgs: + let + self = { + crates = lib.mapAttrs (packageId: value: buildByPackageIdForPkgsImpl self pkgs packageId) crateConfigs; + target = makeTarget pkgs.stdenv.hostPlatform; + build = mkBuiltByPackageIdByPkgs pkgs.buildPackages; + }; + in + self; + buildByPackageIdForPkgsImpl = self: pkgs: packageId: + let + features = mergedFeatures."${packageId}" or [ ]; + crateConfig' = crateConfigs."${packageId}"; + crateConfig = + builtins.removeAttrs crateConfig' [ "resolvedDefaultFeatures" "devDependencies" ]; + devDependencies = + lib.optionals + (runTests && packageId == rootPackageId) + (crateConfig'.devDependencies or [ ]); + dependencies = + dependencyDerivations { + inherit features; + inherit (self) target; + buildByPackageId = depPackageId: + # proc_macro crates must be compiled for the build architecture + if crateConfigs.${depPackageId}.procMacro or false + then self.build.crates.${depPackageId} + else self.crates.${depPackageId}; + dependencies = + (crateConfig.dependencies or [ ]) + ++ devDependencies; + }; + buildDependencies = + dependencyDerivations { + inherit features; + inherit (self.build) target; + buildByPackageId = depPackageId: + self.build.crates.${depPackageId}; + dependencies = crateConfig.buildDependencies or [ ]; + }; + dependenciesWithRenames = + let + buildDeps = filterEnabledDependencies { + inherit features; + inherit (self) target; + dependencies = crateConfig.dependencies or [ ] ++ devDependencies; + }; + hostDeps = filterEnabledDependencies { + inherit features; + inherit (self.build) target; + dependencies = crateConfig.buildDependencies or [ ]; + }; + in + lib.filter (d: d ? "rename") (hostDeps ++ buildDeps); + # Crate renames have the form: + # + # { + # crate_name = [ + # { version = "1.2.3"; rename = "crate_name01"; } + # ]; + # # ... + # } + crateRenames = + let + grouped = + lib.groupBy + (dependency: dependency.name) + dependenciesWithRenames; + versionAndRename = dep: + let + package = crateConfigs."${dep.packageId}"; + in + { inherit (dep) rename; version = package.version; }; + in + lib.mapAttrs (name: choices: builtins.map versionAndRename choices) grouped; + in + buildRustCrateForPkgsFunc pkgs + ( + crateConfig // { + # https://github.com/NixOS/nixpkgs/issues/218712 + dontStrip = stdenv.hostPlatform.isDarwin; + src = crateConfig.src or ( + pkgs.fetchurl rec { + name = "${crateConfig.crateName}-${crateConfig.version}.tar.gz"; + # https://www.pietroalbini.org/blog/downloading-crates-io/ + # Not rate-limited, CDN URL. + url = "https://static.crates.io/crates/${crateConfig.crateName}/${crateConfig.crateName}-${crateConfig.version}.crate"; + sha256 = + assert (lib.assertMsg (crateConfig ? sha256) "Missing sha256 for ${name}"); + crateConfig.sha256; + } + ); + extraRustcOpts = lib.lists.optional (targetFeatures != [ ]) "-C target-feature=${lib.concatMapStringsSep "," (x: "+${x}") targetFeatures}"; + inherit features dependencies buildDependencies crateRenames release; + } + ); + in + builtByPackageIdByPkgs; + + /* Returns the actual derivations for the given dependencies. */ + dependencyDerivations = + { buildByPackageId + , features + , dependencies + , target + }: + assert (builtins.isList features); + assert (builtins.isList dependencies); + assert (builtins.isAttrs target); + let + enabledDependencies = filterEnabledDependencies { + inherit dependencies features target; + }; + depDerivation = dependency: buildByPackageId dependency.packageId; + in + map depDerivation enabledDependencies; + + /* Returns a sanitized version of val with all values substituted that cannot + be serialized as JSON. + */ + sanitizeForJson = val: + if builtins.isAttrs val + then lib.mapAttrs (n: v: sanitizeForJson v) val + else if builtins.isList val + then builtins.map sanitizeForJson val + else if builtins.isFunction val + then "function" + else val; + + /* Returns various tools to debug a crate. */ + debugCrate = { packageId, target ? makeDefaultTarget stdenv.hostPlatform }: + assert (builtins.isString packageId); + let + debug = rec { + # The built tree as passed to buildRustCrate. + buildTree = buildRustCrateWithFeatures { + buildRustCrateForPkgsFunc = _: lib.id; + inherit packageId; + }; + sanitizedBuildTree = sanitizeForJson buildTree; + dependencyTree = sanitizeForJson + ( + buildRustCrateWithFeatures { + buildRustCrateForPkgsFunc = _: crate: { + "01_crateName" = crate.crateName or false; + "02_features" = crate.features or [ ]; + "03_dependencies" = crate.dependencies or [ ]; + }; + inherit packageId; + } + ); + mergedPackageFeatures = mergePackageFeatures { + features = rootFeatures; + inherit packageId target; + }; + diffedDefaultPackageFeatures = diffDefaultPackageFeatures { + inherit packageId target; + }; + }; + in + { internal = debug; }; + + /* Returns differences between cargo default features and crate2nix default + features. + + This is useful for verifying the feature resolution in crate2nix. + */ + diffDefaultPackageFeatures = + { crateConfigs ? crates + , packageId + , target + }: + assert (builtins.isAttrs crateConfigs); + let + prefixValues = prefix: lib.mapAttrs (n: v: { "${prefix}" = v; }); + mergedFeatures = + prefixValues + "crate2nix" + (mergePackageFeatures { inherit crateConfigs packageId target; features = [ "default" ]; }); + configs = prefixValues "cargo" crateConfigs; + combined = lib.foldAttrs (a: b: a // b) { } [ mergedFeatures configs ]; + onlyInCargo = + builtins.attrNames + (lib.filterAttrs (n: v: !(v ? "crate2nix") && (v ? "cargo")) combined); + onlyInCrate2Nix = + builtins.attrNames + (lib.filterAttrs (n: v: (v ? "crate2nix") && !(v ? "cargo")) combined); + differentFeatures = lib.filterAttrs + ( + n: v: + (v ? "crate2nix") + && (v ? "cargo") + && (v.crate2nix.features or [ ]) != (v."cargo".resolved_default_features or [ ]) + ) + combined; + in + builtins.toJSON { + inherit onlyInCargo onlyInCrate2Nix differentFeatures; + }; + + /* Returns an attrset mapping packageId to the list of enabled features. + + If multiple paths to a dependency enable different features, the + corresponding feature sets are merged. Features in rust are additive. + */ + mergePackageFeatures = + { crateConfigs ? crates + , packageId + , rootPackageId ? packageId + , features ? rootFeatures + , dependencyPath ? [ crates.${packageId}.crateName ] + , featuresByPackageId ? { } + , target + # Adds devDependencies to the crate with rootPackageId. + , runTests ? false + , ... + } @ args: + assert (builtins.isAttrs crateConfigs); + assert (builtins.isString packageId); + assert (builtins.isString rootPackageId); + assert (builtins.isList features); + assert (builtins.isList dependencyPath); + assert (builtins.isAttrs featuresByPackageId); + assert (builtins.isAttrs target); + assert (builtins.isBool runTests); + let + crateConfig = crateConfigs."${packageId}" or (builtins.throw "Package not found: ${packageId}"); + expandedFeatures = expandFeatures (crateConfig.features or { }) features; + enabledFeatures = enableFeatures (crateConfig.dependencies or [ ]) expandedFeatures; + depWithResolvedFeatures = dependency: + let + packageId = dependency.packageId; + features = dependencyFeatures enabledFeatures dependency; + in + { inherit packageId features; }; + resolveDependencies = cache: path: dependencies: + assert (builtins.isAttrs cache); + assert (builtins.isList dependencies); + let + enabledDependencies = filterEnabledDependencies { + inherit dependencies target; + features = enabledFeatures; + }; + directDependencies = map depWithResolvedFeatures enabledDependencies; + foldOverCache = op: lib.foldl op cache directDependencies; + in + foldOverCache + ( + cache: { packageId, features }: + let + cacheFeatures = cache.${packageId} or [ ]; + combinedFeatures = sortedUnique (cacheFeatures ++ features); + in + if cache ? ${packageId} && cache.${packageId} == combinedFeatures + then cache + else + mergePackageFeatures { + features = combinedFeatures; + featuresByPackageId = cache; + inherit crateConfigs packageId target runTests rootPackageId; + } + ); + cacheWithSelf = + let + cacheFeatures = featuresByPackageId.${packageId} or [ ]; + combinedFeatures = sortedUnique (cacheFeatures ++ enabledFeatures); + in + featuresByPackageId // { + "${packageId}" = combinedFeatures; + }; + cacheWithDependencies = + resolveDependencies cacheWithSelf "dep" + ( + crateConfig.dependencies or [ ] + ++ lib.optionals + (runTests && packageId == rootPackageId) + (crateConfig.devDependencies or [ ]) + ); + cacheWithAll = + resolveDependencies + cacheWithDependencies "build" + (crateConfig.buildDependencies or [ ]); + in + cacheWithAll; + + /* Returns the enabled dependencies given the enabled features. */ + filterEnabledDependencies = { dependencies, features, target }: + assert (builtins.isList dependencies); + assert (builtins.isList features); + assert (builtins.isAttrs target); + + lib.filter + ( + dep: + let + targetFunc = dep.target or (features: true); + in + targetFunc { inherit features target; } + && ( + !(dep.optional or false) + || builtins.any (doesFeatureEnableDependency dep) features + ) + ) + dependencies; + + /* Returns whether the given feature should enable the given dependency. */ + doesFeatureEnableDependency = dependency: feature: + let + name = dependency.rename or dependency.name; + prefix = "${name}/"; + len = builtins.stringLength prefix; + startsWithPrefix = builtins.substring 0 len feature == prefix; + in + feature == name || feature == "dep:" + name || startsWithPrefix; + + /* Returns the expanded features for the given inputFeatures by applying the + rules in featureMap. + + featureMap is an attribute set which maps feature names to lists of further + feature names to enable in case this feature is selected. + */ + expandFeatures = featureMap: inputFeatures: + assert (builtins.isAttrs featureMap); + assert (builtins.isList inputFeatures); + let + expandFeaturesNoCycle = oldSeen: inputFeatures: + if inputFeatures != [ ] + then + let + # The feature we're currently expanding. + feature = builtins.head inputFeatures; + # All the features we've seen/expanded so far, including the one + # we're currently processing. + seen = oldSeen // { ${feature} = 1; }; + # Expand the feature but be careful to not re-introduce a feature + # that we've already seen: this can easily cause a cycle, see issue + # #209. + enables = builtins.filter (f: !(seen ? "${f}")) (featureMap."${feature}" or [ ]); + in + [ feature ] ++ (expandFeaturesNoCycle seen (builtins.tail inputFeatures ++ enables)) + # No more features left, nothing to expand to. + else [ ]; + outFeatures = expandFeaturesNoCycle { } inputFeatures; + in + sortedUnique outFeatures; + + /* This function adds optional dependencies as features if they are enabled + indirectly by dependency features. This function mimics Cargo's behavior + described in a note at: + https://doc.rust-lang.org/nightly/cargo/reference/features.html#dependency-features + */ + enableFeatures = dependencies: features: + assert (builtins.isList features); + assert (builtins.isList dependencies); + let + additionalFeatures = lib.concatMap + ( + dependency: + assert (builtins.isAttrs dependency); + let + enabled = builtins.any (doesFeatureEnableDependency dependency) features; + in + if (dependency.optional or false) && enabled + then [ (dependency.rename or dependency.name) ] + else [ ] + ) + dependencies; + in + sortedUnique (features ++ additionalFeatures); + + /* + Returns the actual features for the given dependency. + + features: The features of the crate that refers this dependency. + */ + dependencyFeatures = features: dependency: + assert (builtins.isList features); + assert (builtins.isAttrs dependency); + let + defaultOrNil = + if dependency.usesDefaultFeatures or true + then [ "default" ] + else [ ]; + explicitFeatures = dependency.features or [ ]; + additionalDependencyFeatures = + let + name = dependency.rename or dependency.name; + stripPrefixMatch = prefix: s: + if lib.hasPrefix prefix s + then lib.removePrefix prefix s + else null; + extractFeature = feature: lib.findFirst + (f: f != null) + null + (map (prefix: stripPrefixMatch prefix feature) [ + (name + "/") + (name + "?/") + ]); + dependencyFeatures = lib.filter (f: f != null) (map extractFeature features); + in + dependencyFeatures; + in + defaultOrNil ++ explicitFeatures ++ additionalDependencyFeatures; + + /* Sorts and removes duplicates from a list of strings. */ + sortedUnique = features: + assert (builtins.isList features); + assert (builtins.all builtins.isString features); + let + outFeaturesSet = lib.foldl (set: feature: set // { "${feature}" = 1; }) { } features; + outFeaturesUnique = builtins.attrNames outFeaturesSet; + in + builtins.sort (a: b: a < b) outFeaturesUnique; + + deprecationWarning = message: value: + if strictDeprecation + then builtins.throw "strictDeprecation enabled, aborting: ${message}" + else builtins.trace message value; + + # + # crate2nix/default.nix (excerpt end) + # + }; +} + diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..888e813 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,13 @@ +[package] +name = "resources_demo" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +gtk = { version = "0.7", package = "gtk4", features = [ "v4_10" ] } + +[build-dependencies] +glib-build-tools = "0.18" + diff --git a/build.rs b/build.rs new file mode 100644 index 0000000..748d9a7 --- /dev/null +++ b/build.rs @@ -0,0 +1,7 @@ +fn main() { + glib_build_tools::compile_resources::( + &[], + "gresources.xml", + "com.luminescent-dreams.resources-demo", + ); +} diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..90a7b40 --- /dev/null +++ b/flake.lock @@ -0,0 +1,110 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1681202837, + "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "cfacdce06f30d2b68473a46042957675eebb3401", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1706098335, + "narHash": "sha256-r3dWjT8P9/Ah5m5ul4WqIWD8muj5F+/gbCdjiNVBKmU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "a77ab169a83a4175169d78684ddd2e54486ac651", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-23.11", + "type": "indirect" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1681303793, + "narHash": "sha256-JEdQHsYuCfRL2PICHlOiH/2ue3DwoxUX7DJ6zZxZXFk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "fe2ecaf706a5907b5e54d979fbde4924d84b65fc", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-unstable", + "type": "indirect" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs", + "typeshare": "typeshare", + "unstable": "unstable" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "typeshare": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1698205128, + "narHash": "sha256-jP+81TkldLtda8bzmsBWahETGsyFkoDOCT244YkA+S4=", + "owner": "1Password", + "repo": "typeshare", + "rev": "c3ee2ad8f27774c45db7af4f2ba746c4ae11de21", + "type": "github" + }, + "original": { + "owner": "1Password", + "repo": "typeshare", + "type": "github" + } + }, + "unstable": { + "locked": { + "lastModified": 1705856552, + "narHash": "sha256-JXfnuEf5Yd6bhMs/uvM67/joxYKoysyE3M2k6T3eWbg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "612f97239e2cc474c13c9dafa0df378058c5ad8d", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-unstable", + "type": "indirect" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..62806f8 --- /dev/null +++ b/flake.nix @@ -0,0 +1,61 @@ +{ + description = "Lumenescent Dreams Tools"; + + inputs = { + nixpkgs.url = "nixpkgs/nixos-23.11"; + unstable.url = "nixpkgs/nixos-unstable"; + typeshare.url = "github:1Password/typeshare"; + }; + + outputs = { self, nixpkgs, unstable, typeshare, ... }: + let + version = builtins.string 0 8 self.lastModifiedDate; + supportedSystems = [ "x86_64-linux" ]; + in + { + devShell."x86_64-linux" = + let + pkgs = import nixpkgs { system = "x86_64-linux"; }; + pkgs-unstable = import unstable { system = "x86_64-linux"; }; + in + pkgs.mkShell { + name = "ld-tools-devshell"; + buildInputs = [ + pkgs.cargo-nextest + pkgs.crate2nix + pkgs.glib + pkgs.gtk4 + pkgs.libadwaita + pkgs.pkg-config + pkgs.rustup + ]; + LIBCLANG_PATH="${pkgs.llvmPackages.libclang.lib}/lib"; + ENV = "dev"; + }; + + packages."x86_64-linux" = + let + pkgs = import nixpkgs { system = "x86_64-linux"; }; + + gtkNativeInputs = [ + pkgs.gtk4 + pkgs.pkg-config + ]; + + cargoOverrides = pkgs: pkgs.buildRustCrate.override { + defaultCrateOverrides = pkgs.defaultCrateOverrides // { + gobject-sys = attrs: { nativeBuildInputs = gtkNativeInputs; }; + gio-sys = attrs: { nativeBuildInputs = gtkNativeInputs; }; + gdk-pixbuf-sys = attrs: { nativeBuildInputs = gtkNativeInputs; }; + }; + }; + + cargo_nix = pkgs.callPackage ./Cargo.nix { + nixpkgs = nixpkgs; + buildRustCrateForPkgs = cargoOverrides; + }; + in { + default = cargo_nix.workspaceMembers.resources_demo.build; + }; + }; +} diff --git a/gresources.xml b/gresources.xml new file mode 100644 index 0000000..154a26d --- /dev/null +++ b/gresources.xml @@ -0,0 +1,4 @@ + + + + diff --git a/rust-toolchain b/rust-toolchain new file mode 100644 index 0000000..3e044fb --- /dev/null +++ b/rust-toolchain @@ -0,0 +1,3 @@ +[toolchain] +channel = "1.73.0" +targets = [ "wasm32-unknown-unknown" ] diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +}