├── .envrc ├── .github └── workflows │ ├── publish.yml │ └── tests.yaml ├── .gitignore ├── Cargo.lock ├── Cargo.nix ├── Cargo.toml ├── LICENSE.txt ├── README.md ├── default.nix ├── flake.lock ├── flake.nix ├── release.sh ├── rust-toolchain.toml ├── shell.nix └── src ├── app.rs ├── files.rs ├── main.rs ├── select.rs └── tmux.rs /.envrc: -------------------------------------------------------------------------------- 1 | use flake 2 | -------------------------------------------------------------------------------- /.github/workflows/publish.yml: -------------------------------------------------------------------------------- 1 | name: Publish to Cargo 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | 7 | jobs: 8 | publish: 9 | runs-on: ubuntu-latest 10 | 11 | name: 'publish' 12 | 13 | # Reference your environment variables 14 | environment: cargo 15 | 16 | steps: 17 | - uses: actions/checkout@master 18 | 19 | # Use caching to speed up your build 20 | - name: Cache publish-action bin 21 | id: cache-publish-action 22 | uses: actions/cache@v3 23 | env: 24 | cache-name: cache-publish-action 25 | with: 26 | path: ~/.cargo 27 | key: ${{ runner.os }}-build-${{ env.cache-name }}-v0.1.13 28 | 29 | # install publish-action by cargo in github action 30 | - name: Install publish-action 31 | if: steps.cache-publish-action.outputs.cache-hit != 'true' 32 | run: 33 | cargo install publish-action --version=0.1.13 34 | 35 | - name: Run publish-action 36 | id: publish-action 37 | run: 38 | publish-action 39 | env: 40 | # This can help you tagging the github repository 41 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 42 | # This can help you publish to crates.io 43 | CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_TOKEN }} 44 | 45 | - name: Update Changelog.md 46 | if: steps.publish-action.outputs.new_version == 'true' && steps.publish-action.outputs.publish == 'true' 47 | run: | 48 | changelog -o Changelog.md 49 | -------------------------------------------------------------------------------- /.github/workflows/tests.yaml: -------------------------------------------------------------------------------- 1 | name: Run tests 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - master 7 | push: 8 | branches: [master] 9 | 10 | jobs: 11 | test: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - uses: actions/checkout@v2 15 | - uses: DeterminateSystems/nix-installer-action@main 16 | - uses: DeterminateSystems/magic-nix-cache-action@main 17 | - run: nix build 18 | - run: nix develop --command "cargo" "test" 19 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | h 2 | nvim 3 | target 4 | **/*.rs.bk 5 | **/**/.DS_Store 6 | .direnv/ 7 | /result 8 | /result-bin 9 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "aho-corasick" 7 | version = "1.1.2" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" 10 | dependencies = [ 11 | "memchr", 12 | ] 13 | 14 | [[package]] 15 | name = "anyhow" 16 | version = "1.0.75" 17 | source = "registry+https://github.com/rust-lang/crates.io-index" 18 | checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" 19 | 20 | [[package]] 21 | name = "arrayvec" 22 | version = "0.5.2" 23 | source = "registry+https://github.com/rust-lang/crates.io-index" 24 | checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" 25 | 26 | [[package]] 27 | name = "atty" 28 | version = "0.2.14" 29 | source = "registry+https://github.com/rust-lang/crates.io-index" 30 | checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" 31 | dependencies = [ 32 | "hermit-abi 0.1.19", 33 | "libc", 34 | "winapi", 35 | ] 36 | 37 | [[package]] 38 | name = "autocfg" 39 | version = "1.1.0" 40 | source = "registry+https://github.com/rust-lang/crates.io-index" 41 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 42 | 43 | [[package]] 44 | name = "bitflags" 45 | version = "1.3.2" 46 | source = "registry+https://github.com/rust-lang/crates.io-index" 47 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 48 | 49 | [[package]] 50 | name = "bitflags" 51 | version = "2.4.1" 52 | source = "registry+https://github.com/rust-lang/crates.io-index" 53 | checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" 54 | 55 | [[package]] 56 | name = "bstr" 57 | version = "1.8.0" 58 | source = "registry+https://github.com/rust-lang/crates.io-index" 59 | checksum = "542f33a8835a0884b006a0c3df3dadd99c0c3f296ed26c2fdc8028e01ad6230c" 60 | dependencies = [ 61 | "memchr", 62 | "regex-automata", 63 | "serde 1.0.192", 64 | ] 65 | 66 | [[package]] 67 | name = "cfg-if" 68 | version = "0.1.10" 69 | source = "registry+https://github.com/rust-lang/crates.io-index" 70 | checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" 71 | 72 | [[package]] 73 | name = "cfg-if" 74 | version = "1.0.0" 75 | source = "registry+https://github.com/rust-lang/crates.io-index" 76 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 77 | 78 | [[package]] 79 | name = "clap" 80 | version = "3.2.25" 81 | source = "registry+https://github.com/rust-lang/crates.io-index" 82 | checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" 83 | dependencies = [ 84 | "atty", 85 | "bitflags 1.3.2", 86 | "clap_derive", 87 | "clap_lex", 88 | "indexmap", 89 | "once_cell", 90 | "strsim", 91 | "termcolor", 92 | "textwrap", 93 | ] 94 | 95 | [[package]] 96 | name = "clap_derive" 97 | version = "3.2.25" 98 | source = "registry+https://github.com/rust-lang/crates.io-index" 99 | checksum = "ae6371b8bdc8b7d3959e9cf7b22d4435ef3e79e138688421ec654acf8c81b008" 100 | dependencies = [ 101 | "heck", 102 | "proc-macro-error", 103 | "proc-macro2", 104 | "quote", 105 | "syn 1.0.109", 106 | ] 107 | 108 | [[package]] 109 | name = "clap_lex" 110 | version = "0.2.4" 111 | source = "registry+https://github.com/rust-lang/crates.io-index" 112 | checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" 113 | dependencies = [ 114 | "os_str_bytes", 115 | ] 116 | 117 | [[package]] 118 | name = "colored" 119 | version = "2.0.4" 120 | source = "registry+https://github.com/rust-lang/crates.io-index" 121 | checksum = "2674ec482fbc38012cf31e6c42ba0177b431a0cb6f15fe40efa5aab1bda516f6" 122 | dependencies = [ 123 | "is-terminal", 124 | "lazy_static", 125 | "windows-sys", 126 | ] 127 | 128 | [[package]] 129 | name = "config" 130 | version = "0.10.1" 131 | source = "registry+https://github.com/rust-lang/crates.io-index" 132 | checksum = "19b076e143e1d9538dde65da30f8481c2a6c44040edb8e02b9bf1351edb92ce3" 133 | dependencies = [ 134 | "lazy_static", 135 | "nom", 136 | "rust-ini", 137 | "serde 1.0.192", 138 | "serde-hjson", 139 | "serde_json", 140 | "toml", 141 | "yaml-rust", 142 | ] 143 | 144 | [[package]] 145 | name = "dirs" 146 | version = "2.0.2" 147 | source = "registry+https://github.com/rust-lang/crates.io-index" 148 | checksum = "13aea89a5c93364a98e9b37b2fa237effbb694d5cfe01c5b70941f7eb087d5e3" 149 | dependencies = [ 150 | "cfg-if 0.1.10", 151 | "dirs-sys", 152 | ] 153 | 154 | [[package]] 155 | name = "dirs-sys" 156 | version = "0.3.7" 157 | source = "registry+https://github.com/rust-lang/crates.io-index" 158 | checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" 159 | dependencies = [ 160 | "libc", 161 | "redox_users", 162 | "winapi", 163 | ] 164 | 165 | [[package]] 166 | name = "dmux" 167 | version = "0.6.4" 168 | dependencies = [ 169 | "anyhow", 170 | "clap", 171 | "colored", 172 | "config", 173 | "dirs", 174 | "grep-cli", 175 | "regex", 176 | "serde 1.0.192", 177 | "serde_derive", 178 | "tmux_interface", 179 | "url", 180 | "walkdir", 181 | ] 182 | 183 | [[package]] 184 | name = "errno" 185 | version = "0.3.7" 186 | source = "registry+https://github.com/rust-lang/crates.io-index" 187 | checksum = "f258a7194e7f7c2a7837a8913aeab7fd8c383457034fa20ce4dd3dcb813e8eb8" 188 | dependencies = [ 189 | "libc", 190 | "windows-sys", 191 | ] 192 | 193 | [[package]] 194 | name = "fnv" 195 | version = "1.0.7" 196 | source = "registry+https://github.com/rust-lang/crates.io-index" 197 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 198 | 199 | [[package]] 200 | name = "form_urlencoded" 201 | version = "1.2.0" 202 | source = "registry+https://github.com/rust-lang/crates.io-index" 203 | checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" 204 | dependencies = [ 205 | "percent-encoding", 206 | ] 207 | 208 | [[package]] 209 | name = "getrandom" 210 | version = "0.2.11" 211 | source = "registry+https://github.com/rust-lang/crates.io-index" 212 | checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" 213 | dependencies = [ 214 | "cfg-if 1.0.0", 215 | "libc", 216 | "wasi", 217 | ] 218 | 219 | [[package]] 220 | name = "globset" 221 | version = "0.4.13" 222 | source = "registry+https://github.com/rust-lang/crates.io-index" 223 | checksum = "759c97c1e17c55525b57192c06a267cda0ac5210b222d6b82189a2338fa1c13d" 224 | dependencies = [ 225 | "aho-corasick", 226 | "bstr", 227 | "fnv", 228 | "log", 229 | "regex", 230 | ] 231 | 232 | [[package]] 233 | name = "grep-cli" 234 | version = "0.1.9" 235 | source = "registry+https://github.com/rust-lang/crates.io-index" 236 | checksum = "8fe4bdbf4300c8b039f5d7eec7fbc6760d2c85bb15ac7499c4d235667f6d747a" 237 | dependencies = [ 238 | "bstr", 239 | "globset", 240 | "lazy_static", 241 | "log", 242 | "regex", 243 | "same-file", 244 | "termcolor", 245 | "winapi-util", 246 | ] 247 | 248 | [[package]] 249 | name = "hashbrown" 250 | version = "0.12.3" 251 | source = "registry+https://github.com/rust-lang/crates.io-index" 252 | checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" 253 | 254 | [[package]] 255 | name = "heck" 256 | version = "0.4.1" 257 | source = "registry+https://github.com/rust-lang/crates.io-index" 258 | checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" 259 | 260 | [[package]] 261 | name = "hermit-abi" 262 | version = "0.1.19" 263 | source = "registry+https://github.com/rust-lang/crates.io-index" 264 | checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" 265 | dependencies = [ 266 | "libc", 267 | ] 268 | 269 | [[package]] 270 | name = "hermit-abi" 271 | version = "0.3.3" 272 | source = "registry+https://github.com/rust-lang/crates.io-index" 273 | checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" 274 | 275 | [[package]] 276 | name = "idna" 277 | version = "0.4.0" 278 | source = "registry+https://github.com/rust-lang/crates.io-index" 279 | checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" 280 | dependencies = [ 281 | "unicode-bidi", 282 | "unicode-normalization", 283 | ] 284 | 285 | [[package]] 286 | name = "indexmap" 287 | version = "1.9.3" 288 | source = "registry+https://github.com/rust-lang/crates.io-index" 289 | checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" 290 | dependencies = [ 291 | "autocfg", 292 | "hashbrown", 293 | ] 294 | 295 | [[package]] 296 | name = "is-terminal" 297 | version = "0.4.9" 298 | source = "registry+https://github.com/rust-lang/crates.io-index" 299 | checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" 300 | dependencies = [ 301 | "hermit-abi 0.3.3", 302 | "rustix", 303 | "windows-sys", 304 | ] 305 | 306 | [[package]] 307 | name = "itoa" 308 | version = "1.0.9" 309 | source = "registry+https://github.com/rust-lang/crates.io-index" 310 | checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" 311 | 312 | [[package]] 313 | name = "lazy_static" 314 | version = "1.4.0" 315 | source = "registry+https://github.com/rust-lang/crates.io-index" 316 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 317 | 318 | [[package]] 319 | name = "lexical-core" 320 | version = "0.7.6" 321 | source = "registry+https://github.com/rust-lang/crates.io-index" 322 | checksum = "6607c62aa161d23d17a9072cc5da0be67cdfc89d3afb1e8d9c842bebc2525ffe" 323 | dependencies = [ 324 | "arrayvec", 325 | "bitflags 1.3.2", 326 | "cfg-if 1.0.0", 327 | "ryu", 328 | "static_assertions", 329 | ] 330 | 331 | [[package]] 332 | name = "libc" 333 | version = "0.2.150" 334 | source = "registry+https://github.com/rust-lang/crates.io-index" 335 | checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" 336 | 337 | [[package]] 338 | name = "libredox" 339 | version = "0.0.1" 340 | source = "registry+https://github.com/rust-lang/crates.io-index" 341 | checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" 342 | dependencies = [ 343 | "bitflags 2.4.1", 344 | "libc", 345 | "redox_syscall", 346 | ] 347 | 348 | [[package]] 349 | name = "linked-hash-map" 350 | version = "0.3.0" 351 | source = "registry+https://github.com/rust-lang/crates.io-index" 352 | checksum = "6d262045c5b87c0861b3f004610afd0e2c851e2908d08b6c870cbb9d5f494ecd" 353 | dependencies = [ 354 | "serde 0.8.23", 355 | "serde_test", 356 | ] 357 | 358 | [[package]] 359 | name = "linked-hash-map" 360 | version = "0.5.6" 361 | source = "registry+https://github.com/rust-lang/crates.io-index" 362 | checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" 363 | 364 | [[package]] 365 | name = "linux-raw-sys" 366 | version = "0.4.11" 367 | source = "registry+https://github.com/rust-lang/crates.io-index" 368 | checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" 369 | 370 | [[package]] 371 | name = "log" 372 | version = "0.4.20" 373 | source = "registry+https://github.com/rust-lang/crates.io-index" 374 | checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" 375 | 376 | [[package]] 377 | name = "memchr" 378 | version = "2.6.4" 379 | source = "registry+https://github.com/rust-lang/crates.io-index" 380 | checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" 381 | 382 | [[package]] 383 | name = "nom" 384 | version = "5.1.3" 385 | source = "registry+https://github.com/rust-lang/crates.io-index" 386 | checksum = "08959a387a676302eebf4ddbcbc611da04285579f76f88ee0506c63b1a61dd4b" 387 | dependencies = [ 388 | "lexical-core", 389 | "memchr", 390 | "version_check", 391 | ] 392 | 393 | [[package]] 394 | name = "num-traits" 395 | version = "0.1.43" 396 | source = "registry+https://github.com/rust-lang/crates.io-index" 397 | checksum = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" 398 | dependencies = [ 399 | "num-traits 0.2.17", 400 | ] 401 | 402 | [[package]] 403 | name = "num-traits" 404 | version = "0.2.17" 405 | source = "registry+https://github.com/rust-lang/crates.io-index" 406 | checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" 407 | dependencies = [ 408 | "autocfg", 409 | ] 410 | 411 | [[package]] 412 | name = "once_cell" 413 | version = "1.18.0" 414 | source = "registry+https://github.com/rust-lang/crates.io-index" 415 | checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" 416 | 417 | [[package]] 418 | name = "os_str_bytes" 419 | version = "6.6.1" 420 | source = "registry+https://github.com/rust-lang/crates.io-index" 421 | checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" 422 | 423 | [[package]] 424 | name = "percent-encoding" 425 | version = "2.3.0" 426 | source = "registry+https://github.com/rust-lang/crates.io-index" 427 | checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" 428 | 429 | [[package]] 430 | name = "proc-macro-error" 431 | version = "1.0.4" 432 | source = "registry+https://github.com/rust-lang/crates.io-index" 433 | checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" 434 | dependencies = [ 435 | "proc-macro-error-attr", 436 | "proc-macro2", 437 | "quote", 438 | "syn 1.0.109", 439 | "version_check", 440 | ] 441 | 442 | [[package]] 443 | name = "proc-macro-error-attr" 444 | version = "1.0.4" 445 | source = "registry+https://github.com/rust-lang/crates.io-index" 446 | checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" 447 | dependencies = [ 448 | "proc-macro2", 449 | "quote", 450 | "version_check", 451 | ] 452 | 453 | [[package]] 454 | name = "proc-macro2" 455 | version = "1.0.69" 456 | source = "registry+https://github.com/rust-lang/crates.io-index" 457 | checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" 458 | dependencies = [ 459 | "unicode-ident", 460 | ] 461 | 462 | [[package]] 463 | name = "quote" 464 | version = "1.0.33" 465 | source = "registry+https://github.com/rust-lang/crates.io-index" 466 | checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" 467 | dependencies = [ 468 | "proc-macro2", 469 | ] 470 | 471 | [[package]] 472 | name = "redox_syscall" 473 | version = "0.4.1" 474 | source = "registry+https://github.com/rust-lang/crates.io-index" 475 | checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" 476 | dependencies = [ 477 | "bitflags 1.3.2", 478 | ] 479 | 480 | [[package]] 481 | name = "redox_users" 482 | version = "0.4.4" 483 | source = "registry+https://github.com/rust-lang/crates.io-index" 484 | checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" 485 | dependencies = [ 486 | "getrandom", 487 | "libredox", 488 | "thiserror", 489 | ] 490 | 491 | [[package]] 492 | name = "regex" 493 | version = "1.10.2" 494 | source = "registry+https://github.com/rust-lang/crates.io-index" 495 | checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" 496 | dependencies = [ 497 | "aho-corasick", 498 | "memchr", 499 | "regex-automata", 500 | "regex-syntax", 501 | ] 502 | 503 | [[package]] 504 | name = "regex-automata" 505 | version = "0.4.3" 506 | source = "registry+https://github.com/rust-lang/crates.io-index" 507 | checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" 508 | dependencies = [ 509 | "aho-corasick", 510 | "memchr", 511 | "regex-syntax", 512 | ] 513 | 514 | [[package]] 515 | name = "regex-syntax" 516 | version = "0.8.2" 517 | source = "registry+https://github.com/rust-lang/crates.io-index" 518 | checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" 519 | 520 | [[package]] 521 | name = "rust-ini" 522 | version = "0.13.0" 523 | source = "registry+https://github.com/rust-lang/crates.io-index" 524 | checksum = "3e52c148ef37f8c375d49d5a73aa70713125b7f19095948a923f80afdeb22ec2" 525 | 526 | [[package]] 527 | name = "rustix" 528 | version = "0.38.25" 529 | source = "registry+https://github.com/rust-lang/crates.io-index" 530 | checksum = "dc99bc2d4f1fed22595588a013687477aedf3cdcfb26558c559edb67b4d9b22e" 531 | dependencies = [ 532 | "bitflags 2.4.1", 533 | "errno", 534 | "libc", 535 | "linux-raw-sys", 536 | "windows-sys", 537 | ] 538 | 539 | [[package]] 540 | name = "ryu" 541 | version = "1.0.15" 542 | source = "registry+https://github.com/rust-lang/crates.io-index" 543 | checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" 544 | 545 | [[package]] 546 | name = "same-file" 547 | version = "1.0.6" 548 | source = "registry+https://github.com/rust-lang/crates.io-index" 549 | checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" 550 | dependencies = [ 551 | "winapi-util", 552 | ] 553 | 554 | [[package]] 555 | name = "serde" 556 | version = "0.8.23" 557 | source = "registry+https://github.com/rust-lang/crates.io-index" 558 | checksum = "9dad3f759919b92c3068c696c15c3d17238234498bbdcc80f2c469606f948ac8" 559 | 560 | [[package]] 561 | name = "serde" 562 | version = "1.0.192" 563 | source = "registry+https://github.com/rust-lang/crates.io-index" 564 | checksum = "bca2a08484b285dcb282d0f67b26cadc0df8b19f8c12502c13d966bf9482f001" 565 | dependencies = [ 566 | "serde_derive", 567 | ] 568 | 569 | [[package]] 570 | name = "serde-hjson" 571 | version = "0.9.1" 572 | source = "registry+https://github.com/rust-lang/crates.io-index" 573 | checksum = "6a3a4e0ea8a88553209f6cc6cfe8724ecad22e1acf372793c27d995290fe74f8" 574 | dependencies = [ 575 | "lazy_static", 576 | "linked-hash-map 0.3.0", 577 | "num-traits 0.1.43", 578 | "regex", 579 | "serde 0.8.23", 580 | ] 581 | 582 | [[package]] 583 | name = "serde_derive" 584 | version = "1.0.192" 585 | source = "registry+https://github.com/rust-lang/crates.io-index" 586 | checksum = "d6c7207fbec9faa48073f3e3074cbe553af6ea512d7c21ba46e434e70ea9fbc1" 587 | dependencies = [ 588 | "proc-macro2", 589 | "quote", 590 | "syn 2.0.39", 591 | ] 592 | 593 | [[package]] 594 | name = "serde_json" 595 | version = "1.0.108" 596 | source = "registry+https://github.com/rust-lang/crates.io-index" 597 | checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" 598 | dependencies = [ 599 | "itoa", 600 | "ryu", 601 | "serde 1.0.192", 602 | ] 603 | 604 | [[package]] 605 | name = "serde_test" 606 | version = "0.8.23" 607 | source = "registry+https://github.com/rust-lang/crates.io-index" 608 | checksum = "110b3dbdf8607ec493c22d5d947753282f3bae73c0f56d322af1e8c78e4c23d5" 609 | dependencies = [ 610 | "serde 0.8.23", 611 | ] 612 | 613 | [[package]] 614 | name = "static_assertions" 615 | version = "1.1.0" 616 | source = "registry+https://github.com/rust-lang/crates.io-index" 617 | checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" 618 | 619 | [[package]] 620 | name = "strsim" 621 | version = "0.10.0" 622 | source = "registry+https://github.com/rust-lang/crates.io-index" 623 | checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" 624 | 625 | [[package]] 626 | name = "syn" 627 | version = "1.0.109" 628 | source = "registry+https://github.com/rust-lang/crates.io-index" 629 | checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" 630 | dependencies = [ 631 | "proc-macro2", 632 | "quote", 633 | "unicode-ident", 634 | ] 635 | 636 | [[package]] 637 | name = "syn" 638 | version = "2.0.39" 639 | source = "registry+https://github.com/rust-lang/crates.io-index" 640 | checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" 641 | dependencies = [ 642 | "proc-macro2", 643 | "quote", 644 | "unicode-ident", 645 | ] 646 | 647 | [[package]] 648 | name = "termcolor" 649 | version = "1.4.0" 650 | source = "registry+https://github.com/rust-lang/crates.io-index" 651 | checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" 652 | dependencies = [ 653 | "winapi-util", 654 | ] 655 | 656 | [[package]] 657 | name = "textwrap" 658 | version = "0.16.0" 659 | source = "registry+https://github.com/rust-lang/crates.io-index" 660 | checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" 661 | 662 | [[package]] 663 | name = "thiserror" 664 | version = "1.0.50" 665 | source = "registry+https://github.com/rust-lang/crates.io-index" 666 | checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" 667 | dependencies = [ 668 | "thiserror-impl", 669 | ] 670 | 671 | [[package]] 672 | name = "thiserror-impl" 673 | version = "1.0.50" 674 | source = "registry+https://github.com/rust-lang/crates.io-index" 675 | checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" 676 | dependencies = [ 677 | "proc-macro2", 678 | "quote", 679 | "syn 2.0.39", 680 | ] 681 | 682 | [[package]] 683 | name = "tinyvec" 684 | version = "1.6.0" 685 | source = "registry+https://github.com/rust-lang/crates.io-index" 686 | checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" 687 | dependencies = [ 688 | "tinyvec_macros", 689 | ] 690 | 691 | [[package]] 692 | name = "tinyvec_macros" 693 | version = "0.1.1" 694 | source = "registry+https://github.com/rust-lang/crates.io-index" 695 | checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" 696 | 697 | [[package]] 698 | name = "tmux_interface" 699 | version = "0.2.1" 700 | source = "registry+https://github.com/rust-lang/crates.io-index" 701 | checksum = "994f52fd871ec97d0c84c28fcaa717d63636ca1459c4dafb17a97114f3687ab0" 702 | 703 | [[package]] 704 | name = "toml" 705 | version = "0.5.11" 706 | source = "registry+https://github.com/rust-lang/crates.io-index" 707 | checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" 708 | dependencies = [ 709 | "serde 1.0.192", 710 | ] 711 | 712 | [[package]] 713 | name = "unicode-bidi" 714 | version = "0.3.13" 715 | source = "registry+https://github.com/rust-lang/crates.io-index" 716 | checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" 717 | 718 | [[package]] 719 | name = "unicode-ident" 720 | version = "1.0.12" 721 | source = "registry+https://github.com/rust-lang/crates.io-index" 722 | checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" 723 | 724 | [[package]] 725 | name = "unicode-normalization" 726 | version = "0.1.22" 727 | source = "registry+https://github.com/rust-lang/crates.io-index" 728 | checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" 729 | dependencies = [ 730 | "tinyvec", 731 | ] 732 | 733 | [[package]] 734 | name = "url" 735 | version = "2.4.1" 736 | source = "registry+https://github.com/rust-lang/crates.io-index" 737 | checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" 738 | dependencies = [ 739 | "form_urlencoded", 740 | "idna", 741 | "percent-encoding", 742 | ] 743 | 744 | [[package]] 745 | name = "version_check" 746 | version = "0.9.4" 747 | source = "registry+https://github.com/rust-lang/crates.io-index" 748 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 749 | 750 | [[package]] 751 | name = "walkdir" 752 | version = "2.4.0" 753 | source = "registry+https://github.com/rust-lang/crates.io-index" 754 | checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" 755 | dependencies = [ 756 | "same-file", 757 | "winapi-util", 758 | ] 759 | 760 | [[package]] 761 | name = "wasi" 762 | version = "0.11.0+wasi-snapshot-preview1" 763 | source = "registry+https://github.com/rust-lang/crates.io-index" 764 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 765 | 766 | [[package]] 767 | name = "winapi" 768 | version = "0.3.9" 769 | source = "registry+https://github.com/rust-lang/crates.io-index" 770 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 771 | dependencies = [ 772 | "winapi-i686-pc-windows-gnu", 773 | "winapi-x86_64-pc-windows-gnu", 774 | ] 775 | 776 | [[package]] 777 | name = "winapi-i686-pc-windows-gnu" 778 | version = "0.4.0" 779 | source = "registry+https://github.com/rust-lang/crates.io-index" 780 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 781 | 782 | [[package]] 783 | name = "winapi-util" 784 | version = "0.1.6" 785 | source = "registry+https://github.com/rust-lang/crates.io-index" 786 | checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" 787 | dependencies = [ 788 | "winapi", 789 | ] 790 | 791 | [[package]] 792 | name = "winapi-x86_64-pc-windows-gnu" 793 | version = "0.4.0" 794 | source = "registry+https://github.com/rust-lang/crates.io-index" 795 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 796 | 797 | [[package]] 798 | name = "windows-sys" 799 | version = "0.48.0" 800 | source = "registry+https://github.com/rust-lang/crates.io-index" 801 | checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" 802 | dependencies = [ 803 | "windows-targets", 804 | ] 805 | 806 | [[package]] 807 | name = "windows-targets" 808 | version = "0.48.5" 809 | source = "registry+https://github.com/rust-lang/crates.io-index" 810 | checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" 811 | dependencies = [ 812 | "windows_aarch64_gnullvm", 813 | "windows_aarch64_msvc", 814 | "windows_i686_gnu", 815 | "windows_i686_msvc", 816 | "windows_x86_64_gnu", 817 | "windows_x86_64_gnullvm", 818 | "windows_x86_64_msvc", 819 | ] 820 | 821 | [[package]] 822 | name = "windows_aarch64_gnullvm" 823 | version = "0.48.5" 824 | source = "registry+https://github.com/rust-lang/crates.io-index" 825 | checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" 826 | 827 | [[package]] 828 | name = "windows_aarch64_msvc" 829 | version = "0.48.5" 830 | source = "registry+https://github.com/rust-lang/crates.io-index" 831 | checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" 832 | 833 | [[package]] 834 | name = "windows_i686_gnu" 835 | version = "0.48.5" 836 | source = "registry+https://github.com/rust-lang/crates.io-index" 837 | checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" 838 | 839 | [[package]] 840 | name = "windows_i686_msvc" 841 | version = "0.48.5" 842 | source = "registry+https://github.com/rust-lang/crates.io-index" 843 | checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" 844 | 845 | [[package]] 846 | name = "windows_x86_64_gnu" 847 | version = "0.48.5" 848 | source = "registry+https://github.com/rust-lang/crates.io-index" 849 | checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" 850 | 851 | [[package]] 852 | name = "windows_x86_64_gnullvm" 853 | version = "0.48.5" 854 | source = "registry+https://github.com/rust-lang/crates.io-index" 855 | checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" 856 | 857 | [[package]] 858 | name = "windows_x86_64_msvc" 859 | version = "0.48.5" 860 | source = "registry+https://github.com/rust-lang/crates.io-index" 861 | checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" 862 | 863 | [[package]] 864 | name = "yaml-rust" 865 | version = "0.4.5" 866 | source = "registry+https://github.com/rust-lang/crates.io-index" 867 | checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" 868 | dependencies = [ 869 | "linked-hash-map 0.5.6", 870 | ] 871 | -------------------------------------------------------------------------------- /Cargo.nix: -------------------------------------------------------------------------------- 1 | # This file was @generated by cargo2nix 0.11.0. 2 | # It is not intended to be manually edited. 3 | args @ { 4 | release ? true, 5 | rootFeatures ? [ 6 | "dmux/default" 7 | ], 8 | rustPackages, 9 | buildRustPackages, 10 | hostPlatform, 11 | hostPlatformCpu ? null, 12 | hostPlatformFeatures ? [], 13 | target ? null, 14 | codegenOpts ? null, 15 | profileOpts ? null, 16 | cargoUnstableFlags ? null, 17 | rustcLinkFlags ? null, 18 | rustcBuildFlags ? null, 19 | mkRustCrate, 20 | rustLib, 21 | lib, 22 | workspaceSrc, 23 | ignoreLockHash, 24 | }: let 25 | nixifiedLockHash = "1c93dd230122b91064ba557c2cc2e5a06da4d5adb5de2e977b0c70bb2f78bcf1"; 26 | workspaceSrc = 27 | if args.workspaceSrc == null 28 | then ./. 29 | else args.workspaceSrc; 30 | currentLockHash = builtins.hashFile "sha256" (workspaceSrc + /Cargo.lock); 31 | lockHashIgnored = 32 | if ignoreLockHash 33 | then builtins.trace "Ignoring lock hash" ignoreLockHash 34 | else ignoreLockHash; 35 | in 36 | if !lockHashIgnored && (nixifiedLockHash != currentLockHash) 37 | then throw "Cargo.nix ${nixifiedLockHash} is out of sync with Cargo.lock ${currentLockHash}" 38 | else let 39 | inherit (rustLib) fetchCratesIo fetchCrateLocal fetchCrateGit fetchCrateAlternativeRegistry expandFeatures decideProfile genDrvsByProfile; 40 | profilesByName = { 41 | release = builtins.fromTOML "codegen-units = 1\n"; 42 | }; 43 | rootFeatures' = expandFeatures rootFeatures; 44 | overridableMkRustCrate = f: let 45 | drvs = genDrvsByProfile profilesByName ({ 46 | profile, 47 | profileName, 48 | }: 49 | mkRustCrate ({inherit release profile hostPlatformCpu hostPlatformFeatures target profileOpts codegenOpts cargoUnstableFlags rustcLinkFlags rustcBuildFlags;} // (f profileName))); 50 | in 51 | { 52 | compileMode ? null, 53 | profileName ? decideProfile compileMode release, 54 | }: let 55 | drv = drvs.${profileName}; 56 | in 57 | if compileMode == null 58 | then drv 59 | else drv.override {inherit compileMode;}; 60 | in { 61 | cargo2nixVersion = "0.11.0"; 62 | workspace = { 63 | dmux = rustPackages.unknown.dmux."0.6.4"; 64 | }; 65 | "registry+https://github.com/rust-lang/crates.io-index".aho-corasick."1.1.2" = overridableMkRustCrate (profileName: rec { 66 | name = "aho-corasick"; 67 | version = "1.1.2"; 68 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 69 | src = fetchCratesIo { 70 | inherit name version; 71 | sha256 = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0"; 72 | }; 73 | features = builtins.concatLists [ 74 | ["default"] 75 | ["perf-literal"] 76 | ["std"] 77 | ]; 78 | dependencies = { 79 | memchr = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".memchr."2.6.4" {inherit profileName;}).out; 80 | }; 81 | }); 82 | 83 | "registry+https://github.com/rust-lang/crates.io-index".anyhow."1.0.75" = overridableMkRustCrate (profileName: rec { 84 | name = "anyhow"; 85 | version = "1.0.75"; 86 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 87 | src = fetchCratesIo { 88 | inherit name version; 89 | sha256 = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6"; 90 | }; 91 | features = builtins.concatLists [ 92 | ["default"] 93 | ["std"] 94 | ]; 95 | }); 96 | 97 | "registry+https://github.com/rust-lang/crates.io-index".arrayvec."0.5.2" = overridableMkRustCrate (profileName: rec { 98 | name = "arrayvec"; 99 | version = "0.5.2"; 100 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 101 | src = fetchCratesIo { 102 | inherit name version; 103 | sha256 = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b"; 104 | }; 105 | features = builtins.concatLists [ 106 | ["array-sizes-33-128"] 107 | ]; 108 | }); 109 | 110 | "registry+https://github.com/rust-lang/crates.io-index".atty."0.2.14" = overridableMkRustCrate (profileName: rec { 111 | name = "atty"; 112 | version = "0.2.14"; 113 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 114 | src = fetchCratesIo { 115 | inherit name version; 116 | sha256 = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"; 117 | }; 118 | dependencies = { 119 | ${ 120 | if hostPlatform.parsed.kernel.name == "hermit" 121 | then "hermit_abi" 122 | else null 123 | } = 124 | (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hermit-abi."0.1.19" {inherit profileName;}).out; 125 | ${ 126 | if hostPlatform.isUnix 127 | then "libc" 128 | else null 129 | } = 130 | (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.150" {inherit profileName;}).out; 131 | ${ 132 | if hostPlatform.isWindows 133 | then "winapi" 134 | else null 135 | } = 136 | (rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi."0.3.9" {inherit profileName;}).out; 137 | }; 138 | }); 139 | 140 | "registry+https://github.com/rust-lang/crates.io-index".autocfg."1.1.0" = overridableMkRustCrate (profileName: rec { 141 | name = "autocfg"; 142 | version = "1.1.0"; 143 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 144 | src = fetchCratesIo { 145 | inherit name version; 146 | sha256 = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"; 147 | }; 148 | }); 149 | 150 | "registry+https://github.com/rust-lang/crates.io-index".bitflags."1.3.2" = overridableMkRustCrate (profileName: rec { 151 | name = "bitflags"; 152 | version = "1.3.2"; 153 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 154 | src = fetchCratesIo { 155 | inherit name version; 156 | sha256 = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"; 157 | }; 158 | features = builtins.concatLists [ 159 | ["default"] 160 | ]; 161 | }); 162 | 163 | "registry+https://github.com/rust-lang/crates.io-index".bitflags."2.4.1" = overridableMkRustCrate (profileName: rec { 164 | name = "bitflags"; 165 | version = "2.4.1"; 166 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 167 | src = fetchCratesIo { 168 | inherit name version; 169 | sha256 = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07"; 170 | }; 171 | features = builtins.concatLists [ 172 | ["std"] 173 | ]; 174 | }); 175 | 176 | "registry+https://github.com/rust-lang/crates.io-index".bstr."1.8.0" = overridableMkRustCrate (profileName: rec { 177 | name = "bstr"; 178 | version = "1.8.0"; 179 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 180 | src = fetchCratesIo { 181 | inherit name version; 182 | sha256 = "542f33a8835a0884b006a0c3df3dadd99c0c3f296ed26c2fdc8028e01ad6230c"; 183 | }; 184 | features = builtins.concatLists [ 185 | ["alloc"] 186 | ["default"] 187 | ["std"] 188 | ["unicode"] 189 | ]; 190 | dependencies = { 191 | memchr = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".memchr."2.6.4" {inherit profileName;}).out; 192 | regex_automata = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex-automata."0.4.3" {inherit profileName;}).out; 193 | serde = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.192" {inherit profileName;}).out; 194 | }; 195 | }); 196 | 197 | "registry+https://github.com/rust-lang/crates.io-index".cfg-if."0.1.10" = overridableMkRustCrate (profileName: rec { 198 | name = "cfg-if"; 199 | version = "0.1.10"; 200 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 201 | src = fetchCratesIo { 202 | inherit name version; 203 | sha256 = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"; 204 | }; 205 | }); 206 | 207 | "registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" = overridableMkRustCrate (profileName: rec { 208 | name = "cfg-if"; 209 | version = "1.0.0"; 210 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 211 | src = fetchCratesIo { 212 | inherit name version; 213 | sha256 = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"; 214 | }; 215 | }); 216 | 217 | "registry+https://github.com/rust-lang/crates.io-index".clap."3.2.25" = overridableMkRustCrate (profileName: rec { 218 | name = "clap"; 219 | version = "3.2.25"; 220 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 221 | src = fetchCratesIo { 222 | inherit name version; 223 | sha256 = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123"; 224 | }; 225 | features = builtins.concatLists [ 226 | ["atty"] 227 | ["cargo"] 228 | ["clap_derive"] 229 | ["color"] 230 | ["default"] 231 | ["derive"] 232 | ["once_cell"] 233 | ["std"] 234 | ["strsim"] 235 | ["suggestions"] 236 | ["termcolor"] 237 | ]; 238 | dependencies = { 239 | atty = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".atty."0.2.14" {inherit profileName;}).out; 240 | bitflags = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bitflags."1.3.2" {inherit profileName;}).out; 241 | clap_derive = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".clap_derive."3.2.25" {profileName = "__noProfile";}).out; 242 | clap_lex = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".clap_lex."0.2.4" {inherit profileName;}).out; 243 | indexmap = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".indexmap."1.9.3" {inherit profileName;}).out; 244 | once_cell = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.18.0" {inherit profileName;}).out; 245 | strsim = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".strsim."0.10.0" {inherit profileName;}).out; 246 | termcolor = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".termcolor."1.4.0" {inherit profileName;}).out; 247 | textwrap = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".textwrap."0.16.0" {inherit profileName;}).out; 248 | }; 249 | }); 250 | 251 | "registry+https://github.com/rust-lang/crates.io-index".clap_derive."3.2.25" = overridableMkRustCrate (profileName: rec { 252 | name = "clap_derive"; 253 | version = "3.2.25"; 254 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 255 | src = fetchCratesIo { 256 | inherit name version; 257 | sha256 = "ae6371b8bdc8b7d3959e9cf7b22d4435ef3e79e138688421ec654acf8c81b008"; 258 | }; 259 | features = builtins.concatLists [ 260 | ["default"] 261 | ]; 262 | dependencies = { 263 | heck = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".heck."0.4.1" {inherit profileName;}).out; 264 | proc_macro_error = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro-error."1.0.4" {inherit profileName;}).out; 265 | proc_macro2 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.69" {inherit profileName;}).out; 266 | quote = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.33" {inherit profileName;}).out; 267 | syn = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.109" {inherit profileName;}).out; 268 | }; 269 | }); 270 | 271 | "registry+https://github.com/rust-lang/crates.io-index".clap_lex."0.2.4" = overridableMkRustCrate (profileName: rec { 272 | name = "clap_lex"; 273 | version = "0.2.4"; 274 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 275 | src = fetchCratesIo { 276 | inherit name version; 277 | sha256 = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5"; 278 | }; 279 | dependencies = { 280 | os_str_bytes = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".os_str_bytes."6.6.1" {inherit profileName;}).out; 281 | }; 282 | }); 283 | 284 | "registry+https://github.com/rust-lang/crates.io-index".colored."2.0.4" = overridableMkRustCrate (profileName: rec { 285 | name = "colored"; 286 | version = "2.0.4"; 287 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 288 | src = fetchCratesIo { 289 | inherit name version; 290 | sha256 = "2674ec482fbc38012cf31e6c42ba0177b431a0cb6f15fe40efa5aab1bda516f6"; 291 | }; 292 | dependencies = { 293 | is_terminal = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".is-terminal."0.4.9" {inherit profileName;}).out; 294 | lazy_static = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".lazy_static."1.4.0" {inherit profileName;}).out; 295 | ${ 296 | if hostPlatform.isWindows 297 | then "windows_sys" 298 | else null 299 | } = 300 | (rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-sys."0.48.0" {inherit profileName;}).out; 301 | }; 302 | }); 303 | 304 | "registry+https://github.com/rust-lang/crates.io-index".config."0.10.1" = overridableMkRustCrate (profileName: rec { 305 | name = "config"; 306 | version = "0.10.1"; 307 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 308 | src = fetchCratesIo { 309 | inherit name version; 310 | sha256 = "19b076e143e1d9538dde65da30f8481c2a6c44040edb8e02b9bf1351edb92ce3"; 311 | }; 312 | features = builtins.concatLists [ 313 | ["default"] 314 | ["hjson"] 315 | ["ini"] 316 | ["json"] 317 | ["rust-ini"] 318 | ["serde-hjson"] 319 | ["serde_json"] 320 | ["toml"] 321 | ["yaml"] 322 | ["yaml-rust"] 323 | ]; 324 | dependencies = { 325 | lazy_static = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".lazy_static."1.4.0" {inherit profileName;}).out; 326 | nom = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".nom."5.1.3" {inherit profileName;}).out; 327 | ini = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rust-ini."0.13.0" {inherit profileName;}).out; 328 | serde = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.192" {inherit profileName;}).out; 329 | serde_hjson = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde-hjson."0.9.1" {inherit profileName;}).out; 330 | serde_json = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.108" {inherit profileName;}).out; 331 | toml = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".toml."0.5.11" {inherit profileName;}).out; 332 | yaml_rust = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".yaml-rust."0.4.5" {inherit profileName;}).out; 333 | }; 334 | }); 335 | 336 | "registry+https://github.com/rust-lang/crates.io-index".dirs."2.0.2" = overridableMkRustCrate (profileName: rec { 337 | name = "dirs"; 338 | version = "2.0.2"; 339 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 340 | src = fetchCratesIo { 341 | inherit name version; 342 | sha256 = "13aea89a5c93364a98e9b37b2fa237effbb694d5cfe01c5b70941f7eb087d5e3"; 343 | }; 344 | dependencies = { 345 | cfg_if = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."0.1.10" {inherit profileName;}).out; 346 | dirs_sys = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".dirs-sys."0.3.7" {inherit profileName;}).out; 347 | }; 348 | }); 349 | 350 | "registry+https://github.com/rust-lang/crates.io-index".dirs-sys."0.3.7" = overridableMkRustCrate (profileName: rec { 351 | name = "dirs-sys"; 352 | version = "0.3.7"; 353 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 354 | src = fetchCratesIo { 355 | inherit name version; 356 | sha256 = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6"; 357 | }; 358 | dependencies = { 359 | ${ 360 | if hostPlatform.isUnix 361 | then "libc" 362 | else null 363 | } = 364 | (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.150" {inherit profileName;}).out; 365 | ${ 366 | if hostPlatform.parsed.kernel.name == "redox" 367 | then "redox_users" 368 | else null 369 | } = 370 | (rustPackages."registry+https://github.com/rust-lang/crates.io-index".redox_users."0.4.4" {inherit profileName;}).out; 371 | ${ 372 | if hostPlatform.isWindows 373 | then "winapi" 374 | else null 375 | } = 376 | (rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi."0.3.9" {inherit profileName;}).out; 377 | }; 378 | }); 379 | 380 | "unknown".dmux."0.6.4" = overridableMkRustCrate (profileName: rec { 381 | name = "dmux"; 382 | version = "0.6.4"; 383 | registry = "unknown"; 384 | src = fetchCrateLocal workspaceSrc; 385 | dependencies = { 386 | anyhow = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".anyhow."1.0.75" {inherit profileName;}).out; 387 | clap = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".clap."3.2.25" {inherit profileName;}).out; 388 | colored = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".colored."2.0.4" {inherit profileName;}).out; 389 | config = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".config."0.10.1" {inherit profileName;}).out; 390 | dirs = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".dirs."2.0.2" {inherit profileName;}).out; 391 | grep_cli = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".grep-cli."0.1.9" {inherit profileName;}).out; 392 | regex = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex."1.10.2" {inherit profileName;}).out; 393 | serde = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.192" {inherit profileName;}).out; 394 | serde_derive = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_derive."1.0.192" {profileName = "__noProfile";}).out; 395 | tmux_interface = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tmux_interface."0.2.1" {inherit profileName;}).out; 396 | url = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".url."2.4.1" {inherit profileName;}).out; 397 | walkdir = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".walkdir."2.4.0" {inherit profileName;}).out; 398 | }; 399 | }); 400 | 401 | "registry+https://github.com/rust-lang/crates.io-index".errno."0.3.7" = overridableMkRustCrate (profileName: rec { 402 | name = "errno"; 403 | version = "0.3.7"; 404 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 405 | src = fetchCratesIo { 406 | inherit name version; 407 | sha256 = "f258a7194e7f7c2a7837a8913aeab7fd8c383457034fa20ce4dd3dcb813e8eb8"; 408 | }; 409 | features = builtins.concatLists [ 410 | ["std"] 411 | ]; 412 | dependencies = { 413 | ${ 414 | if hostPlatform.isUnix || hostPlatform.parsed.kernel.name == "hermit" || hostPlatform.parsed.kernel.name == "wasi" 415 | then "libc" 416 | else null 417 | } = 418 | (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.150" {inherit profileName;}).out; 419 | ${ 420 | if hostPlatform.isWindows 421 | then "windows_sys" 422 | else null 423 | } = 424 | (rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-sys."0.48.0" {inherit profileName;}).out; 425 | }; 426 | }); 427 | 428 | "registry+https://github.com/rust-lang/crates.io-index".fnv."1.0.7" = overridableMkRustCrate (profileName: rec { 429 | name = "fnv"; 430 | version = "1.0.7"; 431 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 432 | src = fetchCratesIo { 433 | inherit name version; 434 | sha256 = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"; 435 | }; 436 | features = builtins.concatLists [ 437 | ["default"] 438 | ["std"] 439 | ]; 440 | }); 441 | 442 | "registry+https://github.com/rust-lang/crates.io-index".form_urlencoded."1.2.0" = overridableMkRustCrate (profileName: rec { 443 | name = "form_urlencoded"; 444 | version = "1.2.0"; 445 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 446 | src = fetchCratesIo { 447 | inherit name version; 448 | sha256 = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652"; 449 | }; 450 | features = builtins.concatLists [ 451 | ["alloc"] 452 | ["default"] 453 | ["std"] 454 | ]; 455 | dependencies = { 456 | percent_encoding = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".percent-encoding."2.3.0" {inherit profileName;}).out; 457 | }; 458 | }); 459 | 460 | "registry+https://github.com/rust-lang/crates.io-index".getrandom."0.2.11" = overridableMkRustCrate (profileName: rec { 461 | name = "getrandom"; 462 | version = "0.2.11"; 463 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 464 | src = fetchCratesIo { 465 | inherit name version; 466 | sha256 = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f"; 467 | }; 468 | features = builtins.concatLists [ 469 | ["std"] 470 | ]; 471 | dependencies = { 472 | cfg_if = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" {inherit profileName;}).out; 473 | ${ 474 | if hostPlatform.isUnix 475 | then "libc" 476 | else null 477 | } = 478 | (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.150" {inherit profileName;}).out; 479 | ${ 480 | if hostPlatform.parsed.kernel.name == "wasi" 481 | then "wasi" 482 | else null 483 | } = 484 | (rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasi."0.11.0+wasi-snapshot-preview1" {inherit profileName;}).out; 485 | }; 486 | }); 487 | 488 | "registry+https://github.com/rust-lang/crates.io-index".globset."0.4.13" = overridableMkRustCrate (profileName: rec { 489 | name = "globset"; 490 | version = "0.4.13"; 491 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 492 | src = fetchCratesIo { 493 | inherit name version; 494 | sha256 = "759c97c1e17c55525b57192c06a267cda0ac5210b222d6b82189a2338fa1c13d"; 495 | }; 496 | features = builtins.concatLists [ 497 | ["default"] 498 | ["log"] 499 | ]; 500 | dependencies = { 501 | aho_corasick = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aho-corasick."1.1.2" {inherit profileName;}).out; 502 | bstr = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bstr."1.8.0" {inherit profileName;}).out; 503 | fnv = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".fnv."1.0.7" {inherit profileName;}).out; 504 | log = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.20" {inherit profileName;}).out; 505 | regex = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex."1.10.2" {inherit profileName;}).out; 506 | }; 507 | }); 508 | 509 | "registry+https://github.com/rust-lang/crates.io-index".grep-cli."0.1.9" = overridableMkRustCrate (profileName: rec { 510 | name = "grep-cli"; 511 | version = "0.1.9"; 512 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 513 | src = fetchCratesIo { 514 | inherit name version; 515 | sha256 = "8fe4bdbf4300c8b039f5d7eec7fbc6760d2c85bb15ac7499c4d235667f6d747a"; 516 | }; 517 | dependencies = { 518 | bstr = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bstr."1.8.0" {inherit profileName;}).out; 519 | globset = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".globset."0.4.13" {inherit profileName;}).out; 520 | lazy_static = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".lazy_static."1.4.0" {inherit profileName;}).out; 521 | log = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.20" {inherit profileName;}).out; 522 | regex = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex."1.10.2" {inherit profileName;}).out; 523 | same_file = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".same-file."1.0.6" {inherit profileName;}).out; 524 | termcolor = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".termcolor."1.4.0" {inherit profileName;}).out; 525 | ${ 526 | if hostPlatform.isWindows 527 | then "winapi_util" 528 | else null 529 | } = 530 | (rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi-util."0.1.6" {inherit profileName;}).out; 531 | }; 532 | }); 533 | 534 | "registry+https://github.com/rust-lang/crates.io-index".hashbrown."0.12.3" = overridableMkRustCrate (profileName: rec { 535 | name = "hashbrown"; 536 | version = "0.12.3"; 537 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 538 | src = fetchCratesIo { 539 | inherit name version; 540 | sha256 = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"; 541 | }; 542 | features = builtins.concatLists [ 543 | ["raw"] 544 | ]; 545 | }); 546 | 547 | "registry+https://github.com/rust-lang/crates.io-index".heck."0.4.1" = overridableMkRustCrate (profileName: rec { 548 | name = "heck"; 549 | version = "0.4.1"; 550 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 551 | src = fetchCratesIo { 552 | inherit name version; 553 | sha256 = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"; 554 | }; 555 | features = builtins.concatLists [ 556 | ["default"] 557 | ]; 558 | }); 559 | 560 | "registry+https://github.com/rust-lang/crates.io-index".hermit-abi."0.1.19" = overridableMkRustCrate (profileName: rec { 561 | name = "hermit-abi"; 562 | version = "0.1.19"; 563 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 564 | src = fetchCratesIo { 565 | inherit name version; 566 | sha256 = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"; 567 | }; 568 | features = builtins.concatLists [ 569 | ["default"] 570 | ]; 571 | dependencies = { 572 | libc = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.150" {inherit profileName;}).out; 573 | }; 574 | }); 575 | 576 | "registry+https://github.com/rust-lang/crates.io-index".hermit-abi."0.3.3" = overridableMkRustCrate (profileName: rec { 577 | name = "hermit-abi"; 578 | version = "0.3.3"; 579 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 580 | src = fetchCratesIo { 581 | inherit name version; 582 | sha256 = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7"; 583 | }; 584 | features = builtins.concatLists [ 585 | ["default"] 586 | ]; 587 | }); 588 | 589 | "registry+https://github.com/rust-lang/crates.io-index".idna."0.4.0" = overridableMkRustCrate (profileName: rec { 590 | name = "idna"; 591 | version = "0.4.0"; 592 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 593 | src = fetchCratesIo { 594 | inherit name version; 595 | sha256 = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c"; 596 | }; 597 | features = builtins.concatLists [ 598 | ["alloc"] 599 | ["default"] 600 | ["std"] 601 | ]; 602 | dependencies = { 603 | unicode_bidi = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".unicode-bidi."0.3.13" {inherit profileName;}).out; 604 | unicode_normalization = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".unicode-normalization."0.1.22" {inherit profileName;}).out; 605 | }; 606 | }); 607 | 608 | "registry+https://github.com/rust-lang/crates.io-index".indexmap."1.9.3" = overridableMkRustCrate (profileName: rec { 609 | name = "indexmap"; 610 | version = "1.9.3"; 611 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 612 | src = fetchCratesIo { 613 | inherit name version; 614 | sha256 = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"; 615 | }; 616 | features = builtins.concatLists [ 617 | ["std"] 618 | ]; 619 | dependencies = { 620 | hashbrown = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hashbrown."0.12.3" {inherit profileName;}).out; 621 | }; 622 | buildDependencies = { 623 | autocfg = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".autocfg."1.1.0" {profileName = "__noProfile";}).out; 624 | }; 625 | }); 626 | 627 | "registry+https://github.com/rust-lang/crates.io-index".is-terminal."0.4.9" = overridableMkRustCrate (profileName: rec { 628 | name = "is-terminal"; 629 | version = "0.4.9"; 630 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 631 | src = fetchCratesIo { 632 | inherit name version; 633 | sha256 = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b"; 634 | }; 635 | dependencies = { 636 | ${ 637 | if hostPlatform.parsed.kernel.name == "hermit" 638 | then "hermit_abi" 639 | else null 640 | } = 641 | (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hermit-abi."0.3.3" {inherit profileName;}).out; 642 | ${ 643 | if !(hostPlatform.isWindows || hostPlatform.parsed.kernel.name == "hermit" || hostPlatform.parsed.kernel.name == "unknown") 644 | then "rustix" 645 | else null 646 | } = 647 | (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustix."0.38.25" {inherit profileName;}).out; 648 | ${ 649 | if hostPlatform.isWindows 650 | then "windows_sys" 651 | else null 652 | } = 653 | (rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-sys."0.48.0" {inherit profileName;}).out; 654 | }; 655 | }); 656 | 657 | "registry+https://github.com/rust-lang/crates.io-index".itoa."1.0.9" = overridableMkRustCrate (profileName: rec { 658 | name = "itoa"; 659 | version = "1.0.9"; 660 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 661 | src = fetchCratesIo { 662 | inherit name version; 663 | sha256 = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38"; 664 | }; 665 | }); 666 | 667 | "registry+https://github.com/rust-lang/crates.io-index".lazy_static."1.4.0" = overridableMkRustCrate (profileName: rec { 668 | name = "lazy_static"; 669 | version = "1.4.0"; 670 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 671 | src = fetchCratesIo { 672 | inherit name version; 673 | sha256 = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"; 674 | }; 675 | }); 676 | 677 | "registry+https://github.com/rust-lang/crates.io-index".lexical-core."0.7.6" = overridableMkRustCrate (profileName: rec { 678 | name = "lexical-core"; 679 | version = "0.7.6"; 680 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 681 | src = fetchCratesIo { 682 | inherit name version; 683 | sha256 = "6607c62aa161d23d17a9072cc5da0be67cdfc89d3afb1e8d9c842bebc2525ffe"; 684 | }; 685 | features = builtins.concatLists [ 686 | ["arrayvec"] 687 | ["correct"] 688 | ["default"] 689 | ["ryu"] 690 | ["static_assertions"] 691 | ["std"] 692 | ["table"] 693 | ]; 694 | dependencies = { 695 | arrayvec = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".arrayvec."0.5.2" {inherit profileName;}).out; 696 | bitflags = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bitflags."1.3.2" {inherit profileName;}).out; 697 | cfg_if = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" {inherit profileName;}).out; 698 | ryu = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".ryu."1.0.15" {inherit profileName;}).out; 699 | static_assertions = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".static_assertions."1.1.0" {inherit profileName;}).out; 700 | }; 701 | }); 702 | 703 | "registry+https://github.com/rust-lang/crates.io-index".libc."0.2.150" = overridableMkRustCrate (profileName: rec { 704 | name = "libc"; 705 | version = "0.2.150"; 706 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 707 | src = fetchCratesIo { 708 | inherit name version; 709 | sha256 = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c"; 710 | }; 711 | features = builtins.concatLists [ 712 | ["default"] 713 | ["extra_traits"] 714 | ["std"] 715 | ]; 716 | }); 717 | 718 | "registry+https://github.com/rust-lang/crates.io-index".libredox."0.0.1" = overridableMkRustCrate (profileName: rec { 719 | name = "libredox"; 720 | version = "0.0.1"; 721 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 722 | src = fetchCratesIo { 723 | inherit name version; 724 | sha256 = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8"; 725 | }; 726 | features = builtins.concatLists [ 727 | ["call"] 728 | ]; 729 | dependencies = { 730 | bitflags = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bitflags."2.4.1" {inherit profileName;}).out; 731 | libc = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.150" {inherit profileName;}).out; 732 | syscall = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".redox_syscall."0.4.1" {inherit profileName;}).out; 733 | }; 734 | }); 735 | 736 | "registry+https://github.com/rust-lang/crates.io-index".linked-hash-map."0.3.0" = overridableMkRustCrate (profileName: rec { 737 | name = "linked-hash-map"; 738 | version = "0.3.0"; 739 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 740 | src = fetchCratesIo { 741 | inherit name version; 742 | sha256 = "6d262045c5b87c0861b3f004610afd0e2c851e2908d08b6c870cbb9d5f494ecd"; 743 | }; 744 | features = builtins.concatLists [ 745 | ["serde"] 746 | ["serde_impl"] 747 | ["serde_test"] 748 | ]; 749 | dependencies = { 750 | serde = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."0.8.23" {inherit profileName;}).out; 751 | serde_test = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_test."0.8.23" {inherit profileName;}).out; 752 | }; 753 | }); 754 | 755 | "registry+https://github.com/rust-lang/crates.io-index".linked-hash-map."0.5.6" = overridableMkRustCrate (profileName: rec { 756 | name = "linked-hash-map"; 757 | version = "0.5.6"; 758 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 759 | src = fetchCratesIo { 760 | inherit name version; 761 | sha256 = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f"; 762 | }; 763 | }); 764 | 765 | "registry+https://github.com/rust-lang/crates.io-index".linux-raw-sys."0.4.11" = overridableMkRustCrate (profileName: rec { 766 | name = "linux-raw-sys"; 767 | version = "0.4.11"; 768 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 769 | src = fetchCratesIo { 770 | inherit name version; 771 | sha256 = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829"; 772 | }; 773 | features = builtins.concatLists [ 774 | ["elf"] 775 | ["errno"] 776 | ["general"] 777 | ["ioctl"] 778 | ["no_std"] 779 | ]; 780 | }); 781 | 782 | "registry+https://github.com/rust-lang/crates.io-index".log."0.4.20" = overridableMkRustCrate (profileName: rec { 783 | name = "log"; 784 | version = "0.4.20"; 785 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 786 | src = fetchCratesIo { 787 | inherit name version; 788 | sha256 = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f"; 789 | }; 790 | }); 791 | 792 | "registry+https://github.com/rust-lang/crates.io-index".memchr."2.6.4" = overridableMkRustCrate (profileName: rec { 793 | name = "memchr"; 794 | version = "2.6.4"; 795 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 796 | src = fetchCratesIo { 797 | inherit name version; 798 | sha256 = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167"; 799 | }; 800 | features = builtins.concatLists [ 801 | ["alloc"] 802 | ["default"] 803 | ["std"] 804 | ["use_std"] 805 | ]; 806 | }); 807 | 808 | "registry+https://github.com/rust-lang/crates.io-index".nom."5.1.3" = overridableMkRustCrate (profileName: rec { 809 | name = "nom"; 810 | version = "5.1.3"; 811 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 812 | src = fetchCratesIo { 813 | inherit name version; 814 | sha256 = "08959a387a676302eebf4ddbcbc611da04285579f76f88ee0506c63b1a61dd4b"; 815 | }; 816 | features = builtins.concatLists [ 817 | ["alloc"] 818 | ["default"] 819 | ["lexical"] 820 | ["lexical-core"] 821 | ["std"] 822 | ]; 823 | dependencies = { 824 | lexical_core = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".lexical-core."0.7.6" {inherit profileName;}).out; 825 | memchr = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".memchr."2.6.4" {inherit profileName;}).out; 826 | }; 827 | buildDependencies = { 828 | version_check = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".version_check."0.9.4" {profileName = "__noProfile";}).out; 829 | }; 830 | }); 831 | 832 | "registry+https://github.com/rust-lang/crates.io-index".num-traits."0.1.43" = overridableMkRustCrate (profileName: rec { 833 | name = "num-traits"; 834 | version = "0.1.43"; 835 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 836 | src = fetchCratesIo { 837 | inherit name version; 838 | sha256 = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31"; 839 | }; 840 | dependencies = { 841 | num_traits = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-traits."0.2.17" {inherit profileName;}).out; 842 | }; 843 | }); 844 | 845 | "registry+https://github.com/rust-lang/crates.io-index".num-traits."0.2.17" = overridableMkRustCrate (profileName: rec { 846 | name = "num-traits"; 847 | version = "0.2.17"; 848 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 849 | src = fetchCratesIo { 850 | inherit name version; 851 | sha256 = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c"; 852 | }; 853 | features = builtins.concatLists [ 854 | ["default"] 855 | ["std"] 856 | ]; 857 | buildDependencies = { 858 | autocfg = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".autocfg."1.1.0" {profileName = "__noProfile";}).out; 859 | }; 860 | }); 861 | 862 | "registry+https://github.com/rust-lang/crates.io-index".once_cell."1.18.0" = overridableMkRustCrate (profileName: rec { 863 | name = "once_cell"; 864 | version = "1.18.0"; 865 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 866 | src = fetchCratesIo { 867 | inherit name version; 868 | sha256 = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d"; 869 | }; 870 | features = builtins.concatLists [ 871 | ["alloc"] 872 | ["default"] 873 | ["race"] 874 | ["std"] 875 | ]; 876 | }); 877 | 878 | "registry+https://github.com/rust-lang/crates.io-index".os_str_bytes."6.6.1" = overridableMkRustCrate (profileName: rec { 879 | name = "os_str_bytes"; 880 | version = "6.6.1"; 881 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 882 | src = fetchCratesIo { 883 | inherit name version; 884 | sha256 = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1"; 885 | }; 886 | features = builtins.concatLists [ 887 | ["raw_os_str"] 888 | ]; 889 | }); 890 | 891 | "registry+https://github.com/rust-lang/crates.io-index".percent-encoding."2.3.0" = overridableMkRustCrate (profileName: rec { 892 | name = "percent-encoding"; 893 | version = "2.3.0"; 894 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 895 | src = fetchCratesIo { 896 | inherit name version; 897 | sha256 = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94"; 898 | }; 899 | features = builtins.concatLists [ 900 | ["alloc"] 901 | ["default"] 902 | ["std"] 903 | ]; 904 | }); 905 | 906 | "registry+https://github.com/rust-lang/crates.io-index".proc-macro-error."1.0.4" = overridableMkRustCrate (profileName: rec { 907 | name = "proc-macro-error"; 908 | version = "1.0.4"; 909 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 910 | src = fetchCratesIo { 911 | inherit name version; 912 | sha256 = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"; 913 | }; 914 | features = builtins.concatLists [ 915 | ["default"] 916 | ["syn"] 917 | ["syn-error"] 918 | ]; 919 | dependencies = { 920 | proc_macro_error_attr = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro-error-attr."1.0.4" {profileName = "__noProfile";}).out; 921 | proc_macro2 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.69" {inherit profileName;}).out; 922 | quote = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.33" {inherit profileName;}).out; 923 | syn = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.109" {inherit profileName;}).out; 924 | }; 925 | buildDependencies = { 926 | version_check = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".version_check."0.9.4" {profileName = "__noProfile";}).out; 927 | }; 928 | }); 929 | 930 | "registry+https://github.com/rust-lang/crates.io-index".proc-macro-error-attr."1.0.4" = overridableMkRustCrate (profileName: rec { 931 | name = "proc-macro-error-attr"; 932 | version = "1.0.4"; 933 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 934 | src = fetchCratesIo { 935 | inherit name version; 936 | sha256 = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"; 937 | }; 938 | dependencies = { 939 | proc_macro2 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.69" {inherit profileName;}).out; 940 | quote = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.33" {inherit profileName;}).out; 941 | }; 942 | buildDependencies = { 943 | version_check = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".version_check."0.9.4" {profileName = "__noProfile";}).out; 944 | }; 945 | }); 946 | 947 | "registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.69" = overridableMkRustCrate (profileName: rec { 948 | name = "proc-macro2"; 949 | version = "1.0.69"; 950 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 951 | src = fetchCratesIo { 952 | inherit name version; 953 | sha256 = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da"; 954 | }; 955 | features = builtins.concatLists [ 956 | ["default"] 957 | ["proc-macro"] 958 | ]; 959 | dependencies = { 960 | unicode_ident = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".unicode-ident."1.0.12" {inherit profileName;}).out; 961 | }; 962 | }); 963 | 964 | "registry+https://github.com/rust-lang/crates.io-index".quote."1.0.33" = overridableMkRustCrate (profileName: rec { 965 | name = "quote"; 966 | version = "1.0.33"; 967 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 968 | src = fetchCratesIo { 969 | inherit name version; 970 | sha256 = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae"; 971 | }; 972 | features = builtins.concatLists [ 973 | ["default"] 974 | ["proc-macro"] 975 | ]; 976 | dependencies = { 977 | proc_macro2 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.69" {inherit profileName;}).out; 978 | }; 979 | }); 980 | 981 | "registry+https://github.com/rust-lang/crates.io-index".redox_syscall."0.4.1" = overridableMkRustCrate (profileName: rec { 982 | name = "redox_syscall"; 983 | version = "0.4.1"; 984 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 985 | src = fetchCratesIo { 986 | inherit name version; 987 | sha256 = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa"; 988 | }; 989 | dependencies = { 990 | bitflags = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bitflags."1.3.2" {inherit profileName;}).out; 991 | }; 992 | }); 993 | 994 | "registry+https://github.com/rust-lang/crates.io-index".redox_users."0.4.4" = overridableMkRustCrate (profileName: rec { 995 | name = "redox_users"; 996 | version = "0.4.4"; 997 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 998 | src = fetchCratesIo { 999 | inherit name version; 1000 | sha256 = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4"; 1001 | }; 1002 | dependencies = { 1003 | getrandom = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".getrandom."0.2.11" {inherit profileName;}).out; 1004 | libredox = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libredox."0.0.1" {inherit profileName;}).out; 1005 | thiserror = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".thiserror."1.0.50" {inherit profileName;}).out; 1006 | }; 1007 | }); 1008 | 1009 | "registry+https://github.com/rust-lang/crates.io-index".regex."1.10.2" = overridableMkRustCrate (profileName: rec { 1010 | name = "regex"; 1011 | version = "1.10.2"; 1012 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 1013 | src = fetchCratesIo { 1014 | inherit name version; 1015 | sha256 = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343"; 1016 | }; 1017 | features = builtins.concatLists [ 1018 | ["default"] 1019 | ["perf"] 1020 | ["perf-backtrack"] 1021 | ["perf-cache"] 1022 | ["perf-dfa"] 1023 | ["perf-inline"] 1024 | ["perf-literal"] 1025 | ["perf-onepass"] 1026 | ["std"] 1027 | ["unicode"] 1028 | ["unicode-age"] 1029 | ["unicode-bool"] 1030 | ["unicode-case"] 1031 | ["unicode-gencat"] 1032 | ["unicode-perl"] 1033 | ["unicode-script"] 1034 | ["unicode-segment"] 1035 | ]; 1036 | dependencies = { 1037 | aho_corasick = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aho-corasick."1.1.2" {inherit profileName;}).out; 1038 | memchr = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".memchr."2.6.4" {inherit profileName;}).out; 1039 | regex_automata = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex-automata."0.4.3" {inherit profileName;}).out; 1040 | regex_syntax = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex-syntax."0.8.2" {inherit profileName;}).out; 1041 | }; 1042 | }); 1043 | 1044 | "registry+https://github.com/rust-lang/crates.io-index".regex-automata."0.4.3" = overridableMkRustCrate (profileName: rec { 1045 | name = "regex-automata"; 1046 | version = "0.4.3"; 1047 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 1048 | src = fetchCratesIo { 1049 | inherit name version; 1050 | sha256 = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f"; 1051 | }; 1052 | features = builtins.concatLists [ 1053 | ["alloc"] 1054 | ["dfa-onepass"] 1055 | ["dfa-search"] 1056 | ["hybrid"] 1057 | ["meta"] 1058 | ["nfa-backtrack"] 1059 | ["nfa-pikevm"] 1060 | ["nfa-thompson"] 1061 | ["perf-inline"] 1062 | ["perf-literal"] 1063 | ["perf-literal-multisubstring"] 1064 | ["perf-literal-substring"] 1065 | ["std"] 1066 | ["syntax"] 1067 | ["unicode"] 1068 | ["unicode-age"] 1069 | ["unicode-bool"] 1070 | ["unicode-case"] 1071 | ["unicode-gencat"] 1072 | ["unicode-perl"] 1073 | ["unicode-script"] 1074 | ["unicode-segment"] 1075 | ["unicode-word-boundary"] 1076 | ]; 1077 | dependencies = { 1078 | aho_corasick = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aho-corasick."1.1.2" {inherit profileName;}).out; 1079 | memchr = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".memchr."2.6.4" {inherit profileName;}).out; 1080 | regex_syntax = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex-syntax."0.8.2" {inherit profileName;}).out; 1081 | }; 1082 | }); 1083 | 1084 | "registry+https://github.com/rust-lang/crates.io-index".regex-syntax."0.8.2" = overridableMkRustCrate (profileName: rec { 1085 | name = "regex-syntax"; 1086 | version = "0.8.2"; 1087 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 1088 | src = fetchCratesIo { 1089 | inherit name version; 1090 | sha256 = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"; 1091 | }; 1092 | features = builtins.concatLists [ 1093 | ["default"] 1094 | ["std"] 1095 | ["unicode"] 1096 | ["unicode-age"] 1097 | ["unicode-bool"] 1098 | ["unicode-case"] 1099 | ["unicode-gencat"] 1100 | ["unicode-perl"] 1101 | ["unicode-script"] 1102 | ["unicode-segment"] 1103 | ]; 1104 | }); 1105 | 1106 | "registry+https://github.com/rust-lang/crates.io-index".rust-ini."0.13.0" = overridableMkRustCrate (profileName: rec { 1107 | name = "rust-ini"; 1108 | version = "0.13.0"; 1109 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 1110 | src = fetchCratesIo { 1111 | inherit name version; 1112 | sha256 = "3e52c148ef37f8c375d49d5a73aa70713125b7f19095948a923f80afdeb22ec2"; 1113 | }; 1114 | }); 1115 | 1116 | "registry+https://github.com/rust-lang/crates.io-index".rustix."0.38.25" = overridableMkRustCrate (profileName: rec { 1117 | name = "rustix"; 1118 | version = "0.38.25"; 1119 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 1120 | src = fetchCratesIo { 1121 | inherit name version; 1122 | sha256 = "dc99bc2d4f1fed22595588a013687477aedf3cdcfb26558c559edb67b4d9b22e"; 1123 | }; 1124 | features = builtins.concatLists [ 1125 | ["alloc"] 1126 | ["default"] 1127 | ["std"] 1128 | ["termios"] 1129 | ["use-libc-auxv"] 1130 | ]; 1131 | dependencies = { 1132 | bitflags = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bitflags."2.4.1" {inherit profileName;}).out; 1133 | ${ 1134 | if hostPlatform.parsed.kernel.name == "linux" && hostPlatform.parsed.cpu.significantByte == "littleEndian" && (hostPlatform.parsed.cpu.name == "armv6l" || hostPlatform.parsed.cpu.name == "armv7l" || hostPlatform.parsed.cpu.name == "aarch64" && hostPlatform.parsed.cpu.bits == 64 || hostPlatform.parsed.cpu.name == "riscv64" || hostPlatform.parsed.cpu.name == "i686" || hostPlatform.parsed.cpu.name == "x86_64" && hostPlatform.parsed.cpu.bits == 64) || !hostPlatform.isWindows && !(hostPlatform.parsed.kernel.name == "linux" && hostPlatform.parsed.cpu.significantByte == "littleEndian" && (hostPlatform.parsed.cpu.name == "armv6l" || hostPlatform.parsed.cpu.name == "armv7l" || hostPlatform.parsed.cpu.name == "aarch64" && hostPlatform.parsed.cpu.bits == 64 || hostPlatform.parsed.cpu.name == "riscv64" || hostPlatform.parsed.cpu.name == "i686" || hostPlatform.parsed.cpu.name == "x86_64" && hostPlatform.parsed.cpu.bits == 64)) || hostPlatform.isWindows 1135 | then "libc_errno" 1136 | else null 1137 | } = 1138 | (rustPackages."registry+https://github.com/rust-lang/crates.io-index".errno."0.3.7" {inherit profileName;}).out; 1139 | ${ 1140 | if hostPlatform.parsed.kernel.name == "linux" && hostPlatform.parsed.cpu.significantByte == "littleEndian" && (hostPlatform.parsed.cpu.name == "armv6l" || hostPlatform.parsed.cpu.name == "armv7l" || hostPlatform.parsed.cpu.name == "aarch64" && hostPlatform.parsed.cpu.bits == 64 || hostPlatform.parsed.cpu.name == "riscv64" || hostPlatform.parsed.cpu.name == "i686" || hostPlatform.parsed.cpu.name == "x86_64" && hostPlatform.parsed.cpu.bits == 64) || !hostPlatform.isWindows && !(hostPlatform.parsed.kernel.name == "linux" && hostPlatform.parsed.cpu.significantByte == "littleEndian" && (hostPlatform.parsed.cpu.name == "armv6l" || hostPlatform.parsed.cpu.name == "armv7l" || hostPlatform.parsed.cpu.name == "aarch64" && hostPlatform.parsed.cpu.bits == 64 || hostPlatform.parsed.cpu.name == "riscv64" || hostPlatform.parsed.cpu.name == "i686" || hostPlatform.parsed.cpu.name == "x86_64" && hostPlatform.parsed.cpu.bits == 64)) 1141 | then "libc" 1142 | else null 1143 | } = 1144 | (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.150" {inherit profileName;}).out; 1145 | ${ 1146 | if hostPlatform.parsed.kernel.name == "linux" && hostPlatform.parsed.cpu.significantByte == "littleEndian" && (hostPlatform.parsed.cpu.name == "armv6l" || hostPlatform.parsed.cpu.name == "armv7l" || hostPlatform.parsed.cpu.name == "aarch64" && hostPlatform.parsed.cpu.bits == 64 || hostPlatform.parsed.cpu.name == "riscv64" || hostPlatform.parsed.cpu.name == "i686" || hostPlatform.parsed.cpu.name == "x86_64" && hostPlatform.parsed.cpu.bits == 64) || (hostPlatform.parsed.kernel.name == "android" || hostPlatform.parsed.kernel.name == "linux") && !(hostPlatform.parsed.kernel.name == "linux" && hostPlatform.parsed.cpu.significantByte == "littleEndian" && (hostPlatform.parsed.cpu.name == "armv6l" || hostPlatform.parsed.cpu.name == "armv7l" || hostPlatform.parsed.cpu.name == "aarch64" && hostPlatform.parsed.cpu.bits == 64 || hostPlatform.parsed.cpu.name == "riscv64" || hostPlatform.parsed.cpu.name == "i686" || hostPlatform.parsed.cpu.name == "x86_64" && hostPlatform.parsed.cpu.bits == 64)) 1147 | then "linux_raw_sys" 1148 | else null 1149 | } = 1150 | (rustPackages."registry+https://github.com/rust-lang/crates.io-index".linux-raw-sys."0.4.11" {inherit profileName;}).out; 1151 | ${ 1152 | if hostPlatform.isWindows 1153 | then "windows_sys" 1154 | else null 1155 | } = 1156 | (rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-sys."0.48.0" {inherit profileName;}).out; 1157 | }; 1158 | }); 1159 | 1160 | "registry+https://github.com/rust-lang/crates.io-index".ryu."1.0.15" = overridableMkRustCrate (profileName: rec { 1161 | name = "ryu"; 1162 | version = "1.0.15"; 1163 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 1164 | src = fetchCratesIo { 1165 | inherit name version; 1166 | sha256 = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741"; 1167 | }; 1168 | }); 1169 | 1170 | "registry+https://github.com/rust-lang/crates.io-index".same-file."1.0.6" = overridableMkRustCrate (profileName: rec { 1171 | name = "same-file"; 1172 | version = "1.0.6"; 1173 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 1174 | src = fetchCratesIo { 1175 | inherit name version; 1176 | sha256 = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"; 1177 | }; 1178 | dependencies = { 1179 | ${ 1180 | if hostPlatform.isWindows 1181 | then "winapi_util" 1182 | else null 1183 | } = 1184 | (rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi-util."0.1.6" {inherit profileName;}).out; 1185 | }; 1186 | }); 1187 | 1188 | "registry+https://github.com/rust-lang/crates.io-index".serde."0.8.23" = overridableMkRustCrate (profileName: rec { 1189 | name = "serde"; 1190 | version = "0.8.23"; 1191 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 1192 | src = fetchCratesIo { 1193 | inherit name version; 1194 | sha256 = "9dad3f759919b92c3068c696c15c3d17238234498bbdcc80f2c469606f948ac8"; 1195 | }; 1196 | features = builtins.concatLists [ 1197 | ["default"] 1198 | ["std"] 1199 | ]; 1200 | }); 1201 | 1202 | "registry+https://github.com/rust-lang/crates.io-index".serde."1.0.192" = overridableMkRustCrate (profileName: rec { 1203 | name = "serde"; 1204 | version = "1.0.192"; 1205 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 1206 | src = fetchCratesIo { 1207 | inherit name version; 1208 | sha256 = "bca2a08484b285dcb282d0f67b26cadc0df8b19f8c12502c13d966bf9482f001"; 1209 | }; 1210 | features = builtins.concatLists [ 1211 | ["alloc"] 1212 | ["default"] 1213 | ["std"] 1214 | ]; 1215 | dependencies = { 1216 | ${ 1217 | if false 1218 | then "serde_derive" 1219 | else null 1220 | } = 1221 | (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_derive."1.0.192" {profileName = "__noProfile";}).out; 1222 | }; 1223 | }); 1224 | 1225 | "registry+https://github.com/rust-lang/crates.io-index".serde-hjson."0.9.1" = overridableMkRustCrate (profileName: rec { 1226 | name = "serde-hjson"; 1227 | version = "0.9.1"; 1228 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 1229 | src = fetchCratesIo { 1230 | inherit name version; 1231 | sha256 = "6a3a4e0ea8a88553209f6cc6cfe8724ecad22e1acf372793c27d995290fe74f8"; 1232 | }; 1233 | features = builtins.concatLists [ 1234 | ["default"] 1235 | ["linked-hash-map"] 1236 | ["preserve_order"] 1237 | ]; 1238 | dependencies = { 1239 | lazy_static = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".lazy_static."1.4.0" {inherit profileName;}).out; 1240 | linked_hash_map = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".linked-hash-map."0.3.0" {inherit profileName;}).out; 1241 | num_traits = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-traits."0.1.43" {inherit profileName;}).out; 1242 | regex = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex."1.10.2" {inherit profileName;}).out; 1243 | serde = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."0.8.23" {inherit profileName;}).out; 1244 | }; 1245 | }); 1246 | 1247 | "registry+https://github.com/rust-lang/crates.io-index".serde_derive."1.0.192" = overridableMkRustCrate (profileName: rec { 1248 | name = "serde_derive"; 1249 | version = "1.0.192"; 1250 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 1251 | src = fetchCratesIo { 1252 | inherit name version; 1253 | sha256 = "d6c7207fbec9faa48073f3e3074cbe553af6ea512d7c21ba46e434e70ea9fbc1"; 1254 | }; 1255 | features = builtins.concatLists [ 1256 | ["default"] 1257 | ]; 1258 | dependencies = { 1259 | proc_macro2 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.69" {inherit profileName;}).out; 1260 | quote = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.33" {inherit profileName;}).out; 1261 | syn = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."2.0.39" {inherit profileName;}).out; 1262 | }; 1263 | }); 1264 | 1265 | "registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.108" = overridableMkRustCrate (profileName: rec { 1266 | name = "serde_json"; 1267 | version = "1.0.108"; 1268 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 1269 | src = fetchCratesIo { 1270 | inherit name version; 1271 | sha256 = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b"; 1272 | }; 1273 | features = builtins.concatLists [ 1274 | ["default"] 1275 | ["std"] 1276 | ]; 1277 | dependencies = { 1278 | itoa = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".itoa."1.0.9" {inherit profileName;}).out; 1279 | ryu = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".ryu."1.0.15" {inherit profileName;}).out; 1280 | serde = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.192" {inherit profileName;}).out; 1281 | }; 1282 | }); 1283 | 1284 | "registry+https://github.com/rust-lang/crates.io-index".serde_test."0.8.23" = overridableMkRustCrate (profileName: rec { 1285 | name = "serde_test"; 1286 | version = "0.8.23"; 1287 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 1288 | src = fetchCratesIo { 1289 | inherit name version; 1290 | sha256 = "110b3dbdf8607ec493c22d5d947753282f3bae73c0f56d322af1e8c78e4c23d5"; 1291 | }; 1292 | dependencies = { 1293 | serde = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."0.8.23" {inherit profileName;}).out; 1294 | }; 1295 | }); 1296 | 1297 | "registry+https://github.com/rust-lang/crates.io-index".static_assertions."1.1.0" = overridableMkRustCrate (profileName: rec { 1298 | name = "static_assertions"; 1299 | version = "1.1.0"; 1300 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 1301 | src = fetchCratesIo { 1302 | inherit name version; 1303 | sha256 = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"; 1304 | }; 1305 | }); 1306 | 1307 | "registry+https://github.com/rust-lang/crates.io-index".strsim."0.10.0" = overridableMkRustCrate (profileName: rec { 1308 | name = "strsim"; 1309 | version = "0.10.0"; 1310 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 1311 | src = fetchCratesIo { 1312 | inherit name version; 1313 | sha256 = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"; 1314 | }; 1315 | }); 1316 | 1317 | "registry+https://github.com/rust-lang/crates.io-index".syn."1.0.109" = overridableMkRustCrate (profileName: rec { 1318 | name = "syn"; 1319 | version = "1.0.109"; 1320 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 1321 | src = fetchCratesIo { 1322 | inherit name version; 1323 | sha256 = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"; 1324 | }; 1325 | features = builtins.concatLists [ 1326 | ["clone-impls"] 1327 | ["default"] 1328 | ["derive"] 1329 | ["full"] 1330 | ["parsing"] 1331 | ["printing"] 1332 | ["proc-macro"] 1333 | ["quote"] 1334 | ]; 1335 | dependencies = { 1336 | proc_macro2 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.69" {inherit profileName;}).out; 1337 | quote = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.33" {inherit profileName;}).out; 1338 | unicode_ident = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".unicode-ident."1.0.12" {inherit profileName;}).out; 1339 | }; 1340 | }); 1341 | 1342 | "registry+https://github.com/rust-lang/crates.io-index".syn."2.0.39" = overridableMkRustCrate (profileName: rec { 1343 | name = "syn"; 1344 | version = "2.0.39"; 1345 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 1346 | src = fetchCratesIo { 1347 | inherit name version; 1348 | sha256 = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a"; 1349 | }; 1350 | features = builtins.concatLists [ 1351 | ["clone-impls"] 1352 | ["default"] 1353 | ["derive"] 1354 | ["parsing"] 1355 | ["printing"] 1356 | ["proc-macro"] 1357 | ["quote"] 1358 | ]; 1359 | dependencies = { 1360 | proc_macro2 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.69" {inherit profileName;}).out; 1361 | quote = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.33" {inherit profileName;}).out; 1362 | unicode_ident = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".unicode-ident."1.0.12" {inherit profileName;}).out; 1363 | }; 1364 | }); 1365 | 1366 | "registry+https://github.com/rust-lang/crates.io-index".termcolor."1.4.0" = overridableMkRustCrate (profileName: rec { 1367 | name = "termcolor"; 1368 | version = "1.4.0"; 1369 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 1370 | src = fetchCratesIo { 1371 | inherit name version; 1372 | sha256 = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449"; 1373 | }; 1374 | dependencies = { 1375 | ${ 1376 | if hostPlatform.isWindows 1377 | then "winapi_util" 1378 | else null 1379 | } = 1380 | (rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi-util."0.1.6" {inherit profileName;}).out; 1381 | }; 1382 | }); 1383 | 1384 | "registry+https://github.com/rust-lang/crates.io-index".textwrap."0.16.0" = overridableMkRustCrate (profileName: rec { 1385 | name = "textwrap"; 1386 | version = "0.16.0"; 1387 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 1388 | src = fetchCratesIo { 1389 | inherit name version; 1390 | sha256 = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d"; 1391 | }; 1392 | }); 1393 | 1394 | "registry+https://github.com/rust-lang/crates.io-index".thiserror."1.0.50" = overridableMkRustCrate (profileName: rec { 1395 | name = "thiserror"; 1396 | version = "1.0.50"; 1397 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 1398 | src = fetchCratesIo { 1399 | inherit name version; 1400 | sha256 = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2"; 1401 | }; 1402 | dependencies = { 1403 | thiserror_impl = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".thiserror-impl."1.0.50" {profileName = "__noProfile";}).out; 1404 | }; 1405 | }); 1406 | 1407 | "registry+https://github.com/rust-lang/crates.io-index".thiserror-impl."1.0.50" = overridableMkRustCrate (profileName: rec { 1408 | name = "thiserror-impl"; 1409 | version = "1.0.50"; 1410 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 1411 | src = fetchCratesIo { 1412 | inherit name version; 1413 | sha256 = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8"; 1414 | }; 1415 | dependencies = { 1416 | proc_macro2 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.69" {inherit profileName;}).out; 1417 | quote = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.33" {inherit profileName;}).out; 1418 | syn = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."2.0.39" {inherit profileName;}).out; 1419 | }; 1420 | }); 1421 | 1422 | "registry+https://github.com/rust-lang/crates.io-index".tinyvec."1.6.0" = overridableMkRustCrate (profileName: rec { 1423 | name = "tinyvec"; 1424 | version = "1.6.0"; 1425 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 1426 | src = fetchCratesIo { 1427 | inherit name version; 1428 | sha256 = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50"; 1429 | }; 1430 | features = builtins.concatLists [ 1431 | ["alloc"] 1432 | ["default"] 1433 | ["tinyvec_macros"] 1434 | ]; 1435 | dependencies = { 1436 | tinyvec_macros = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tinyvec_macros."0.1.1" {inherit profileName;}).out; 1437 | }; 1438 | }); 1439 | 1440 | "registry+https://github.com/rust-lang/crates.io-index".tinyvec_macros."0.1.1" = overridableMkRustCrate (profileName: rec { 1441 | name = "tinyvec_macros"; 1442 | version = "0.1.1"; 1443 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 1444 | src = fetchCratesIo { 1445 | inherit name version; 1446 | sha256 = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"; 1447 | }; 1448 | }); 1449 | 1450 | "registry+https://github.com/rust-lang/crates.io-index".tmux_interface."0.2.1" = overridableMkRustCrate (profileName: rec { 1451 | name = "tmux_interface"; 1452 | version = "0.2.1"; 1453 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 1454 | src = fetchCratesIo { 1455 | inherit name version; 1456 | sha256 = "994f52fd871ec97d0c84c28fcaa717d63636ca1459c4dafb17a97114f3687ab0"; 1457 | }; 1458 | features = builtins.concatLists [ 1459 | ["cmd_alias"] 1460 | ["default"] 1461 | ["tmux_0_8"] 1462 | ["tmux_0_9"] 1463 | ["tmux_1_0"] 1464 | ["tmux_1_1"] 1465 | ["tmux_1_2"] 1466 | ["tmux_1_3"] 1467 | ["tmux_1_4"] 1468 | ["tmux_1_5"] 1469 | ["tmux_1_6"] 1470 | ["tmux_1_7"] 1471 | ["tmux_1_8"] 1472 | ["tmux_1_9"] 1473 | ["tmux_1_9a"] 1474 | ["tmux_2_0"] 1475 | ["tmux_2_1"] 1476 | ["tmux_2_2"] 1477 | ["tmux_2_3"] 1478 | ["tmux_2_4"] 1479 | ["tmux_2_5"] 1480 | ["tmux_2_6"] 1481 | ["tmux_2_7"] 1482 | ["tmux_2_8"] 1483 | ]; 1484 | }); 1485 | 1486 | "registry+https://github.com/rust-lang/crates.io-index".toml."0.5.11" = overridableMkRustCrate (profileName: rec { 1487 | name = "toml"; 1488 | version = "0.5.11"; 1489 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 1490 | src = fetchCratesIo { 1491 | inherit name version; 1492 | sha256 = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234"; 1493 | }; 1494 | features = builtins.concatLists [ 1495 | ["default"] 1496 | ]; 1497 | dependencies = { 1498 | serde = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.192" {inherit profileName;}).out; 1499 | }; 1500 | }); 1501 | 1502 | "registry+https://github.com/rust-lang/crates.io-index".unicode-bidi."0.3.13" = overridableMkRustCrate (profileName: rec { 1503 | name = "unicode-bidi"; 1504 | version = "0.3.13"; 1505 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 1506 | src = fetchCratesIo { 1507 | inherit name version; 1508 | sha256 = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460"; 1509 | }; 1510 | features = builtins.concatLists [ 1511 | ["hardcoded-data"] 1512 | ["std"] 1513 | ]; 1514 | }); 1515 | 1516 | "registry+https://github.com/rust-lang/crates.io-index".unicode-ident."1.0.12" = overridableMkRustCrate (profileName: rec { 1517 | name = "unicode-ident"; 1518 | version = "1.0.12"; 1519 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 1520 | src = fetchCratesIo { 1521 | inherit name version; 1522 | sha256 = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"; 1523 | }; 1524 | }); 1525 | 1526 | "registry+https://github.com/rust-lang/crates.io-index".unicode-normalization."0.1.22" = overridableMkRustCrate (profileName: rec { 1527 | name = "unicode-normalization"; 1528 | version = "0.1.22"; 1529 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 1530 | src = fetchCratesIo { 1531 | inherit name version; 1532 | sha256 = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921"; 1533 | }; 1534 | features = builtins.concatLists [ 1535 | ["std"] 1536 | ]; 1537 | dependencies = { 1538 | tinyvec = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tinyvec."1.6.0" {inherit profileName;}).out; 1539 | }; 1540 | }); 1541 | 1542 | "registry+https://github.com/rust-lang/crates.io-index".url."2.4.1" = overridableMkRustCrate (profileName: rec { 1543 | name = "url"; 1544 | version = "2.4.1"; 1545 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 1546 | src = fetchCratesIo { 1547 | inherit name version; 1548 | sha256 = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5"; 1549 | }; 1550 | features = builtins.concatLists [ 1551 | ["default"] 1552 | ]; 1553 | dependencies = { 1554 | form_urlencoded = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".form_urlencoded."1.2.0" {inherit profileName;}).out; 1555 | idna = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".idna."0.4.0" {inherit profileName;}).out; 1556 | percent_encoding = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".percent-encoding."2.3.0" {inherit profileName;}).out; 1557 | }; 1558 | }); 1559 | 1560 | "registry+https://github.com/rust-lang/crates.io-index".version_check."0.9.4" = overridableMkRustCrate (profileName: rec { 1561 | name = "version_check"; 1562 | version = "0.9.4"; 1563 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 1564 | src = fetchCratesIo { 1565 | inherit name version; 1566 | sha256 = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"; 1567 | }; 1568 | }); 1569 | 1570 | "registry+https://github.com/rust-lang/crates.io-index".walkdir."2.4.0" = overridableMkRustCrate (profileName: rec { 1571 | name = "walkdir"; 1572 | version = "2.4.0"; 1573 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 1574 | src = fetchCratesIo { 1575 | inherit name version; 1576 | sha256 = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee"; 1577 | }; 1578 | dependencies = { 1579 | same_file = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".same-file."1.0.6" {inherit profileName;}).out; 1580 | ${ 1581 | if hostPlatform.isWindows 1582 | then "winapi_util" 1583 | else null 1584 | } = 1585 | (rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi-util."0.1.6" {inherit profileName;}).out; 1586 | }; 1587 | }); 1588 | 1589 | "registry+https://github.com/rust-lang/crates.io-index".wasi."0.11.0+wasi-snapshot-preview1" = overridableMkRustCrate (profileName: rec { 1590 | name = "wasi"; 1591 | version = "0.11.0+wasi-snapshot-preview1"; 1592 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 1593 | src = fetchCratesIo { 1594 | inherit name version; 1595 | sha256 = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"; 1596 | }; 1597 | }); 1598 | 1599 | "registry+https://github.com/rust-lang/crates.io-index".winapi."0.3.9" = overridableMkRustCrate (profileName: rec { 1600 | name = "winapi"; 1601 | version = "0.3.9"; 1602 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 1603 | src = fetchCratesIo { 1604 | inherit name version; 1605 | sha256 = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"; 1606 | }; 1607 | features = builtins.concatLists [ 1608 | ["consoleapi"] 1609 | ["errhandlingapi"] 1610 | ["fileapi"] 1611 | ["knownfolders"] 1612 | ["minwinbase"] 1613 | ["minwindef"] 1614 | ["objbase"] 1615 | ["processenv"] 1616 | ["shlobj"] 1617 | ["std"] 1618 | ["sysinfoapi"] 1619 | ["winbase"] 1620 | ["wincon"] 1621 | ["winerror"] 1622 | ["winnt"] 1623 | ]; 1624 | dependencies = { 1625 | ${ 1626 | if hostPlatform.config == "i686-pc-windows-gnu" 1627 | then "winapi_i686_pc_windows_gnu" 1628 | else null 1629 | } = 1630 | (rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi-i686-pc-windows-gnu."0.4.0" {inherit profileName;}).out; 1631 | ${ 1632 | if hostPlatform.config == "x86_64-pc-windows-gnu" 1633 | then "winapi_x86_64_pc_windows_gnu" 1634 | else null 1635 | } = 1636 | (rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi-x86_64-pc-windows-gnu."0.4.0" {inherit profileName;}).out; 1637 | }; 1638 | }); 1639 | 1640 | "registry+https://github.com/rust-lang/crates.io-index".winapi-i686-pc-windows-gnu."0.4.0" = overridableMkRustCrate (profileName: rec { 1641 | name = "winapi-i686-pc-windows-gnu"; 1642 | version = "0.4.0"; 1643 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 1644 | src = fetchCratesIo { 1645 | inherit name version; 1646 | sha256 = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"; 1647 | }; 1648 | }); 1649 | 1650 | "registry+https://github.com/rust-lang/crates.io-index".winapi-util."0.1.6" = overridableMkRustCrate (profileName: rec { 1651 | name = "winapi-util"; 1652 | version = "0.1.6"; 1653 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 1654 | src = fetchCratesIo { 1655 | inherit name version; 1656 | sha256 = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596"; 1657 | }; 1658 | dependencies = { 1659 | ${ 1660 | if hostPlatform.isWindows 1661 | then "winapi" 1662 | else null 1663 | } = 1664 | (rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi."0.3.9" {inherit profileName;}).out; 1665 | }; 1666 | }); 1667 | 1668 | "registry+https://github.com/rust-lang/crates.io-index".winapi-x86_64-pc-windows-gnu."0.4.0" = overridableMkRustCrate (profileName: rec { 1669 | name = "winapi-x86_64-pc-windows-gnu"; 1670 | version = "0.4.0"; 1671 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 1672 | src = fetchCratesIo { 1673 | inherit name version; 1674 | sha256 = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"; 1675 | }; 1676 | }); 1677 | 1678 | "registry+https://github.com/rust-lang/crates.io-index".windows-sys."0.48.0" = overridableMkRustCrate (profileName: rec { 1679 | name = "windows-sys"; 1680 | version = "0.48.0"; 1681 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 1682 | src = fetchCratesIo { 1683 | inherit name version; 1684 | sha256 = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"; 1685 | }; 1686 | features = builtins.concatLists [ 1687 | ["Win32"] 1688 | ["Win32_Foundation"] 1689 | ["Win32_NetworkManagement"] 1690 | ["Win32_NetworkManagement_IpHelper"] 1691 | ["Win32_Networking"] 1692 | ["Win32_Networking_WinSock"] 1693 | ["Win32_Storage"] 1694 | ["Win32_Storage_FileSystem"] 1695 | ["Win32_System"] 1696 | ["Win32_System_Console"] 1697 | ["Win32_System_Diagnostics"] 1698 | ["Win32_System_Diagnostics_Debug"] 1699 | ["Win32_System_Threading"] 1700 | ["default"] 1701 | ]; 1702 | dependencies = { 1703 | windows_targets = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-targets."0.48.5" {inherit profileName;}).out; 1704 | }; 1705 | }); 1706 | 1707 | "registry+https://github.com/rust-lang/crates.io-index".windows-targets."0.48.5" = overridableMkRustCrate (profileName: rec { 1708 | name = "windows-targets"; 1709 | version = "0.48.5"; 1710 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 1711 | src = fetchCratesIo { 1712 | inherit name version; 1713 | sha256 = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"; 1714 | }; 1715 | dependencies = { 1716 | ${ 1717 | if hostPlatform.config == "aarch64-pc-windows-gnullvm" 1718 | then "windows_aarch64_gnullvm" 1719 | else null 1720 | } = 1721 | (rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_aarch64_gnullvm."0.48.5" {inherit profileName;}).out; 1722 | ${ 1723 | if hostPlatform.parsed.cpu.name == "aarch64" && hostPlatform.parsed.abi.name == "msvc" 1724 | then "windows_aarch64_msvc" 1725 | else null 1726 | } = 1727 | (rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_aarch64_msvc."0.48.5" {inherit profileName;}).out; 1728 | ${ 1729 | if hostPlatform.parsed.cpu.name == "i686" && hostPlatform.parsed.abi.name == "gnu" 1730 | then "windows_i686_gnu" 1731 | else null 1732 | } = 1733 | (rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_i686_gnu."0.48.5" {inherit profileName;}).out; 1734 | ${ 1735 | if hostPlatform.parsed.cpu.name == "i686" && hostPlatform.parsed.abi.name == "msvc" 1736 | then "windows_i686_msvc" 1737 | else null 1738 | } = 1739 | (rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_i686_msvc."0.48.5" {inherit profileName;}).out; 1740 | ${ 1741 | if hostPlatform.parsed.cpu.name == "x86_64" && hostPlatform.parsed.abi.name == "gnu" 1742 | then "windows_x86_64_gnu" 1743 | else null 1744 | } = 1745 | (rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_x86_64_gnu."0.48.5" {inherit profileName;}).out; 1746 | ${ 1747 | if hostPlatform.config == "x86_64-pc-windows-gnullvm" 1748 | then "windows_x86_64_gnullvm" 1749 | else null 1750 | } = 1751 | (rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_x86_64_gnullvm."0.48.5" {inherit profileName;}).out; 1752 | ${ 1753 | if hostPlatform.parsed.cpu.name == "x86_64" && hostPlatform.parsed.abi.name == "msvc" 1754 | then "windows_x86_64_msvc" 1755 | else null 1756 | } = 1757 | (rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_x86_64_msvc."0.48.5" {inherit profileName;}).out; 1758 | }; 1759 | }); 1760 | 1761 | "registry+https://github.com/rust-lang/crates.io-index".windows_aarch64_gnullvm."0.48.5" = overridableMkRustCrate (profileName: rec { 1762 | name = "windows_aarch64_gnullvm"; 1763 | version = "0.48.5"; 1764 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 1765 | src = fetchCratesIo { 1766 | inherit name version; 1767 | sha256 = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"; 1768 | }; 1769 | }); 1770 | 1771 | "registry+https://github.com/rust-lang/crates.io-index".windows_aarch64_msvc."0.48.5" = overridableMkRustCrate (profileName: rec { 1772 | name = "windows_aarch64_msvc"; 1773 | version = "0.48.5"; 1774 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 1775 | src = fetchCratesIo { 1776 | inherit name version; 1777 | sha256 = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"; 1778 | }; 1779 | }); 1780 | 1781 | "registry+https://github.com/rust-lang/crates.io-index".windows_i686_gnu."0.48.5" = overridableMkRustCrate (profileName: rec { 1782 | name = "windows_i686_gnu"; 1783 | version = "0.48.5"; 1784 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 1785 | src = fetchCratesIo { 1786 | inherit name version; 1787 | sha256 = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"; 1788 | }; 1789 | }); 1790 | 1791 | "registry+https://github.com/rust-lang/crates.io-index".windows_i686_msvc."0.48.5" = overridableMkRustCrate (profileName: rec { 1792 | name = "windows_i686_msvc"; 1793 | version = "0.48.5"; 1794 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 1795 | src = fetchCratesIo { 1796 | inherit name version; 1797 | sha256 = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"; 1798 | }; 1799 | }); 1800 | 1801 | "registry+https://github.com/rust-lang/crates.io-index".windows_x86_64_gnu."0.48.5" = overridableMkRustCrate (profileName: rec { 1802 | name = "windows_x86_64_gnu"; 1803 | version = "0.48.5"; 1804 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 1805 | src = fetchCratesIo { 1806 | inherit name version; 1807 | sha256 = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"; 1808 | }; 1809 | }); 1810 | 1811 | "registry+https://github.com/rust-lang/crates.io-index".windows_x86_64_gnullvm."0.48.5" = overridableMkRustCrate (profileName: rec { 1812 | name = "windows_x86_64_gnullvm"; 1813 | version = "0.48.5"; 1814 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 1815 | src = fetchCratesIo { 1816 | inherit name version; 1817 | sha256 = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"; 1818 | }; 1819 | }); 1820 | 1821 | "registry+https://github.com/rust-lang/crates.io-index".windows_x86_64_msvc."0.48.5" = overridableMkRustCrate (profileName: rec { 1822 | name = "windows_x86_64_msvc"; 1823 | version = "0.48.5"; 1824 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 1825 | src = fetchCratesIo { 1826 | inherit name version; 1827 | sha256 = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"; 1828 | }; 1829 | }); 1830 | 1831 | "registry+https://github.com/rust-lang/crates.io-index".yaml-rust."0.4.5" = overridableMkRustCrate (profileName: rec { 1832 | name = "yaml-rust"; 1833 | version = "0.4.5"; 1834 | registry = "registry+https://github.com/rust-lang/crates.io-index"; 1835 | src = fetchCratesIo { 1836 | inherit name version; 1837 | sha256 = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85"; 1838 | }; 1839 | dependencies = { 1840 | linked_hash_map = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".linked-hash-map."0.5.6" {inherit profileName;}).out; 1841 | }; 1842 | }); 1843 | } 1844 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "dmux" 3 | version = "0.6.4" 4 | authors = ["Zachary Thomas "] 5 | edition = "2021" 6 | license = "MIT OR Apache-2.0" 7 | description = "Dmux is a fast and easy tmux workspace opener" 8 | homepage = "https://github.com/zdcthomas/dmux" 9 | repository = "https://github.com/zdcthomas/dmux" 10 | keywords = [ 11 | "search", 12 | "filesystem", 13 | "tmux", 14 | ] 15 | readme = "README.md" 16 | 17 | [profile.release] 18 | codegen-units = 1 19 | 20 | [dependencies] 21 | colored = "2.0.0" 22 | clap = { version = "3.1.18", features = ["derive", "cargo"] } 23 | config = '0.10.1' 24 | dirs = "2.0.2" 25 | grep-cli = "0.1" 26 | regex = '1.3.7' 27 | serde = "1.0.137" 28 | serde_derive = "1.0" 29 | tmux_interface = "0.2.1" 30 | url = '2.1.1' 31 | walkdir = "2" 32 | anyhow = "1.0" 33 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | 2 | The MIT License (MIT) 3 | Copyright (c) 2020 Zachary Thomas 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 18 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 19 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 20 | OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 21 | OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DMUX 2 | ### (*D*evelopment t*MUX*) 3 | ##### new names definitely being considered 4 | 5 | ## What is this? 6 | If you use tmux a lot, then you probably have a script that looks like this: 7 | ```bash 8 | tmux new-window -n $WINDOW_NAME 9 | tmux split-window -h 10 | tmux select-pane -t 0 11 | tmux send-keys "fish" C-m 12 | tmux send-keys "nvim" C-m 13 | tmux select-pane -t 1 14 | tmux send-keys "fish" C-m 15 | tmux resize-pane -R 80 16 | tmux -2 attach-session -t $SESSION 17 | ``` 18 | Scripts like the one above set up and open a tmux session with specified commands and layout. 19 | But if I wanted to have another pane that ran my tests, or another for note taking, I'd have to create an entirely new script. 20 | I also wanted to be able to use some program like [fzf](https://github.com/junegunn/fzf) or [skim](https://github.com/lotabout/skim) to pick a directory to open. 21 | This got super annoying. 22 | 23 | Dmux aims to handle all of this for you. 24 | Its main job is to open up configurable "workspaces" in whatever directory you want. 25 | It also allows you to specify everything you would normally set in a script like the one above. 26 | 27 | For example, the above script using dmux would be: 28 | `dmux -c nvim fish ` 29 | Then if I wanted the workspace to open 3 panes instead of two, I could add: 30 | `dmux -c nvim fish "npm i" -p 3 ` 31 | 32 | But say I wanted to use [fzf](https://github.com/junegunn/fzf) to select a dir to open up. 33 | Well, if I have it installed on my system, then I just have to leave off the argument and dmux will automatically open an [fzf](https://github.com/junegunn/fzf) selector, populated with directories to choose from. 34 | 35 | If this part is a bit slow to get started, no worries, you can speed up the dir searching by installing [fd](https://github.com/sharkdp/fd). 36 | 37 | You can also use whatever combination of dir searching, selector, or hardcoded path you want by piping a path into dmux: 38 | `fd -td | fzf | dmux` 39 | or having a path argument: 40 | `dmux ` 41 | 42 | ## Why another Tmux Manager? 43 | There's a ton of other fantastic projects out there that also do similar things that you should check out: 44 | * [tmuxinator](https://github.com/tmuxinator/tmuxinator) 45 | * [tmuxomatic](https://github.com/oxidane/tmuxomatic) - Unmaintained 46 | * [teamocil](https://github.com/remi/teamocil) - Unmaintained 47 | 48 | #### So Why did I put together Dmux? 49 | * Dmux is a single binary that doesn't depend on a language to run. 50 | * Other tools (like potentially the most popular manager [tmuxinator](https://github.com/tmuxinator/tmuxinator)) are based around a system of "projects" which have a specific root directory. This makes it difficult to reuse these configurations. Dmux on the other hand is based around directory agnostic profiles that can be run on any root directory. 51 | * Because of dmux being agnostic of root dir, it also focuses on quickly selecting and opening directories. You can easily set up selection scripts to pipe a dir into dmux, or if you have fzf installed dmux will use that when run without arguments to let you select a dir. 52 | * These 'profiles' also mix very well with command line arguments (all workspace settings can be set on either) and can therefore be easily extended in scripts or bindings. 53 | 54 | ## Installation 55 | 56 | ##### macOS 57 | ``` bash 58 | brew tap zdcthomas/tools 59 | brew install dmux 60 | ``` 61 | 62 | Or if you have rust installed 63 | ``` bash 64 | cargo install dmux 65 | ``` 66 | 67 | ##### AUR 68 | ``` 69 | Coming soon 70 | ``` 71 | 72 | ## Usage 73 | * `dmux` alone will use `fzf` to open up a list of dirs in `~`. This is equivalent to saying `fd -td . ~/ | fzf | dmux` 74 | * `dmux ` or ` | dmux` will open the workspace in the provided path 75 | * `dmux clone` will clone a git repo and open the repo in a workspace 76 | * `dmux layout` will describe the current Tmux layout. This uses the tmux layout representation 77 | * `dmux --help` for more information 78 | 79 | 80 | ## Configuration 81 | Dmux's configuration tries to be very inclusive in terms of config file types. Dmux supports 82 | `JSON, YAML, TOML,` and ` HJSON`. It also supports a variety of paths including 83 | `~/.dmux.conf.{file_type}` 84 | `~/.config/dmux/dmux.conf.{file_type}` 85 | and on Linux 86 | `$XDG_CONFIG_HOME/dmux/dmux.conf.{file_type}` 87 | 88 | #### Example Configuration File 89 | This config file has a profile named `javascript` and defaults set 90 | ##### TOML 91 | ```toml 92 | layout = "5e09,281x67,0,0{133x67,0,0,17,147x67,134,0[147x33,134,0,18,147x33,134,34{73x33,134,34,136,73x33,208,34[73x16,208,34,164,73x16,208,51,165]}]}" 93 | session_name = "development" 94 | number_of_panes = 5 95 | commands = ["nvim", "fish"] 96 | 97 | [javascript] 98 | number_of_panes = 3 99 | session_name = "frontend" 100 | commands = ["nvim", "fish", "yarn watch"] 101 | ``` 102 | 103 | ## External deps 104 | Currently dmux relies on [fzf](https://github.com/junegunn/fzf) to select a target dir to open the workspace in. 105 | If you have [fd](https://github.com/sharkdp/fd) installed dmux will use it to speed up dir searching. 106 | 107 | ## Potential features 108 | - [X] Config file to be read on startup 109 | - [X] Args for layout string 110 | - [X] Profiles in config that represent sets of configuration. 111 | - [X] Config/Arg for dir search command 112 | - [X] Optionally uses fd for a faster/async dir search 113 | - [X] Subcommand to describe current layout 114 | - [ ] Subcommand for killing windows from fzf 115 | - [ ] Subcommand for generating default configuration file 116 | - [ ] Config/Arg for dir search depth 117 | - [ ] One-off commands that once completed, kill the pane they're in, E.G `npm i` or `mix deps.get` 118 | - [ ] dmux.local.{yml|json|toml} file so that specific dirs can have specific layouts. This is dangerous because dmux allows config to run arbitrary commands, which could be used to be malicious 119 | - [ ] Switch to skim to avoid external deps 120 | 121 | 122 | ## Bugs 123 | #### please submit bugs as issues and I'll add them here 124 | -------------------------------------------------------------------------------- /default.nix: -------------------------------------------------------------------------------- 1 | (import ( 2 | fetchTarball { 3 | url = "https://github.com/edolstra/flake-compat/archive/99f1c2157fba4bfe6211a321fd0ee43199025dbf.tar.gz"; 4 | sha256 = "0x2jn3vrawwv9xp15674wjz9pixwjyj3j771izayl962zziivbx2"; } 5 | ) { 6 | src = ./.; 7 | }).defaultNix 8 | -------------------------------------------------------------------------------- /flake.lock: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": { 3 | "cargo2nix": { 4 | "inputs": { 5 | "flake-compat": "flake-compat", 6 | "flake-utils": [ 7 | "flake-utils" 8 | ], 9 | "nixpkgs": [ 10 | "nixpkgs" 11 | ], 12 | "rust-overlay": [ 13 | "rust-overlay" 14 | ] 15 | }, 16 | "locked": { 17 | "lastModified": 1699033427, 18 | "narHash": "sha256-OVtd5IPbb4NvHibN+QvMrMxq7aZN5GFoINZSAXKjUdA=", 19 | "owner": "cargo2nix", 20 | "repo": "cargo2nix", 21 | "rev": "c6f33051f412352f293e738cc8da6fd4c457080f", 22 | "type": "github" 23 | }, 24 | "original": { 25 | "owner": "cargo2nix", 26 | "ref": "release-0.11.0", 27 | "repo": "cargo2nix", 28 | "type": "github" 29 | } 30 | }, 31 | "flake-compat": { 32 | "flake": false, 33 | "locked": { 34 | "lastModified": 1696426674, 35 | "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", 36 | "owner": "edolstra", 37 | "repo": "flake-compat", 38 | "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", 39 | "type": "github" 40 | }, 41 | "original": { 42 | "owner": "edolstra", 43 | "repo": "flake-compat", 44 | "type": "github" 45 | } 46 | }, 47 | "flake-utils": { 48 | "inputs": { 49 | "systems": "systems" 50 | }, 51 | "locked": { 52 | "lastModified": 1694529238, 53 | "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", 54 | "owner": "numtide", 55 | "repo": "flake-utils", 56 | "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", 57 | "type": "github" 58 | }, 59 | "original": { 60 | "owner": "numtide", 61 | "repo": "flake-utils", 62 | "type": "github" 63 | } 64 | }, 65 | "flake-utils_2": { 66 | "inputs": { 67 | "systems": "systems_2" 68 | }, 69 | "locked": { 70 | "lastModified": 1681202837, 71 | "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", 72 | "owner": "numtide", 73 | "repo": "flake-utils", 74 | "rev": "cfacdce06f30d2b68473a46042957675eebb3401", 75 | "type": "github" 76 | }, 77 | "original": { 78 | "owner": "numtide", 79 | "repo": "flake-utils", 80 | "type": "github" 81 | } 82 | }, 83 | "naersk": { 84 | "inputs": { 85 | "nixpkgs": "nixpkgs" 86 | }, 87 | "locked": { 88 | "lastModified": 1694081375, 89 | "narHash": "sha256-vzJXOUnmkMCm3xw8yfPP5m8kypQ3BhAIRe4RRCWpzy8=", 90 | "owner": "nix-community", 91 | "repo": "naersk", 92 | "rev": "3f976d822b7b37fc6fb8e6f157c2dd05e7e94e89", 93 | "type": "github" 94 | }, 95 | "original": { 96 | "owner": "nix-community", 97 | "ref": "master", 98 | "repo": "naersk", 99 | "type": "github" 100 | } 101 | }, 102 | "nixpkgs": { 103 | "locked": { 104 | "lastModified": 1693060755, 105 | "narHash": "sha256-KNsbfqewEziFJEpPR0qvVz4rx0x6QXxw1CcunRhlFdk=", 106 | "path": "/nix/store/avigrjgxz0cyi5niyj0jm0a7xgpdd90h-source", 107 | "rev": "c66ccfa00c643751da2fd9290e096ceaa30493fc", 108 | "type": "path" 109 | }, 110 | "original": { 111 | "id": "nixpkgs", 112 | "type": "indirect" 113 | } 114 | }, 115 | "nixpkgs_2": { 116 | "locked": { 117 | "lastModified": 1692463654, 118 | "narHash": "sha256-F8hZmsQINI+S6UROM4jyxAMbQLtzE44pI8Nk6NtMdao=", 119 | "owner": "NixOS", 120 | "repo": "nixpkgs", 121 | "rev": "ca3c9ac9f4cdd4bea19f592b32bb59b74ab7d783", 122 | "type": "github" 123 | }, 124 | "original": { 125 | "owner": "NixOS", 126 | "ref": "nixpkgs-unstable", 127 | "repo": "nixpkgs", 128 | "type": "github" 129 | } 130 | }, 131 | "nixpkgs_3": { 132 | "locked": { 133 | "lastModified": 1681358109, 134 | "narHash": "sha256-eKyxW4OohHQx9Urxi7TQlFBTDWII+F+x2hklDOQPB50=", 135 | "owner": "NixOS", 136 | "repo": "nixpkgs", 137 | "rev": "96ba1c52e54e74c3197f4d43026b3f3d92e83ff9", 138 | "type": "github" 139 | }, 140 | "original": { 141 | "owner": "NixOS", 142 | "ref": "nixpkgs-unstable", 143 | "repo": "nixpkgs", 144 | "type": "github" 145 | } 146 | }, 147 | "root": { 148 | "inputs": { 149 | "cargo2nix": "cargo2nix", 150 | "flake-utils": "flake-utils", 151 | "naersk": "naersk", 152 | "nixpkgs": "nixpkgs_2", 153 | "rust-overlay": "rust-overlay" 154 | } 155 | }, 156 | "rust-overlay": { 157 | "inputs": { 158 | "flake-utils": "flake-utils_2", 159 | "nixpkgs": "nixpkgs_3" 160 | }, 161 | "locked": { 162 | "lastModified": 1696817516, 163 | "narHash": "sha256-Xt9OY4Wnk9/vuUfA0OHFtmSlaen5GyiS9msgwOz3okI=", 164 | "owner": "oxalica", 165 | "repo": "rust-overlay", 166 | "rev": "c0df7f2a856b5ff27a3ce314f6d7aacf5fda546f", 167 | "type": "github" 168 | }, 169 | "original": { 170 | "owner": "oxalica", 171 | "repo": "rust-overlay", 172 | "type": "github" 173 | } 174 | }, 175 | "systems": { 176 | "locked": { 177 | "lastModified": 1681028828, 178 | "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", 179 | "owner": "nix-systems", 180 | "repo": "default", 181 | "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", 182 | "type": "github" 183 | }, 184 | "original": { 185 | "owner": "nix-systems", 186 | "repo": "default", 187 | "type": "github" 188 | } 189 | }, 190 | "systems_2": { 191 | "locked": { 192 | "lastModified": 1681028828, 193 | "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", 194 | "owner": "nix-systems", 195 | "repo": "default", 196 | "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", 197 | "type": "github" 198 | }, 199 | "original": { 200 | "owner": "nix-systems", 201 | "repo": "default", 202 | "type": "github" 203 | } 204 | } 205 | }, 206 | "root": "root", 207 | "version": 7 208 | } 209 | -------------------------------------------------------------------------------- /flake.nix: -------------------------------------------------------------------------------- 1 | { 2 | inputs = { 3 | naersk.url = "github:nix-community/naersk/master"; 4 | nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; 5 | flake-utils.url = "github:numtide/flake-utils"; 6 | rust-overlay.url = "github:oxalica/rust-overlay"; 7 | cargo2nix = { 8 | url = "github:cargo2nix/cargo2nix/release-0.11.0"; 9 | inputs.nixpkgs.follows = "nixpkgs"; 10 | inputs.flake-utils.follows = "flake-utils"; 11 | inputs.rust-overlay.follows = "rust-overlay"; 12 | }; 13 | }; 14 | 15 | outputs = { 16 | naersk, 17 | nixpkgs, 18 | rust-overlay, 19 | self, 20 | flake-utils, 21 | cargo2nix, 22 | }: 23 | flake-utils.lib.eachDefaultSystem (system: let 24 | overlays = [cargo2nix.overlays.default]; 25 | pkgs = (import nixpkgs) {inherit system overlays;}; 26 | workspaceShell = rustPkgs.workspaceShell { 27 | # This adds cargo2nix to the project shell via the cargo2nix flake 28 | packages = [cargo2nix.packages."${system}".cargo2nix]; 29 | }; 30 | rustPkgs = pkgs.rustBuilder.makePackageSet { 31 | packageFun = import ./Cargo.nix; 32 | rustVersion = "1.73.0"; 33 | extraRustComponents = [ 34 | "rust-analyzer" 35 | "clippy" 36 | ]; 37 | }; 38 | in rec { 39 | devShells = { 40 | default = workspaceShell; # nix develop 41 | }; 42 | packages = { 43 | dmux = (rustPkgs.workspace.dmux {}).bin; 44 | default = packages.dmux; 45 | }; 46 | apps = rec { 47 | dmux = { 48 | type = "app"; 49 | program = "${packages.default}/bin/dmux"; 50 | }; 51 | default = dmux; 52 | }; 53 | }); 54 | } 55 | -------------------------------------------------------------------------------- /release.sh: -------------------------------------------------------------------------------- 1 | args="$@" 2 | version=${args[0]} 3 | targets=("x86_64-apple-darwin") 4 | files="" 5 | 6 | git push 7 | 8 | for target in $targets 9 | do 10 | echo building for $target 11 | cargo build --release --target $target 12 | artifact=./target/$target/release/dmux 13 | shasum=$(shasum --algorithm 256 $artifact) 14 | files="$files -a $artifact#dmux-$version-$target.tar.gz" 15 | echo "sha256" 16 | echo "$shasum" 17 | done 18 | echo $files 19 | 20 | hub release create $files -m $version --edit $version 21 | -------------------------------------------------------------------------------- /rust-toolchain.toml: -------------------------------------------------------------------------------- 1 | [toolchain] 2 | channel = "stable" 3 | components = [ "rustfmt", "rustc", "rust-src", "rust-analyzer", "cargo", "clippy" ] 4 | profile = "minimal" 5 | -------------------------------------------------------------------------------- /shell.nix: -------------------------------------------------------------------------------- 1 | (import ( 2 | fetchTarball { 3 | url = "https://github.com/edolstra/flake-compat/archive/99f1c2157fba4bfe6211a321fd0ee43199025dbf.tar.gz"; 4 | sha256 = "0x2jn3vrawwv9xp15674wjz9pixwjyj3j771izayl962zziivbx2"; } 5 | ) { 6 | src = ./.; 7 | }).shellNix 8 | -------------------------------------------------------------------------------- /src/app.rs: -------------------------------------------------------------------------------- 1 | use anyhow::Result; 2 | use clap::{crate_authors, crate_description, crate_name, crate_version, Arg}; 3 | 4 | use std::fs::canonicalize; 5 | use std::io; 6 | use std::path::PathBuf; 7 | use std::process::{Command, Stdio}; 8 | // const DEFAULT_LAYOUT: &str = "34ed,230x56,0,0{132x56,0,0,3,97x56,133,0,222}"; 9 | 10 | fn args() -> clap::ArgMatches { 11 | let fzf_available = Command::new("fzf") 12 | .arg("--version") 13 | .stdout(Stdio::null()) 14 | .stderr(Stdio::null()) 15 | .spawn() 16 | .is_ok(); 17 | clap::Command::new(crate_name!()) 18 | .version(crate_version!()) 19 | .author(crate_authors!()) 20 | .about(crate_description!()) 21 | .arg( 22 | Arg::new("selected_dir") 23 | .help("Open this directory directly without starting a selector") 24 | .takes_value(true) 25 | // if fzf isn't available, this needs to be specified 26 | .required(!fzf_available), 27 | ) 28 | .arg( 29 | Arg::new("session_name") 30 | .short('s') 31 | .long("session_name") 32 | .help("specify a specific session name to run") 33 | .takes_value(true), 34 | ) 35 | .arg( 36 | Arg::new("window_name") 37 | .short('w') 38 | .long("window") 39 | .help("specify the window name") 40 | .takes_value(true), 41 | ) 42 | .arg( 43 | Arg::new("number_of_panes") 44 | .short('p') 45 | .long("panes") 46 | .help("the number of panes to generate.") 47 | .takes_value(true), 48 | ) 49 | .arg( 50 | Arg::new("commands") 51 | .short('c') 52 | .multiple_values(true) 53 | .long("commands") 54 | .help("commands to run in panes") 55 | .long_help(commands_long_help().as_str()) 56 | .takes_value(true), 57 | ) 58 | .arg( 59 | // We should use validator here 60 | Arg::new("layout") 61 | .short('l') 62 | .long("layout") 63 | .help("specify the window layout (layouts are dependent on the number of panes)") 64 | .long_help(layout_long_help().as_str()) 65 | .takes_value(true), 66 | ) 67 | .arg( 68 | Arg::new("profile") 69 | .short('P') 70 | .long("profile") 71 | .help("Use a different configuration profile.") 72 | .takes_value(true), 73 | ) 74 | .arg( 75 | Arg::new("search_dir") 76 | .short('d') 77 | .long("dir") 78 | .help("override of the dir to select from.") 79 | .takes_value(true), 80 | ) 81 | .subcommand( 82 | clap::Command::new("clone") 83 | .about("clones a git repository, and then opens a workspace in the repo") 84 | .arg( 85 | Arg::new("repo") 86 | .help("specifies the repo to clone from") 87 | .required(true), 88 | ) 89 | .arg( 90 | Arg::new("name") 91 | .short('n') 92 | .long("name") 93 | .help("sets the local name for the cloned repo") 94 | .takes_value(true), 95 | ), 96 | ) 97 | .subcommand( 98 | clap::Command::new("layout").about("generates the current layout string from tmux"), 99 | ) 100 | .get_matches() 101 | } 102 | 103 | fn layout_long_help() -> String { 104 | format!( 105 | "This string is the same representation that 106 | tmux itself uses to setup it's own layouts. 107 | Use `{} layout` to generate the layout string 108 | for the current tmux configuration. This is 109 | equivalent to running 110 | 111 | ` 112 | tmux list-windows -F \"#{{window_active}} #{{window_layout}}\" 113 | | grep \"^1\" 114 | | cut -d \" \" -f 2 115 | ` 116 | ", 117 | crate_name!() 118 | ) 119 | } 120 | 121 | fn commands_long_help() -> String { 122 | format!( 123 | "This argument, like it's config file equivalent, 124 | is a list of commands. These commands will 125 | be run in the panes of the tmux window that 126 | will be opened by {:?}. The commands index 127 | (beginning with 0) corresponds to the pane 128 | id. Pane id's can be found easily with 129 | `q` in tmux. 130 | ", 131 | crate_name!() 132 | ) 133 | } 134 | 135 | fn default_search_dir() -> PathBuf { 136 | dirs::home_dir().unwrap() 137 | } 138 | 139 | fn default_layout_checksum() -> String { 140 | "34ed,230x56,0,0{132x56,0,0,3,97x56,133,0,222}".to_string() 141 | } 142 | 143 | fn default_session_name() -> String { 144 | "dev".to_string() 145 | } 146 | 147 | fn default_number_of_panes() -> u8 { 148 | 2 149 | } 150 | 151 | fn default_commands() -> Vec { 152 | vec!["vim".to_string(), "ls".to_string()] 153 | } 154 | 155 | fn default_window_name() -> Option { 156 | None 157 | } 158 | 159 | fn config_file_settings() -> Result { 160 | // switch to confy perobably 161 | let default = WorkSpaceArgs::default(); 162 | let mut settings = config::Config::default(); 163 | let mut config_conf = 164 | dirs::config_dir().ok_or_else(|| anyhow!("Config dir couldn't be read"))?; 165 | config_conf.push("dmux/dmux.conf.xxxx"); 166 | 167 | let mut home_conf = 168 | dirs::home_dir().ok_or_else(|| anyhow!("Home directory couldn't be found"))?; 169 | home_conf.push(".dmux.conf.xxxx"); 170 | 171 | let mut mac_config = 172 | dirs::home_dir().ok_or_else(|| anyhow!("Home directory couldn't be found"))?; 173 | mac_config.push(".config/dmux/dmux.conf.xxx"); 174 | Ok(settings 175 | // ~/dmux.conf.(yaml | json | toml) 176 | .merge(config::File::with_name(config_conf.to_str().unwrap()).required(false))? 177 | // ~/{xdg_config|.config}dmux.conf.(yaml | json | toml) 178 | .merge(config::File::with_name(home_conf.to_str().unwrap()).required(false))? 179 | .merge(config::File::with_name(mac_config.to_str().unwrap()).required(false))? 180 | // Add in settings from the environment (with a prefix of DMUX) 181 | // Eg.. `DMUX_SESSION_NAME=foo dmux` would set the `session_name` key 182 | .merge(config::Environment::with_prefix("DMUX"))? 183 | .set_default("layout", default.layout)? 184 | // the trait `std::convert::From` is not implemented for `config::value::ValueKind` 185 | .set_default("number_of_panes", default.number_of_panes as i64)? 186 | .set_default("commands", default.commands)? 187 | .set_default("session_name", default.session_name)? 188 | .to_owned()) 189 | } 190 | 191 | fn settings_config(settings: config::Config, target: Option<&str>) -> Result { 192 | if let Some(target) = target { 193 | let profile: WorkSpaceArgs = settings.get(target)?; 194 | return Ok(profile); 195 | } 196 | let profile: WorkSpaceArgs = settings.try_into()?; 197 | Ok(profile) 198 | } 199 | 200 | pub struct SelectArgs { 201 | pub workspace: WorkSpaceArgs, 202 | } 203 | 204 | pub enum CommandType { 205 | // Open a given selected dir passed in either through stdin or args 206 | Open(OpenArgs), 207 | // Select workspace dir from a fuzzy finder 208 | Select(SelectArgs), 209 | // Pull a repo from a git repository and then open that dir 210 | Pull(PullArgs), 211 | // Generate a tmux layout for the setup of panes in the current window 212 | Layout, 213 | } 214 | 215 | // I don't like the repetition here 216 | #[derive(Deserialize, Debug)] 217 | pub struct WorkSpaceArgs { 218 | #[serde(default = "default_layout_checksum")] 219 | pub layout: String, 220 | #[serde(default = "default_session_name")] 221 | pub session_name: String, 222 | #[serde(default = "default_number_of_panes")] 223 | pub number_of_panes: u8, 224 | #[serde(default = "default_search_dir")] 225 | pub search_dir: PathBuf, 226 | #[serde(default = "default_commands")] 227 | pub commands: Vec, 228 | #[serde(default = "default_window_name")] 229 | pub window_name: Option, 230 | } 231 | 232 | impl Default for WorkSpaceArgs { 233 | fn default() -> Self { 234 | Self { 235 | window_name: None, 236 | layout: default_layout_checksum(), 237 | session_name: default_session_name(), 238 | number_of_panes: default_number_of_panes(), 239 | search_dir: dirs::home_dir().unwrap(), 240 | commands: default_commands(), 241 | } 242 | } 243 | } 244 | 245 | pub struct OpenArgs { 246 | pub workspace: WorkSpaceArgs, 247 | pub selected_dir: PathBuf, 248 | } 249 | 250 | #[derive(Debug)] 251 | pub struct PullArgs { 252 | pub repo_url: String, 253 | pub target_dir: PathBuf, 254 | pub workspace: WorkSpaceArgs, 255 | } 256 | 257 | fn read_line_iter() -> Result { 258 | let mut input = String::new(); 259 | io::stdin().read_line(&mut input)?; 260 | Ok(input.trim().to_string()) 261 | } 262 | 263 | fn select_dir(args: &clap::ArgMatches) -> Option { 264 | if let Ok(selected_dir) = args.value_of_t::("selected_dir") { 265 | Some(selected_dir) 266 | } else if grep_cli::is_readable_stdin() && !grep_cli::is_tty_stdin() { 267 | if let Ok(path) = read_line_iter() { 268 | Some(PathBuf::from(path)) 269 | } else { 270 | None 271 | } 272 | } else { 273 | None 274 | } 275 | } 276 | 277 | fn build_workspace_args(args: &clap::ArgMatches) -> Result { 278 | let settings = config_file_settings()?; 279 | let conf_from_settings = settings_config(settings, args.value_of("profile"))?; 280 | let search_dir = args 281 | .value_of_t::("search_dir") 282 | .unwrap_or(conf_from_settings.search_dir); 283 | Ok(WorkSpaceArgs { 284 | window_name: args.value_of_t::("window_name").ok(), 285 | session_name: args 286 | .value_of_t::("session_name") 287 | .unwrap_or(conf_from_settings.session_name), 288 | layout: args 289 | .value_of_t::("layout") 290 | .unwrap_or(conf_from_settings.layout), 291 | number_of_panes: args 292 | .value_of_t::("number_of_panes") 293 | .unwrap_or(conf_from_settings.number_of_panes), 294 | commands: args 295 | .values_of_t::("commands") 296 | .unwrap_or(conf_from_settings.commands), 297 | search_dir, 298 | }) 299 | } 300 | 301 | fn expand_selected_dir(path: PathBuf) -> Result { 302 | if path == PathBuf::from(".") { 303 | Ok(std::env::current_dir()?) 304 | } else { 305 | Ok(path) 306 | } 307 | } 308 | 309 | pub fn build_app() -> Result { 310 | let args = args(); 311 | let workspace = build_workspace_args(&args)?; 312 | match args.subcommand_name() { 313 | None => { 314 | if let Some(selected_dir) = select_dir(&args) { 315 | Ok(CommandType::Open(OpenArgs { 316 | workspace, 317 | selected_dir: expand_selected_dir(canonicalize(selected_dir)?)?, 318 | })) 319 | } else { 320 | Ok(CommandType::Select(SelectArgs { workspace })) 321 | } 322 | } 323 | Some("clone") => { 324 | let repo_url = args 325 | .subcommand_matches("clone") 326 | .ok_or_else(|| anyhow!("Problem reading clones"))? 327 | .value_of("repo") 328 | .ok_or_else(|| anyhow!("No repo specified, what should I clone?"))? 329 | .to_owned(); 330 | Ok(CommandType::Pull(PullArgs { 331 | repo_url, 332 | target_dir: args 333 | .value_of_t::("target_dir") 334 | .unwrap_or_else(|_| dirs::home_dir().unwrap()), 335 | workspace, 336 | })) 337 | } 338 | 339 | Some("layout") => Ok(CommandType::Layout), 340 | Some(_) => Err(anyhow!("unexpected subcommand")), 341 | } 342 | } 343 | -------------------------------------------------------------------------------- /src/files.rs: -------------------------------------------------------------------------------- 1 | use std::path::PathBuf; 2 | use walkdir::{DirEntry, WalkDir}; 3 | 4 | fn is_git_dir(entry: &DirEntry) -> bool { 5 | if let Some(file_name) = entry.file_name().to_str() { 6 | return file_name.contains(&"git"); 7 | } else { 8 | return false; 9 | } 10 | } 11 | 12 | pub fn all_dirs_in_path(search_dir: PathBuf) -> Result { 13 | let mut path_input = String::new(); 14 | for entry in WalkDir::new(search_dir) 15 | .max_depth(4) 16 | .into_iter() 17 | .filter_entry(|e| e.file_type().is_dir() && !is_git_dir(e)) 18 | { 19 | if let Ok(path) = entry { 20 | path_input.push_str("\n"); 21 | path_input.push_str(path.path().to_str()?); 22 | } 23 | } 24 | return Ok(path_input); 25 | } 26 | 27 | // Note, i really want to just go and steal what i need from fd 28 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | #[macro_use] 2 | extern crate serde_derive; 3 | #[macro_use] 4 | extern crate anyhow; 5 | 6 | mod app; 7 | mod select; 8 | mod tmux; 9 | 10 | use anyhow::Result; 11 | use app::CommandType; 12 | use colored::*; 13 | use select::Selector; 14 | use std::path::PathBuf; 15 | use std::process::{Command, Stdio}; 16 | use tmux::WorkSpace; 17 | use url::Url; 18 | 19 | fn main() { 20 | if let Err(err) = run_command() { 21 | eprintln!("{}: {}", "Error".red(), err); 22 | err.chain() 23 | .skip(1) 24 | .for_each(|cause| eprintln!("because: {}", cause)); 25 | std::process::exit(1); 26 | } 27 | } 28 | 29 | fn run_command() -> Result<()> { 30 | let command = app::build_app()?; 31 | 32 | if !tmux::has_tmux() { 33 | return Err(anyhow!("Tmux is not installed.")); 34 | } 35 | match command { 36 | CommandType::Open(open_config) => open_selected_dir(open_config), 37 | CommandType::Select(select_config) => { 38 | match Selector::new(&select_config.workspace.search_dir).select_dir()? { 39 | Some(dir) => open_selected_dir(app::OpenArgs { 40 | selected_dir: dir, 41 | workspace: select_config.workspace, 42 | }), 43 | None => Ok(()), 44 | } 45 | } 46 | CommandType::Pull(pull_config) => match clone_from(&pull_config) { 47 | Ok(dir) => open_selected_dir(app::OpenArgs { 48 | selected_dir: dir, 49 | workspace: pull_config.workspace, 50 | }), 51 | Err(err) => Err(err), 52 | }, 53 | CommandType::Layout => { 54 | if !tmux::in_tmux() { 55 | return Err(anyhow!("Not inside a tmux session. Run `tmux a` and select the window you want the layout of.")); 56 | }; 57 | tmux::generate_layout() 58 | } 59 | } 60 | } 61 | 62 | fn open_selected_dir(config: app::OpenArgs) -> Result<()> { 63 | if !config.selected_dir.exists() { 64 | return Err(anyhow!("{:?} isn't a valid path", config.selected_dir)); 65 | } 66 | tmux::setup_workspace(WorkSpace { 67 | commands: config.workspace.commands, 68 | path: config.selected_dir, 69 | session_name: config.workspace.session_name, 70 | format_checksum: config.workspace.layout, 71 | window_name: config.workspace.window_name, 72 | number_of_panes: config.workspace.number_of_panes, 73 | }); 74 | Ok(()) 75 | } 76 | 77 | fn git_url_to_dir_name(git_url: &str) -> Result { 78 | if let Ok(url) = Url::parse(git_url) { 79 | Ok(url 80 | .path_segments() 81 | .ok_or_else(|| anyhow!("cannot be base"))? 82 | .last() 83 | .ok_or_else(|| anyhow!("no segments"))? 84 | .replace(".git", "")) 85 | } else { 86 | Ok(git_url 87 | .split('/') 88 | .last() 89 | .ok_or_else(|| anyhow!("I don't know how to parse a dir from {:?}", git_url))? 90 | .replace(".git", "")) 91 | } 92 | } 93 | 94 | fn clone_from(config: &app::PullArgs) -> Result { 95 | let dir_name = git_url_to_dir_name(&config.repo_url)?; 96 | let target = config.target_dir.join(dir_name); 97 | let output = Command::new("git") 98 | .arg("clone") 99 | .arg(config.repo_url.as_str()) 100 | .arg( 101 | target 102 | .to_str() 103 | .ok_or_else(|| anyhow!("Specified target couldn't be used {:?}", target))?, 104 | ) 105 | .stdout(Stdio::inherit()) 106 | .output()?; 107 | if output.status.success() { 108 | Ok(target) 109 | } else { 110 | Err(anyhow!("{}", String::from_utf8(output.stderr)?)) 111 | } 112 | } 113 | 114 | // fn path_to_string(path: &Path) -> Result { 115 | // Ok(path 116 | // .to_str() 117 | // .ok_or_else(|| anyhow!("Invalid file"))? 118 | // .to_string()) 119 | // } 120 | 121 | // fn path_to_window_name(path: &Path) -> Result { 122 | // let file_str = path 123 | // .file_name() 124 | // .ok_or_else(|| anyhow!("No file name found"))? 125 | // .to_str() 126 | // .ok_or_else(|| anyhow!("Invalid file")); 127 | 128 | // Ok(String::from(file_str?)) 129 | // } 130 | 131 | #[test] 132 | fn git_url_to_dir_name_test() { 133 | assert_eq!( 134 | "dmux".to_string(), 135 | git_url_to_dir_name("https://github.com/zdcthomas/dmux").unwrap() 136 | ); 137 | assert_eq!( 138 | "dmux".to_string(), 139 | git_url_to_dir_name("git@github.com:zdcthomas/dmux.git").unwrap() 140 | ); 141 | } 142 | -------------------------------------------------------------------------------- /src/select.rs: -------------------------------------------------------------------------------- 1 | use anyhow::Result; 2 | use std::io::Write; 3 | use std::path::PathBuf; 4 | use std::process::{Command, Output, Stdio}; 5 | use walkdir::{DirEntry, WalkDir}; 6 | 7 | fn is_git_dir(entry: &DirEntry) -> bool { 8 | if let Some(file_name) = entry.file_name().to_str() { 9 | file_name.contains(&"git") 10 | } else { 11 | false 12 | } 13 | } 14 | 15 | fn all_dirs_in_path(search_dir: &PathBuf) -> String { 16 | let mut path_input = String::new(); 17 | for entry in WalkDir::new(search_dir) 18 | .max_depth(4) 19 | .into_iter() 20 | .filter_entry(|e| e.file_type().is_dir() && !is_git_dir(e)) 21 | { 22 | if let Ok(path) = entry { 23 | path_input.push_str("\n"); 24 | path_input.push_str(path.path().to_str().unwrap()); 25 | } 26 | } 27 | path_input 28 | } 29 | 30 | pub struct Selector { 31 | search_dir: PathBuf, 32 | use_fd: bool, 33 | } 34 | 35 | fn output_to_pathbuf(output: Output) -> Option { 36 | if output.status.success() { 37 | let mut stdout = output.stdout; 38 | // removes trailing newline, probably a better way to do this 39 | stdout.pop(); 40 | let path: PathBuf = String::from_utf8(stdout).unwrap().parse().unwrap(); 41 | Some(path) 42 | } else { 43 | // Err(anyhow!("Couldn't parse path from {:?}", output.stdout)) 44 | None 45 | } 46 | } 47 | 48 | impl Selector { 49 | pub fn new(search_dir: &PathBuf) -> Selector { 50 | let use_fd = Command::new("fd") 51 | .arg("--version") 52 | .stdout(Stdio::null()) 53 | .spawn() 54 | .is_ok(); 55 | Selector { 56 | search_dir: search_dir.to_owned(), 57 | use_fd, 58 | } 59 | } 60 | 61 | fn select_with_fd(&self) -> Result> { 62 | let mut fd = Command::new("fd") 63 | .arg("-td") 64 | .arg(".") 65 | .arg( 66 | self.search_dir 67 | .to_str() 68 | .ok_or_else(|| anyhow!("couldn't make search dir a string"))?, 69 | ) 70 | .stdout(Stdio::piped()) 71 | .spawn()?; 72 | 73 | let pipe = fd 74 | .stdout 75 | .take() 76 | .ok_or_else(|| anyhow!("FD command's stdout could not be read"))?; 77 | let fzf = Command::new("fzf-tmux") 78 | .stdin(pipe) 79 | .stdout(Stdio::piped()) 80 | .spawn()?; 81 | let output = fzf.wait_with_output()?; 82 | fd.kill()?; 83 | Ok(output_to_pathbuf(output)) 84 | } 85 | 86 | fn select_with_walk_dir(&self) -> Result> { 87 | let files = all_dirs_in_path(&self.search_dir); 88 | let mut fzf = Command::new("fzf-tmux") 89 | .stdin(Stdio::piped()) 90 | .stdout(Stdio::piped()) 91 | .spawn()?; 92 | 93 | // this should be converted to an async stream so that 94 | // selection doesn't have to wait for dir traversal 95 | fzf.stdin 96 | .as_mut() 97 | .ok_or_else(|| anyhow!("fzf couldn't take stdin"))? 98 | .write_all(files.as_bytes())?; 99 | 100 | let output = fzf.wait_with_output()?; 101 | 102 | Ok(output_to_pathbuf(output)) 103 | } 104 | 105 | pub fn select_dir(&self) -> Result> { 106 | if self.use_fd { 107 | self.select_with_fd() 108 | } else { 109 | self.select_with_walk_dir() 110 | } 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /src/tmux.rs: -------------------------------------------------------------------------------- 1 | // setup_workspace 2 | // generate_layout 3 | // in_tmux 4 | // has_tmux 5 | 6 | use std::cmp::max; 7 | use std::path::PathBuf; 8 | 9 | use anyhow::Result; 10 | use tmux_interface::{TargetSession, TmuxCommand, Windows}; 11 | 12 | pub fn has_tmux() -> bool { 13 | std::process::Command::new("tmux") 14 | .arg("-V") 15 | .output() 16 | .unwrap() 17 | .status 18 | .success() 19 | } 20 | 21 | pub fn in_tmux() -> bool { 22 | std::env::var("TMUX").is_ok() 23 | } 24 | 25 | pub fn setup_workspace(workspace: WorkSpace) { 26 | let tmux = TmuxCommand::new(); 27 | let session_with_right_name_exists = tmux 28 | .has_session() 29 | .target_session(&workspace.session_name) 30 | .output() 31 | .unwrap() 32 | .success(); 33 | 34 | if session_with_right_name_exists { 35 | let target_session = TargetSession::Raw(&workspace.session_name); 36 | let window_with_right_name_exists = 37 | Windows::get(&target_session, tmux_interface::WINDOW_ALL) 38 | .unwrap() 39 | .into_iter() 40 | .any(|w| w.name.as_ref().unwrap() == &workspace.window_name()); 41 | 42 | if window_with_right_name_exists { 43 | attach_to_window(&workspace, &tmux); 44 | } else { 45 | // create window 46 | tmux.new_window() 47 | .window_name(workspace.window_name()) 48 | .start_directory(workspace.path_str()) 49 | // first command goes in defaut pane 50 | .detached() 51 | .output() 52 | .unwrap(); 53 | 54 | // one already exists from when the window was created 55 | setup_panes_with_commands(&workspace, &tmux); 56 | 57 | attach_to_window(&workspace, &tmux); 58 | }; 59 | } else { 60 | // No existing tmux session 61 | 62 | // Create a new session 63 | tmux.new_session() 64 | .session_name(&workspace.session_name) 65 | .start_directory(&workspace.path_str()) 66 | .detached() 67 | .window_name(workspace.window_name()) 68 | .output() 69 | .unwrap(); 70 | 71 | setup_panes_with_commands(&workspace, &tmux); 72 | 73 | attach_to_window(&workspace, &tmux); 74 | }; 75 | } 76 | 77 | fn setup_panes_with_commands(workspace: &WorkSpace, tmux: &TmuxCommand) { 78 | for _ in 0..workspace.number_of_panes() - 1 { 79 | tmux.split_window() 80 | .start_directory(workspace.path_str()) 81 | .target_pane(workspace.target_session(None)) 82 | .output() 83 | .unwrap(); 84 | } 85 | 86 | tmux.select_layout() 87 | .target_pane(workspace.target_session(Some(0))) 88 | .layout_name(&workspace.format_checksum) 89 | .output() 90 | .unwrap(); 91 | 92 | workspace.commands.iter().enumerate().for_each(|(i, com)| { 93 | tmux.send_keys() 94 | .target_pane(workspace.target_session(Some(i as u8))) 95 | .key(format!("{}\r", com)) 96 | .output() 97 | .unwrap(); 98 | }); 99 | } 100 | 101 | fn attach_to_window(workspace: &WorkSpace, tmux: &TmuxCommand) { 102 | if in_tmux() { 103 | // switch to the window which exists 104 | tmux.switch_client() 105 | .target_session(workspace.target_session(None)) 106 | .output() 107 | .unwrap(); 108 | } else { 109 | // attach to the window in the session 110 | tmux.attach_session() 111 | .target_session(workspace.target_session(None)) 112 | .output() 113 | .unwrap(); 114 | }; 115 | } 116 | 117 | pub fn generate_layout() -> Result<()> { 118 | let tmux = TmuxCommand::new(); 119 | 120 | let stdout = tmux 121 | .list_windows() 122 | .format("#{window_active} #{window_layout}") 123 | .output()? 124 | .0 125 | .stdout; 126 | 127 | let layout = match std::str::from_utf8(&stdout)? 128 | .split('\n') 129 | .find(|l| l.starts_with('1')) 130 | { 131 | Some(layout) => Ok(layout), 132 | None => Err(anyhow!("Uh-oh, looks like you're not in a tmux session!")), 133 | }?; 134 | 135 | println!( 136 | "{}", 137 | layout 138 | .split_whitespace() 139 | .last() 140 | .ok_or_else(|| anyhow!("layout invalid"))? 141 | ); 142 | Ok(()) 143 | } 144 | 145 | #[derive(Debug, Clone)] 146 | pub struct WorkSpace { 147 | pub path: PathBuf, 148 | pub session_name: String, 149 | pub format_checksum: String, 150 | pub commands: Vec, 151 | pub window_name: Option, 152 | pub number_of_panes: u8, 153 | } 154 | 155 | fn clean_str(string: &str) -> String { 156 | string.replace(".", "-").replace(" ", "-") 157 | } 158 | 159 | impl WorkSpace { 160 | fn target_session(&self, pane: Option) -> String { 161 | if let Some(pane) = pane { 162 | format!( 163 | "{}:{}.{}", 164 | clean_str(&self.session_name), 165 | self.window_name(), 166 | pane 167 | ) 168 | } else { 169 | format!("{}:{}", clean_str(&self.session_name), self.window_name()) 170 | } 171 | } 172 | 173 | fn window_name(&self) -> String { 174 | if let Some(name) = &self.window_name { 175 | name.to_owned() 176 | } else { 177 | clean_str( 178 | &self 179 | .path 180 | .file_name() 181 | .unwrap() 182 | .to_owned() 183 | .into_string() 184 | .unwrap(), 185 | ) 186 | } 187 | } 188 | 189 | fn path_str(&self) -> String { 190 | self.path.as_os_str().to_owned().into_string().unwrap() 191 | } 192 | 193 | fn number_of_panes(&self) -> u8 { 194 | max(self.commands.len() as u8, self.number_of_panes) 195 | } 196 | } 197 | 198 | #[cfg(test)] 199 | mod tests { 200 | use super::*; 201 | #[test] 202 | fn clean_str_removes_dots_n_stuff() { 203 | assert_eq!(clean_str("foo.bar"), "foo-bar") 204 | } 205 | 206 | #[test] 207 | fn workplace_window_name_replaces_dots_n_spaces() { 208 | let wp = WorkSpace { 209 | path: PathBuf::from("/Users/zacharythomas/dev/foo.bar/"), 210 | session_name: "dev".to_owned(), 211 | format_checksum: "34ed,230x56,0,0{132x56,0,0,3,97x56,133,0,222}".to_owned(), 212 | commands: vec!["nvim".to_owned(), "fish".to_owned()], 213 | window_name: None, 214 | number_of_panes: 3, 215 | }; 216 | assert_eq!(wp.window_name(), "foo-bar") 217 | } 218 | 219 | #[test] 220 | fn workplace_window_name_returns_window_name_from_path() { 221 | let wp = WorkSpace { 222 | path: PathBuf::from("/Users/zacharythomas/dev/some_name/"), 223 | session_name: "dev".to_owned(), 224 | format_checksum: "34ed,230x56,0,0{132x56,0,0,3,97x56,133,0,222}".to_owned(), 225 | commands: vec!["nvim".to_owned(), "fish".to_owned()], 226 | window_name: None, 227 | number_of_panes: 3, 228 | }; 229 | assert_eq!(wp.window_name(), "some_name") 230 | } 231 | } 232 | --------------------------------------------------------------------------------