From f8adf65af87ca3c08ed7946421dbc4e978d041ff Mon Sep 17 00:00:00 2001 From: asonix Date: Mon, 2 Oct 2023 12:50:22 -0500 Subject: [PATCH] Build against eyra again --- Cargo.lock | 251 ++++++++++++++++++++++++++++++++++++++++++++++++++- Cargo.toml | 2 + flake.lock | 39 ++++++++ flake.nix | 19 ++-- src/build.rs | 3 + 5 files changed, 306 insertions(+), 8 deletions(-) create mode 100644 src/build.rs diff --git a/Cargo.lock b/Cargo.lock index 296ae35..7ce3ea4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -210,7 +210,7 @@ version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ - "gimli", + "gimli 0.28.0", ] [[package]] @@ -476,6 +476,43 @@ dependencies = [ "bytes", ] +[[package]] +name = "c-gull" +version = "0.15.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0bb61cd9074ad1e86d2ffffabeb1f51340bb8db5fad85500b1008a78c69b8f8" +dependencies = [ + "c-scape", + "errno", + "libc", + "printf-compat", + "rustix", + "sync-resolve", + "tz-rs", +] + +[[package]] +name = "c-scape" +version = "0.15.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "570cd93a43a65b9a2562c305c14163c3188bb0c32d20118024786f1c0d638806" +dependencies = [ + "errno", + "libc", + "libm", + "memoffset", + "origin", + "rand", + "rand_core", + "rand_pcg", + "realpath-ext", + "rustix", + "rustix-dlmalloc", + "rustix-futex-sync", + "rustix-openpty", + "unwinding", +] + [[package]] name = "cc" version = "1.0.83" @@ -686,6 +723,22 @@ dependencies = [ "typenum", ] +[[package]] +name = "cstr_core" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd98742e4fdca832d40cab219dc2e3048de17d873248f83f17df47c1bea70956" +dependencies = [ + "cty", + "memchr", +] + +[[package]] +name = "cty" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" + [[package]] name = "dashmap" version = "5.5.3" @@ -844,6 +897,36 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +[[package]] +name = "errno" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "add4f07d43996f76ef320709726a556a9d4f965d9410d8d0271132d2f8293480" +dependencies = [ + "errno-dragonfly", + "libc", + "windows-sys", +] + +[[package]] +name = "errno-dragonfly" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "eyra" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e8d4784baa609c199cfa1b3fc445f23b1cdfe97b327bbd6b670b18678fd472a" +dependencies = [ + "c-gull", +] + [[package]] name = "eyre" version = "0.6.8" @@ -1018,6 +1101,12 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "gimli" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" + [[package]] name = "gimli" version = "0.28.0" @@ -1197,6 +1286,17 @@ dependencies = [ "tokio-io-timeout", ] +[[package]] +name = "idna" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" +dependencies = [ + "matches", + "unicode-bidi", + "unicode-normalization", +] + [[package]] name = "idna" version = "0.4.0" @@ -1258,6 +1358,15 @@ version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" +[[package]] +name = "itertools" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" +dependencies = [ + "either", +] + [[package]] name = "itertools" version = "0.10.5" @@ -1320,12 +1429,24 @@ version = "0.2.148" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b" +[[package]] +name = "libm" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" + [[package]] name = "linked-hash-map" version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" +[[package]] +name = "linux-raw-sys" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3852614a3bd9ca9804678ba6be5e3b8ce76dfc902cae004e3e0c44051b6e88db" + [[package]] name = "local-channel" version = "0.1.4" @@ -1377,6 +1498,12 @@ dependencies = [ "regex-automata 0.1.10", ] +[[package]] +name = "matches" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" + [[package]] name = "matchit" version = "0.7.3" @@ -1676,6 +1803,20 @@ dependencies = [ "hashbrown 0.12.3", ] +[[package]] +name = "origin" +version = "0.13.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab11cb88ef3323d6287af8153c0669d8df241e7c8747e17d1eecaaacde831879" +dependencies = [ + "bitflags 2.4.0", + "linux-raw-sys", + "memoffset", + "rustix", + "rustix-futex-sync", + "unwinding", +] + [[package]] name = "overload" version = "0.1.1" @@ -1836,6 +1977,7 @@ dependencies = [ "diesel", "diesel-async", "diesel-derive-enum", + "eyra", "flume", "futures-core", "hex", @@ -1968,6 +2110,18 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +[[package]] +name = "printf-compat" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b002af28ffe3d3d67202ae717810a28125a494d5396debc43de01ee136ac404" +dependencies = [ + "bitflags 1.3.2", + "cstr_core", + "cty", + "itertools 0.9.0", +] + [[package]] name = "proc-macro2" version = "1.0.67" @@ -2107,6 +2261,15 @@ dependencies = [ "getrandom", ] +[[package]] +name = "rand_pcg" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59cad018caf63deb318e5a4586d99a24424a364f40f1e5778c29aca23f4fc73e" +dependencies = [ + "rand_core", +] + [[package]] name = "raw-cpuid" version = "10.7.0" @@ -2116,6 +2279,17 @@ dependencies = [ "bitflags 1.3.2", ] +[[package]] +name = "realpath-ext" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "692f72862a0d532b44a0f4965fb10f17e7659eaedf24d2ce3c989ca778bd092f" +dependencies = [ + "bitflags 1.3.2", + "errno", + "libc", +] + [[package]] name = "redox_syscall" version = "0.2.16" @@ -2363,6 +2537,52 @@ dependencies = [ "semver", ] +[[package]] +name = "rustix" +version = "0.38.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2f9da0cbd88f9f09e7814e388301c8414c51c62aa6ce1e4b5c551d49d96e531" +dependencies = [ + "bitflags 2.4.0", + "errno", + "itoa", + "libc", + "linux-raw-sys", + "once_cell", + "windows-sys", +] + +[[package]] +name = "rustix-dlmalloc" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "730c0a5fbe9885450abcfca57da8c5d5a886492d01aa1a78b782fc5ddb2c0931" +dependencies = [ + "rustix", + "rustix-futex-sync", +] + +[[package]] +name = "rustix-futex-sync" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f0477dd629b9dd662aa4a243096b2ca90288d6f7cf29a0cfddac02777676749" +dependencies = [ + "lock_api", + "rustix", +] + +[[package]] +name = "rustix-openpty" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a25c3aad9fc1424eb82c88087789a7d938e1829724f3e4043163baf0d13cfc12" +dependencies = [ + "errno", + "libc", + "rustix", +] + [[package]] name = "rustls" version = "0.21.7" @@ -2728,6 +2948,17 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "sync-resolve" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a89fa9e37fd57511c6c486c4e7a2f38c94a27c130347b4a310425074a4ad7a7" +dependencies = [ + "idna 0.2.3", + "log", + "rand", +] + [[package]] name = "sync_wrapper" version = "0.1.2" @@ -3216,6 +3447,12 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +[[package]] +name = "tz-rs" +version = "0.6.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33851b15c848fad2cf4b105c6bb66eb9512b6f6c44a4b13f57c53c73c707e2b4" + [[package]] name = "ucd-trie" version = "0.1.6" @@ -3258,6 +3495,16 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" +[[package]] +name = "unwinding" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ee215fc0991fb587275819562685254302112d0b7c8d25e635655526c0ecdc6" +dependencies = [ + "gimli 0.26.2", + "libc", +] + [[package]] name = "url" version = "2.4.1" @@ -3265,7 +3512,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" dependencies = [ "form_urlencoded", - "idna", + "idna 0.4.0", "percent-encoding", "serde", ] diff --git a/Cargo.toml b/Cargo.toml index f28a0e1..fa9bc09 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,6 +7,7 @@ license = "AGPL-3.0" readme = "README.md" repository = "https://git.asonix.dog/asonix/pict-rs" edition = "2021" +build = "./src/build.rs" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [features] @@ -51,6 +52,7 @@ serde_json = "1.0" serde_urlencoded = "0.7.1" sha2 = "0.10.0" sled = { version = "0.34.7" } +std = { version = "0.16.0", package = "eyra" } storage-path-generator = "0.1.0" streem = "0.2.0" thiserror = "1.0" diff --git a/flake.lock b/flake.lock index 15e4c30..43dc4e5 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,26 @@ { "nodes": { + "fenix": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "rust-analyzer-src": "rust-analyzer-src" + }, + "locked": { + "lastModified": 1696227742, + "narHash": "sha256-c6OP/k/jr7sSf/EQL5EjPjSRpH+MdyYiD41VtXr9vLY=", + "owner": "nix-community", + "repo": "fenix", + "rev": "9e5097e1be6c29345f63de27f21ad8cdaecbcb7a", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "fenix", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems" @@ -36,10 +57,28 @@ }, "root": { "inputs": { + "fenix": "fenix", "flake-utils": "flake-utils", "nixpkgs": "nixpkgs" } }, + "rust-analyzer-src": { + "flake": false, + "locked": { + "lastModified": 1696050837, + "narHash": "sha256-2K3Aq4gjPZBDnkAMJaMA4ElE+BNbmrqtSBWtt9kPGaM=", + "owner": "rust-lang", + "repo": "rust-analyzer", + "rev": "0840038f02daec6ba3238f05d8caa037d28701a0", + "type": "github" + }, + "original": { + "owner": "rust-lang", + "ref": "nightly", + "repo": "rust-analyzer", + "type": "github" + } + }, "systems": { "locked": { "lastModified": 1681028828, diff --git a/flake.nix b/flake.nix index c0c7e2a..7a5b436 100644 --- a/flake.nix +++ b/flake.nix @@ -4,13 +4,18 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; flake-utils.url = "github:numtide/flake-utils"; + fenix = { + url = "github:nix-community/fenix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; - outputs = { self, nixpkgs, flake-utils }: + outputs = { self, nixpkgs, flake-utils, fenix }: flake-utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs { inherit system; + overlays = [ fenix.overlays.default ]; }; in { @@ -29,19 +34,21 @@ devShell = with pkgs; mkShell { nativeBuildInputs = [ - cargo - cargo-outdated - clippy diesel-cli exiftool + (fenix.packages.${system}.complete.withComponents [ + "cargo" + "clippy" + "rust-src" + "rustc" + "rustfmt" + ]) ffmpeg_6-full garage gcc imagemagick protobuf rust-analyzer - rustc - rustfmt taplo ]; diff --git a/src/build.rs b/src/build.rs new file mode 100644 index 0000000..f127706 --- /dev/null +++ b/src/build.rs @@ -0,0 +1,3 @@ +fn main() { + println!("cargo:rustc-link-arg=-nostartfiles"); +}