From 66f0bd5b0260e280bbd69ad2168a3f947c5b3b13 Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Thu, 4 Dec 2025 02:48:06 -0500 Subject: [PATCH] cleanup flake.nix --- Cargo.toml | 4 ++-- flake.nix | 34 +++------------------------------- 2 files changed, 5 insertions(+), 33 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 183779a..d4e459a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,8 +10,8 @@ description = "Crossplatform (and web-compatible) graphing calculator" crate-type = ["cdylib", "rlib"] [features] -# Enable x11/wayland support for running tests on native targets -native-test = ["eframe/x11", "eframe/wayland"] +# Enable wayland support for running tests on native targets +native-test = ["eframe/wayland"] [profile.release] debug = false diff --git a/flake.nix b/flake.nix index 9317a65..4a681db 100644 --- a/flake.nix +++ b/flake.nix @@ -1,5 +1,5 @@ { - description = "YTBN Graphing Software - Web-compatible graphing calculator"; + description = "YTBN Graphing Software"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; @@ -40,7 +40,7 @@ pname = "ytbn-graphing-software-wasm"; version = "0.1.0"; - src = "${./.}"; + src = ./.; cargoLock = { lockFile = ./Cargo.lock; @@ -59,14 +59,6 @@ buildInputs = with pkgs; [ openssl zstd - # Required for running tests with native windowing support - libxkbcommon - libGL - wayland - xorg.libX11 - xorg.libXcursor - xorg.libXi - xorg.libXrandr ]; # Run all tests on native target before building wasm @@ -80,16 +72,11 @@ libxkbcommon libGL wayland - xorg.libX11 - xorg.libXcursor - xorg.libXi - xorg.libXrandr ] ); in '' runHook preCheck - export HOME=$TMPDIR export LD_LIBRARY_PATH="${libPath}:$LD_LIBRARY_PATH" cargo test --workspace --features native-test runHook postCheck @@ -98,8 +85,6 @@ buildPhase = '' runHook preBuild - export HOME=$TMPDIR - cargo build \ --release \ --lib \ @@ -142,7 +127,7 @@ # Optimize wasm (enable features used by modern rust wasm targets) wasm-opt out/ytbn_graphing_software_bg.wasm \ - -O2 --fast-math \ + -Oz \ --enable-bulk-memory \ --enable-nontrapping-float-to-int \ --enable-sign-ext \ @@ -171,13 +156,6 @@ runHook postInstall ''; - - meta = with pkgs.lib; { - description = "Web-compatible graphing calculator similar to Desmos"; - homepage = "https://github.com/Titaniumtown/YTBN-Graphing-Software"; - license = licenses.agpl3Only; - platforms = platforms.all; - }; }; in { @@ -201,9 +179,6 @@ libxkbcommon libGL wayland - xorg.libX11 - xorg.libXcursor - xorg.libXi ]; buildInputs = with pkgs; [ @@ -217,9 +192,6 @@ libxkbcommon libGL wayland - xorg.libX11 - xorg.libXcursor - xorg.libXi ] ); };