nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 89 lines 1.7 kB view raw
1{ 2 lib, 3 fetchCrate, 4 rustPlatform, 5 pkg-config, 6 cacert, 7 openssl, 8 rustfmt, 9 makeWrapper, 10 wasm-bindgen-cli_0_2_108, 11 testers, 12 dioxus-cli, 13 withTelemetry ? false, 14}: 15 16rustPlatform.buildRustPackage (finalAttrs: { 17 pname = "dioxus-cli"; 18 version = "0.7.3"; 19 20 src = fetchCrate { 21 pname = "dioxus-cli"; 22 version = finalAttrs.version; 23 hash = "sha256-6uG737MNk+wTKqNWgFEd8MsOOvllZLDnIrJPAn5Wjuw="; 24 }; 25 26 cargoHash = "sha256-BdPsdWah/f2pveQViPikIV2riSwjSo+qGOFoP+hHaiM="; 27 buildFeatures = [ 28 "no-downloads" 29 ] 30 ++ lib.optional (!withTelemetry) "disable-telemetry"; 31 32 env = { 33 OPENSSL_NO_VENDOR = 1; 34 }; 35 36 nativeBuildInputs = [ 37 pkg-config 38 cacert 39 makeWrapper 40 ]; 41 42 buildInputs = [ 43 openssl 44 ]; 45 46 nativeCheckInputs = [ 47 rustfmt 48 ]; 49 50 checkFlags = [ 51 # requires network access 52 "--skip=serve::proxy::test" 53 # requires monorepo structure and mobile toolchains 54 "--skip=test_harnesses::run_harness" 55 ]; 56 57 passthru = { 58 tests = { 59 version = testers.testVersion { 60 package = dioxus-cli; 61 }; 62 63 withTelemetry = dioxus-cli.override { 64 withTelemetry = true; 65 }; 66 }; 67 }; 68 69 postInstall = '' 70 wrapProgram $out/bin/dx \ 71 --suffix PATH : ${lib.makeBinPath [ wasm-bindgen-cli_0_2_108 ]} 72 ''; 73 74 meta = { 75 description = "CLI for building fullstack web, desktop, and mobile apps with a single codebase."; 76 homepage = "https://dioxus.dev"; 77 changelog = "https://github.com/DioxusLabs/dioxus/releases"; 78 license = with lib.licenses; [ 79 mit 80 asl20 81 ]; 82 maintainers = with lib.maintainers; [ 83 cathalmullan 84 anish 85 ]; 86 platforms = lib.platforms.all; 87 mainProgram = "dx"; 88 }; 89})