nix: don't drag rust toolchain into system closures
This commit is contained in:
parent
7800c19280
commit
bff8e24e56
3 changed files with 9 additions and 42 deletions
20
flake.nix
20
flake.nix
|
|
@ -3,17 +3,12 @@
|
|||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
rust-overlay = {
|
||||
url = "github:oxalica/rust-overlay";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
rust-overlay,
|
||||
}:
|
||||
let
|
||||
systems = [
|
||||
|
|
@ -26,7 +21,6 @@
|
|||
system:
|
||||
import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [ rust-overlay.overlays.default ];
|
||||
};
|
||||
|
||||
perSystem =
|
||||
|
|
@ -34,13 +28,6 @@
|
|||
let
|
||||
pkgs = pkgsFor system;
|
||||
|
||||
rustToolchain = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
|
||||
|
||||
rustPlatform = pkgs.makeRustPlatform {
|
||||
cargo = rustToolchain;
|
||||
rustc = rustToolchain;
|
||||
};
|
||||
|
||||
# Native libs the audio crates link against.
|
||||
nativeAudioBuildInputs = with pkgs; [
|
||||
pipewire
|
||||
|
|
@ -64,8 +51,11 @@
|
|||
name = "headroom-dev";
|
||||
|
||||
nativeBuildInputs = nativeBuildTools ++ [
|
||||
rustToolchain
|
||||
pkgs.cargo
|
||||
pkgs.clippy
|
||||
pkgs.rust-analyzer
|
||||
pkgs.rustc
|
||||
pkgs.rustfmt
|
||||
];
|
||||
|
||||
buildInputs =
|
||||
|
|
@ -89,7 +79,7 @@
|
|||
);
|
||||
|
||||
# `nix build` — the final packaged daemon + CLI.
|
||||
headroom = rustPlatform.buildRustPackage (
|
||||
headroom = pkgs.rustPlatform.buildRustPackage (
|
||||
{
|
||||
pname = "headroom";
|
||||
# Pull from the workspace Cargo.toml — the per-crate
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue