From 9a1d3befc71d60dffac021e9c6cf88caf64f03be Mon Sep 17 00:00:00 2001 From: dawn <90008@gaze.systems> Date: Sat, 25 Apr 2026 12:57:18 +0300 Subject: [PATCH] fix nix build --- Cargo.lock | 105 ---------------------------------------------------- Cargo.toml | 2 +- default.nix | 29 +++++++++++++++ flake.nix | 1 + 4 files changed, 31 insertions(+), 106 deletions(-) create mode 100644 default.nix diff --git a/Cargo.lock b/Cargo.lock index bfb49f9..4e8af0f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1092,21 +1092,6 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - [[package]] name = "form_urlencoded" version = "1.2.2" @@ -1622,22 +1607,6 @@ dependencies = [ "webpki-roots", ] -[[package]] -name = "hyper-tls" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" -dependencies = [ - "bytes", - "http-body-util", - "hyper", - "hyper-util", - "native-tls", - "tokio", - "tokio-native-tls", - "tower-service", -] - [[package]] name = "hyper-util" version = "0.1.20" @@ -2379,23 +2348,6 @@ dependencies = [ "web-time", ] -[[package]] -name = "native-tls" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "465500e14ea162429d264d44189adc38b199b62b1c21eea9f69e4b73cb03bbf2" -dependencies = [ - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - [[package]] name = "no_std_io2" version = "0.8.1" @@ -2450,50 +2402,12 @@ version = "1.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" -[[package]] -name = "openssl" -version = "0.10.78" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f38c4372413cdaaf3cc79dd92d29d7d9f5ab09b51b10dded508fb90bb70b9222" -dependencies = [ - "bitflags", - "cfg-if", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "openssl-probe" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" -[[package]] -name = "openssl-sys" -version = "0.9.114" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13ce1245cd07fcc4cfdb438f7507b0c7e4f3849a69fd84d52374c66d83741bb6" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - [[package]] name = "ouroboros" version = "0.18.5" @@ -3000,12 +2914,10 @@ dependencies = [ "http-body-util", "hyper", "hyper-rustls", - "hyper-tls", "hyper-util", "js-sys", "log", "mime", - "native-tls", "percent-encoding", "pin-project-lite", "quinn", @@ -3016,7 +2928,6 @@ dependencies = [ "serde_urlencoded", "sync_wrapper", "tokio", - "tokio-native-tls", "tokio-rustls", "tokio-util", "tower", @@ -3812,16 +3723,6 @@ dependencies = [ "syn", ] -[[package]] -name = "tokio-native-tls" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" -dependencies = [ - "native-tls", - "tokio", -] - [[package]] name = "tokio-rustls" version = "0.26.4" @@ -4164,12 +4065,6 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f54a172d0620933a27a4360d3db3e2ae0dd6cceae9730751a036bbf182c4b23" -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - [[package]] name = "version_check" version = "0.9.5" diff --git a/Cargo.toml b/Cargo.toml index 43a6b03..68c42e7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ tokio = { version = "1.0", features = ["full"] } axum = { version = "0.8.8", features = ["macros"] } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -reqwest = { version = "0.12", features = ["json", "stream"] } +reqwest = { version = "0.12", default-features = false, features = ["json", "stream", "rustls-tls"] } tracing = "0.1" tracing-subscriber = { version = "0.3", features = ["env-filter"] } miette = { version = "7", features = ["fancy"] } diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..81ea313 --- /dev/null +++ b/default.nix @@ -0,0 +1,29 @@ +{ + lib, + rustPlatform, + cmake, + ... +}: +rustPlatform.buildRustPackage { + pname = "slopview"; + version = "main"; + + src = lib.fileset.toSource { + root = ./.; + fileset = lib.fileset.unions [ + ./src ./Cargo.toml ./Cargo.lock + ]; + }; + + nativeBuildInputs = [cmake]; + + cargoLock = { + lockFile = ./Cargo.lock; + outputHashes = { + "rmp-0.8.15" = "sha256-0VATbSR2lGiCJ8Ww4a5pkOHSRUjoysnFonpKS/oMzgU="; + "fjall-3.1.4" = "sha256-QO1EvdSwAetH24TOxiHSkguE4JBKViJy4JXQvi9hi/A="; + "lsm-tree-3.1.4" = "sha256-6fhVvfuZQXeUIXmDAaHpEDLZwZsMTLCMNQAAac3/WkM="; + "hydrant-0.1.0" = "sha256-tNYPb24nJL1ZCHIPSSxJQh4Ojjbl2mDWyNwwHa6Z5zU="; + }; + }; +} diff --git a/flake.nix b/flake.nix index 95ed94d..c8ec7a9 100644 --- a/flake.nix +++ b/flake.nix @@ -20,6 +20,7 @@ path = ./.; export = false; }; + packages.default = pkgs.callPackage ./default.nix {}; devShells.default = config.nci.outputs."appview".devShell.overrideAttrs (old: { packages = (old.packages or []) ++ (with pkgs; [ cargo-outdated -- 2.51.2