fix: rust overlay in nix package
This commit is contained in:
parent
546eb1fe33
commit
6d00f6216d
2 changed files with 9 additions and 7 deletions
|
|
@ -2,9 +2,8 @@
|
||||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
|
||||||
# inputs.trictrac.url = "github:mmai/trictrac";
|
# inputs.trictrac.url = "github:mmai/trictrac";
|
||||||
inputs.trictrac.url = "..";
|
inputs.trictrac.url = "..";
|
||||||
inputs.rust-overlay.url = "github:oxalica/rust-overlay";
|
|
||||||
|
|
||||||
outputs = { self, nixpkgs, trictrac, rust-overlay }:
|
outputs = { self, nixpkgs, trictrac }:
|
||||||
{
|
{
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
|
|
||||||
|
|
@ -30,8 +29,8 @@
|
||||||
networking.firewall.allowedTCPPorts = [ 80 ];
|
networking.firewall.allowedTCPPorts = [ 80 ];
|
||||||
networking.hostName = hostname;
|
networking.hostName = hostname;
|
||||||
|
|
||||||
# rust-overlay must be applied first so trictrac.overlay can use rust-bin
|
# trictrac.overlay already includes rust-overlay
|
||||||
nixpkgs.overlays = [ rust-overlay.overlays.default trictrac.overlay ];
|
nixpkgs.overlays = [ trictrac.overlay ];
|
||||||
|
|
||||||
services.trictrac = {
|
services.trictrac = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -8,13 +8,16 @@
|
||||||
|
|
||||||
outputs = { self, nixpkgs, rust-overlay }:
|
outputs = { self, nixpkgs, rust-overlay }:
|
||||||
let
|
let
|
||||||
|
rustPkgs = import nixpkgs {
|
||||||
|
inherit (final) system;
|
||||||
|
overlays = [ rust-overlay.overlays.default ];
|
||||||
|
};
|
||||||
systems = [ "x86_64-linux" "i686-linux" "aarch64-linux" ];
|
systems = [ "x86_64-linux" "i686-linux" "aarch64-linux" ];
|
||||||
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
|
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
|
||||||
# rust-overlay must be applied before self.overlay so that rust-bin is available
|
|
||||||
nixpkgsFor = forAllSystems (system:
|
nixpkgsFor = forAllSystems (system:
|
||||||
import nixpkgs {
|
import nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
overlays = [ rust-overlay.overlays.default self.overlay ];
|
overlays = [ self.overlay ];
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
in
|
in
|
||||||
|
|
@ -24,7 +27,7 @@
|
||||||
trictrac-front =
|
trictrac-front =
|
||||||
let
|
let
|
||||||
# WASM build needs wasm32-unknown-unknown target in the Rust toolchain
|
# WASM build needs wasm32-unknown-unknown target in the Rust toolchain
|
||||||
rustToolchain = final.rust-bin.stable.latest.default.override {
|
rustToolchain = rustPkgs.rust-bin.stable.latest.default.override {
|
||||||
targets = [ "wasm32-unknown-unknown" ];
|
targets = [ "wasm32-unknown-unknown" ];
|
||||||
};
|
};
|
||||||
rustPlatform = final.makeRustPlatform {
|
rustPlatform = final.makeRustPlatform {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue