cleanup flake.nix
This commit is contained in:
parent
abfe5480e5
commit
66f0bd5b02
@ -10,8 +10,8 @@ description = "Crossplatform (and web-compatible) graphing calculator"
|
|||||||
crate-type = ["cdylib", "rlib"]
|
crate-type = ["cdylib", "rlib"]
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
# Enable x11/wayland support for running tests on native targets
|
# Enable wayland support for running tests on native targets
|
||||||
native-test = ["eframe/x11", "eframe/wayland"]
|
native-test = ["eframe/wayland"]
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
debug = false
|
debug = false
|
||||||
|
|||||||
34
flake.nix
34
flake.nix
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
description = "YTBN Graphing Software - Web-compatible graphing calculator";
|
description = "YTBN Graphing Software";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
@ -40,7 +40,7 @@
|
|||||||
pname = "ytbn-graphing-software-wasm";
|
pname = "ytbn-graphing-software-wasm";
|
||||||
version = "0.1.0";
|
version = "0.1.0";
|
||||||
|
|
||||||
src = "${./.}";
|
src = ./.;
|
||||||
|
|
||||||
cargoLock = {
|
cargoLock = {
|
||||||
lockFile = ./Cargo.lock;
|
lockFile = ./Cargo.lock;
|
||||||
@ -59,14 +59,6 @@
|
|||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
openssl
|
openssl
|
||||||
zstd
|
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
|
# Run all tests on native target before building wasm
|
||||||
@ -80,16 +72,11 @@
|
|||||||
libxkbcommon
|
libxkbcommon
|
||||||
libGL
|
libGL
|
||||||
wayland
|
wayland
|
||||||
xorg.libX11
|
|
||||||
xorg.libXcursor
|
|
||||||
xorg.libXi
|
|
||||||
xorg.libXrandr
|
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
in
|
in
|
||||||
''
|
''
|
||||||
runHook preCheck
|
runHook preCheck
|
||||||
export HOME=$TMPDIR
|
|
||||||
export LD_LIBRARY_PATH="${libPath}:$LD_LIBRARY_PATH"
|
export LD_LIBRARY_PATH="${libPath}:$LD_LIBRARY_PATH"
|
||||||
cargo test --workspace --features native-test
|
cargo test --workspace --features native-test
|
||||||
runHook postCheck
|
runHook postCheck
|
||||||
@ -98,8 +85,6 @@
|
|||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
runHook preBuild
|
runHook preBuild
|
||||||
|
|
||||||
export HOME=$TMPDIR
|
|
||||||
|
|
||||||
cargo build \
|
cargo build \
|
||||||
--release \
|
--release \
|
||||||
--lib \
|
--lib \
|
||||||
@ -142,7 +127,7 @@
|
|||||||
|
|
||||||
# Optimize wasm (enable features used by modern rust wasm targets)
|
# Optimize wasm (enable features used by modern rust wasm targets)
|
||||||
wasm-opt out/ytbn_graphing_software_bg.wasm \
|
wasm-opt out/ytbn_graphing_software_bg.wasm \
|
||||||
-O2 --fast-math \
|
-Oz \
|
||||||
--enable-bulk-memory \
|
--enable-bulk-memory \
|
||||||
--enable-nontrapping-float-to-int \
|
--enable-nontrapping-float-to-int \
|
||||||
--enable-sign-ext \
|
--enable-sign-ext \
|
||||||
@ -171,13 +156,6 @@
|
|||||||
|
|
||||||
runHook postInstall
|
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
|
in
|
||||||
{
|
{
|
||||||
@ -201,9 +179,6 @@
|
|||||||
libxkbcommon
|
libxkbcommon
|
||||||
libGL
|
libGL
|
||||||
wayland
|
wayland
|
||||||
xorg.libX11
|
|
||||||
xorg.libXcursor
|
|
||||||
xorg.libXi
|
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
@ -217,9 +192,6 @@
|
|||||||
libxkbcommon
|
libxkbcommon
|
||||||
libGL
|
libGL
|
||||||
wayland
|
wayland
|
||||||
xorg.libX11
|
|
||||||
xorg.libXcursor
|
|
||||||
xorg.libXi
|
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user