nix package

This commit is contained in:
Robin Appelman 2026-10-25 23:11:12 +01:00
commit 70edec329d
4 changed files with 91 additions and 87 deletions

View file

@ -1,43 +1,52 @@
{
inputs = {
utils.url = "github:numtide/flake-utils";
nixpkgs.url = "nixpkgs/release-26.05";
rust-overlay.url = "github:oxalica/rust-overlay";
flakelight = {
url = "github:nix-community/flakelight";
inputs.nixpkgs.follows = "nixpkgs";
};
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
nixpkgs,
utils,
flakelight,
rust-overlay,
...
}:
utils.lib.eachDefaultSystem (system: let
overlays = [(import rust-overlay)];
pkgs = import nixpkgs {
inherit system overlays;
flakelight ./. {
withOverlays = [
(import rust-overlay)
(import ./nix/overlay.nix)
];
packages = {
demostf-edit = pkgs: pkgs.demostf-edit;
};
in {
devShell = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
(rust-bin.stable.latest.default.override {
targets = ["wasm32-unknown-unknown"];
})
rustc
cargo
bacon
cargo-edit
cargo-outdated
clippy
cargo-audit
hyperfine
valgrind
wasm-pack
pkg-config
nodejs
];
buildInputs = with pkgs; [openssl];
OPENSSL_NO_VENDOR = 1;
};
});
devShells.default = pkgs:
pkgs.mkShell {
nativeBuildInputs = with pkgs; [
(rust-bin.stable.latest.default.override {
targets = ["wasm32-unknown-unknown"];
})
rustc
cargo
bacon
cargo-edit
cargo-outdated
clippy
cargo-audit
hyperfine
valgrind
wasm-pack
pkg-config
nodejs
];
buildInputs = with pkgs; [openssl];
OPENSSL_NO_VENDOR = 1;
};
};
}