nix flakes support #85
12
flake.nix
12
flake.nix
@ -246,11 +246,6 @@
|
|||||||
dontFixup = true;
|
dontFixup = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
fsblCrates = {
|
|
||||||
zc706-fsbl = fsbl { board = "zc706"; };
|
|
||||||
# any others?
|
|
||||||
};
|
|
||||||
|
|
||||||
targetCrates = target: {
|
targetCrates = target: {
|
||||||
"${target}-experiments" = build-crate "${target}-experiments" "experiments" "target_${target}" cargoSha256Experiments;
|
"${target}-experiments" = build-crate "${target}-experiments" "experiments" "target_${target}" cargoSha256Experiments;
|
||||||
"${target}-szl" = build-crate "${target}-szl" "szl" "target_${target}" cargoSha256SZL;
|
"${target}-szl" = build-crate "${target}-szl" "szl" "target_${target}" cargoSha256SZL;
|
||||||
@ -259,6 +254,7 @@
|
|||||||
allTargetCrates = (builtins.foldl' (results: target:
|
allTargetCrates = (builtins.foldl' (results: target:
|
||||||
results // targetCrates target
|
results // targetCrates target
|
||||||
) {} targets);
|
) {} targets);
|
||||||
|
|
||||||
szl = pkgs.runCommand "szl" {} (builtins.foldl' (commands: target:
|
szl = pkgs.runCommand "szl" {} (builtins.foldl' (commands: target:
|
||||||
let
|
let
|
||||||
szlResult = builtins.getAttr "${target}-szl" allTargetCrates;
|
szlResult = builtins.getAttr "${target}-szl" allTargetCrates;
|
||||||
@ -266,8 +262,10 @@
|
|||||||
commands + "ln -s ${szlResult}/szl.elf $out/szl-${target}.elf\n"
|
commands + "ln -s ${szlResult}/szl.elf $out/szl-${target}.elf\n"
|
||||||
) "mkdir $out\n" targets);
|
) "mkdir $out\n" targets);
|
||||||
|
|
||||||
allOutputs = allTargetCrates // fsblCrates // { inherit cargo-xbuild szl; };
|
allOutputs = {
|
||||||
|
inherit cargo-xbuild szl;
|
||||||
|
zc706-fsbl = fsbl { board = "zc706"; };
|
||||||
|
} // allTargetCrates ;
|
||||||
in {
|
in {
|
||||||
packages.x86_64-linux = allOutputs;
|
packages.x86_64-linux = allOutputs;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user