diff --git a/pkgs/by-name/di/dioxus-cli/fix-wasm-opt-target-dir.patch b/pkgs/by-name/di/dioxus-cli/fix-wasm-opt-target-dir.patch deleted file mode 100644 index 1b1b9763235f..000000000000 --- a/pkgs/by-name/di/dioxus-cli/fix-wasm-opt-target-dir.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/build/bundle.rs -+++ b/src/build/bundle.rs -@@ -334,7 +334,7 @@ impl AppBundle { - // Only run wasm-opt if the feature is enabled - // Wasm-opt has an expensive build script that makes it annoying to keep enabled for iterative dev - // We put it behind the "wasm-opt" feature flag so that it can be disabled when iterating on the cli -- self.run_wasm_opt(&self.build.exe_dir())?; -+ self.run_wasm_opt(&self.build.wasm_bindgen_out_dir())?; - - // Write the index.html file with the pre-configured contents we got from pre-rendering - std::fs::write( diff --git a/pkgs/by-name/di/dioxus-cli/package.nix b/pkgs/by-name/di/dioxus-cli/package.nix index 15c1311c9739..c31e86165e6e 100644 --- a/pkgs/by-name/di/dioxus-cli/package.nix +++ b/pkgs/by-name/di/dioxus-cli/package.nix @@ -1,77 +1,83 @@ { lib, - stdenv, fetchCrate, rustPlatform, pkg-config, - rustfmt, cacert, openssl, + rustfmt, nix-update-script, testers, dioxus-cli, + withTelemetry ? false, }: -rustPlatform.buildRustPackage rec { +rustPlatform.buildRustPackage (finalAttrs: { pname = "dioxus-cli"; - version = "0.6.3"; + version = "0.7.1"; src = fetchCrate { - inherit pname version; - hash = "sha256-wuIJq+UN1q5qYW4TXivq93C9kZiPHwBW5Ty2Vpik2oY="; + pname = "dioxus-cli"; + version = finalAttrs.version; + hash = "sha256-tPymoJJvz64G8QObLkiVhnW0pBV/ABskMdq7g7o9f1A="; }; - cargoHash = "sha256-L9r/nJj0Rz41mg952dOgKxbDS5u4zGEjSA3EhUHfGIk="; - cargoPatches = [ - # TODO: Remove once https://github.com/DioxusLabs/dioxus/issues/3659 is fixed upstream. - ./fix-wasm-opt-target-dir.patch - ]; - + cargoHash = "sha256-mgscu6mJWinB8WXLnLNq/JQnRpHRJKMQXnMwECz1vwc="; buildFeatures = [ "no-downloads" - "optimizations" - ]; + ] + ++ lib.optional (!withTelemetry) "disable-telemetry"; + + env = { + OPENSSL_NO_VENDOR = 1; + }; nativeBuildInputs = [ pkg-config cacert ]; - buildInputs = [ openssl ]; + buildInputs = [ + openssl + ]; - OPENSSL_NO_VENDOR = 1; - - # wasm-opt-sys build.rs tries to verify C++17 support, but the check appears to be faulty. - postPatch = '' - substituteInPlace $cargoDepsCopy/wasm-opt-sys-*/build.rs \ - --replace-fail 'check_cxx17_support()?;' '// check_cxx17_support()?;' - ''; - - nativeCheckInputs = [ rustfmt ]; + nativeCheckInputs = [ + rustfmt + ]; checkFlags = [ # requires network access "--skip=serve::proxy::test" - "--skip=wasm_bindgen::test" + # requires monorepo structure and mobile toolchains + "--skip=test_harnesses::run_harness" ]; passthru = { updateScript = nix-update-script { }; - tests.version = testers.testVersion { package = dioxus-cli; }; + tests = { + version = testers.testVersion { + package = dioxus-cli; + }; + + withTelemetry = dioxus-cli.override { + withTelemetry = true; + }; + }; }; - meta = with lib; { - homepage = "https://dioxuslabs.com"; - description = "CLI tool for developing, testing, and publishing Dioxus apps"; + meta = { + description = "CLI for building fullstack web, desktop, and mobile apps with a single codebase."; + homepage = "https://dioxus.dev"; changelog = "https://github.com/DioxusLabs/dioxus/releases"; - license = with licenses; [ + license = with lib.licenses; [ mit asl20 ]; - maintainers = with maintainers; [ + maintainers = with lib.maintainers; [ xanderio cathalmullan ]; + platforms = lib.platforms.all; mainProgram = "dx"; }; -} +})