This commit is contained in:
2026-08-31 17:42:04 +01:00
parent 3573b7bc1f
commit f77cd4d815
3 changed files with 58 additions and 13 deletions
+22 -4
View File
@@ -7,6 +7,11 @@
crane.url = "github:ipetkov/crane";
flake-utils.url = "github:numtide/flake-utils";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
@@ -16,13 +21,25 @@
crane,
flake-utils,
...
}:
}@inputs:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
pkgs = import inputs.nixpkgs {
inherit system;
overlays = [ (import inputs.rust-overlay) ];
};
craneLib = crane.mkLib pkgs;
craneLib = (inputs.crane.mkLib pkgs).overrideToolchain (
p:
p.rust-bin.nightly.latest.default.override {
extensions = [
"rustc-codegen-cranelift-preview"
"rust-analyzer"
"rust-src"
];
}
);
# Runtime/shared libraries required by iced/iced_layershell/winit.
# winit dlopens libwayland at runtime, so these must be on
@@ -46,7 +63,8 @@
# git-initialized, so cleanCargoSource would otherwise copy target/).
src = pkgs.lib.cleanSourceWith {
src = ./.;
filter = path: type:
filter =
path: type:
let
base = baseNameOf (toString path);
in