cleanup flake.nix

This commit is contained in:
Simon Gardling 2025-12-04 02:48:06 -05:00
parent abfe5480e5
commit 66f0bd5b02
Signed by: titaniumtown
GPG Key ID: 9AB28AC10ECE533D
2 changed files with 5 additions and 33 deletions

View File

@ -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

View File

@ -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
]
);
};