Use eachDefaultSystem
This commit is contained in:
parent
48fa521896
commit
3479ca9d83
2 changed files with 77 additions and 37 deletions
78
flake.nix
78
flake.nix
|
@ -3,46 +3,52 @@
|
|||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ self, nixpkgs }:
|
||||
inputs:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
kernel = pkgs.linux_latest;
|
||||
kmd = import ./pkgs/kmd { inherit pkgs kernel; };
|
||||
sfpi = import ./pkgs/sfpi { inherit pkgs; };
|
||||
luwen = import ./pkgs/luwen { inherit pkgs; };
|
||||
common = import ./pkgs/common { inherit pkgs; };
|
||||
flash = import ./pkgs/flash {
|
||||
inherit pkgs;
|
||||
pyluwen = luwen.pyluwen_0_1;
|
||||
};
|
||||
smi = import ./pkgs/smi {
|
||||
inherit pkgs;
|
||||
pyluwen = luwen.pyluwen;
|
||||
tools-common = common;
|
||||
};
|
||||
umd = import ./pkgs/umd { inherit pkgs; };
|
||||
inherit (inputs) self;
|
||||
inherit (inputs.nixpkgs) lib;
|
||||
in
|
||||
{
|
||||
packages.${system} = {
|
||||
kmd = kmd.kmd;
|
||||
udev-rules = kmd.udev-rules;
|
||||
kmd-test = kmd.test;
|
||||
sfpi = sfpi.sfpi;
|
||||
tt-gcc = sfpi.tt-gcc;
|
||||
smi = smi;
|
||||
luwen = luwen.luwen;
|
||||
pyluwen = luwen.pyluwen;
|
||||
tools-common = common;
|
||||
flash = flash;
|
||||
umd = umd;
|
||||
};
|
||||
inputs.utils.lib.eachDefaultSystem (
|
||||
system:
|
||||
let
|
||||
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
||||
kernel = pkgs.linux_latest;
|
||||
kmd = import ./pkgs/kmd { inherit pkgs kernel; };
|
||||
sfpi = import ./pkgs/sfpi { inherit pkgs; };
|
||||
luwen = import ./pkgs/luwen { inherit pkgs; };
|
||||
common = import ./pkgs/common { inherit pkgs; };
|
||||
flash = import ./pkgs/flash {
|
||||
inherit pkgs;
|
||||
pyluwen = luwen.pyluwen_0_1;
|
||||
};
|
||||
smi = import ./pkgs/smi {
|
||||
inherit pkgs;
|
||||
pyluwen = luwen.pyluwen;
|
||||
tools-common = common;
|
||||
};
|
||||
umd = import ./pkgs/umd { inherit pkgs; };
|
||||
in
|
||||
{
|
||||
packages = {
|
||||
kmd = kmd.kmd;
|
||||
udev-rules = kmd.udev-rules;
|
||||
kmd-test = kmd.test;
|
||||
sfpi = sfpi.sfpi;
|
||||
tt-gcc = sfpi.tt-gcc;
|
||||
smi = smi;
|
||||
luwen = luwen.luwen;
|
||||
pyluwen = luwen.pyluwen;
|
||||
tools-common = common;
|
||||
flash = flash;
|
||||
umd = umd;
|
||||
default = self.packages.${system}.smi;
|
||||
};
|
||||
|
||||
formatter.${system} = pkgs.nixfmt-rfc-style;
|
||||
|
||||
defaultPackage.${system} = self.packages.${system}.smi;
|
||||
};
|
||||
formatter = pkgs.nixfmt-rfc-style;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue