Change:
Steps to reproduce the behavior: Attempt to build surrealist version 2.0.6 on NixOS 24.11. The build fails during the build phase. I reported a similar issue here: Please run and paste the result. Add a :+1: [reaction] to [issues you find important]. [reaction]: [issues you find important]:
another failure

Discussion:
<ins> diff --git a/Cargo.lock b/Cargo.lock index 55f480a8..a69f9ed9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1839,6 +1839,22 @@ dependencies = [ "tower-service", ] +[[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.3" @@ -2302,6 +2318,23 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "native-tls" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" +dependencies = [ + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + [[package]] name = "ndk" version = "0.7.0" @@ -2511,6 +2544,12 @@ dependencies = [ "syn 2.0.50", ] +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + [[package]] name = "openssl-src" version = "300.2.3+3.2.1" @@ -3416,6 +3455,15 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "schannel" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +dependencies = [ + "windows-sys 0.52.0", +] + [[package]] name = "schemars" version = "0.8.19" @@ -3460,6 +3508,29 @@ version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" +[[package]] +name = "security-framework" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "770452e37cad93e0a50d5abc3990d2bc351c36d0328f86cefec2f2fb206eaef6" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "selectors" version = "0.22.0" @@ -3847,6 +3918,7 @@ name = "surrealist" version = "0.0.0" dependencies = [ "dirs", + "hyper-tls", "log", "openssl", "portpicker", @@ -4563,6 +4635,16 @@ dependencies = [ "windows-sys 0.48.0", ] +[[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.25.0" diff --git a/Cargo.toml b/Cargo.toml index 3e3ab7ee..b6612f95 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,6 +28,8 @@ time = { version = "0.3", default-features = false} log = "^0.4" url = "2" +hyper-tls = "0.6.0" + [target.'cfg(target_os = "linux")'.dependencies] openssl = { version = "0.10.64", features = ["vendored"] } </ins>

, esbuild , fetchFromGitHub , gdk-pixbuf <ins> , glib-networking </ins> , gobject-introspection , lib <del> , libsoup </del> <ins> , libsoup_3 </ins> , makeBinaryWrapper , nodejs , openssl

, rustPlatform , stdenv , stdenvNoCC <del> , webkitgtk </del> <ins> , webkitgtk_4_1 </ins> }: let <del> esbuild-20-2 = let version = "0.20.2"; </del> <ins> cargo-tauri_2 = let version = "2.0.0-rc.3"; src = fetchFromGitHub { owner = "tauri-apps"; repo = "tauri"; rev = "tauri-v${version}"; hash = "sha256-PV8m/MzYgbY4Hv71dZrqVbrxmxrwFfOAraLJIaQk6FQ="; }; in cargo-tauri.overrideAttrs (drv: { inherit src version; cargoDeps = drv.cargoDeps.overrideAttrs (lib.const { inherit src; name = "tauri-${version}-vendor.tar.gz"; outputHash = "sha256-BrIH0JkGMp68O+4B+0g7X3lSdNSPXo+otlBgslCzPZE="; }); }); esbuild_21-5 = let version = "0.21.5"; </ins> in esbuild.override { buildGoModule = args: buildGoModule (args // {

owner = "evanw"; repo = "esbuild"; rev = "v${version}"; <del> hash = "sha256-h/Vqwax4B4nehRP9TaYbdixAZdb1hx373dNxNHvDrtY="; </del> <ins> hash = "sha256-FpvXWIlt67G8w3pBKZo/mcp57LunxDmRUaCU/Ne89B8="; </ins> }; vendorHash = "sha256-+BfxCyg0KkDQpHt/wycy/8CTG6YBA/VJvJFhhzUnSiQ="; });

in stdenv.mkDerivation (finalAttrs: { pname = "surrealist"; <del> version = "2.0.6"; </del> <ins> version = "2.1.6"; </ins> src = fetchFromGitHub { owner = "surrealdb"; repo = "surrealist"; rev = "surrealist-v${finalAttrs.version}"; <del> hash = "sha256-5OiVqn+ujssxXZXC6pnGiG1Nw8cAhoDU5IIl9skywBw="; </del> <ins> hash = "sha256-jOjOdrVOcGPenFW5mkkXKA64C6c+/f9KzlvtUmw6vXc="; </ins> }; sourceRoot = "${finalAttrs.src.name}/src-tauri"; <ins> # HACK: A dependency (surrealist -> tauri -> **reqwest**) contains hyper-tls # as an actually optional dependency. It ends up in the `Cargo.lock` file of # tauri, but not in the one of surrealist. We apply a patch to `Cargo.toml` # and `Cargo.lock` to ensure that we have it in our vendor archive. This may # be a result of the following bug: # https://github.com/rust-lang/cargo/issues/10801 patches = [ ./0001-Cargo.patch ]; </ins> ui = stdenvNoCC.mkDerivation { inherit (finalAttrs) src version; pname = "${finalAttrs.pname}-ui"; pnpmDeps = pnpm.fetchDeps { inherit (finalAttrs) pname version src; <del> hash = "sha256-apvU7nanzueaF7PEQL7EKjVT5z1M6I7PZpEIJxfKuCQ="; </del> <ins> hash = "sha256-zGs1MWJ8TEFuHOoekCNIKQo2PBnp95xLz+R8mzeJXh8="; </ins> }; <del> ESBUILD_BINARY_PATH = "${lib.getExe esbuild-20-2}"; </del> <ins> ESBUILD_BINARY_PATH = lib.getExe esbuild_21-5; </ins> nativeBuildInputs = [ nodejs pnpm.configHook ]; buildPhase = '' runHook preBuild <del> pnpm build </del> <ins> pnpm build:desktop </ins> runHook postBuild '';

}; cargoDeps = rustPlatform.fetchCargoTarball { <del> inherit (finalAttrs) src sourceRoot version; </del> <ins> inherit (finalAttrs) patches src sourceRoot version; </ins> name = "${finalAttrs.pname}-${finalAttrs.version}"; <del> hash = "sha256-uE4r0smgSbl4l77/MsHtn1Ar5fqspsYcLC/u8TUrcu8="; </del> <ins> hash = "sha256-LtQS0kH+2P4odV7BJYiH6T51+iZHAM9W9mV96rNfNWs="; </ins> }; nativeBuildInputs = [ cargo <del> cargo-tauri </del> <ins> cargo-tauri_2 gobject-introspection </ins> makeBinaryWrapper pkg-config rustc rustPlatform.cargoSetupHook ]; <del> buildInputs = [ cairo gdk-pixbuf gobject-introspection libsoup openssl pango webkitgtk ]; </del> <ins> buildInputs = [ cairo gdk-pixbuf libsoup_3 openssl pango webkitgtk_4_1 ]; </ins> env = { OPENSSL_NO_VENDOR = 1;

postPatch = '' substituteInPlace ./tauri.conf.json  <del> --replace-fail '"distDir": "../dist",' '"distDir": "${finalAttrs.ui}",'  --replace-fail '"beforeBuildCommand": "pnpm build",' '"beforeBuildCommand": "",' </del> <ins> --replace-fail '"frontendDist": "../dist",' '"frontendDist": "${finalAttrs.ui}",'  --replace-fail '"beforeBuildCommand": "pnpm build:desktop",' '"beforeBuildCommand": "",' </ins> ''; postBuild = ''

''; postInstall = '' <del> install -Dm555 target/release/bundle/deb/surrealist_${finalAttrs.version}_*/data/usr/bin/surrealist -t $out/bin cp -r target/release/bundle/deb/surrealist_${finalAttrs.version}_*/data/usr/share $out </del> <ins> install -Dm555 target/release/bundle/deb/Surrealist_${finalAttrs.version}_*/data/usr/bin/surrealist -t $out/bin cp -r target/release/bundle/deb/Surrealist_${finalAttrs.version}_*/data/usr/share $out </ins> ''; postFixup = '' <del> wrapProgram "$out/bin/surrealist" --set WEBKIT_DISABLE_COMPOSITING_MODE 1 </del> <ins> wrapProgram "$out/bin/surrealist"  --set GIO_EXTRA_MODULES ${glib-networking}/lib/gio/modules  --set WEBKIT_DISABLE_COMPOSITING_MODE 1 </ins> ''; meta = with lib; {