flake: expose build, allow selection of output #191
No reviewers
Labels
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: M-Labs/artiq-zynq#191
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "mwojcik/artiq-zynq:flake_expose_build"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This will be necessary for zynq support in afws - first exposing the build function in the first place, secondly - allowing to specify the desired output instead of building everything (e.g. only
sd
).tested in terminal with
nix build -L --impure --expr 'let fl = builtins.getFlake "git+file:///home/spaqin/m-labs/artiq-zynq"; in fl.makeArtiqZynqPackage {target="zc706"; variant="nist_clock"; output="sd";}'
(kasli_soc json won't load? probably would have to specify nix sandbox whitelist) - and yes it builds only one.No, just follow what non-Zynq is doing.
@ -124,2 +124,3 @@
];
build = { target, variant, json ? null }: let
build = { target, variant, json ? null, output ? null }: let
# output - if null will build everything (fw, gw, jtag, sd) or can be specified to build only one
This is getting messy and there is already a standard Nix feature to do this: attributes. Refactoring needed?
Okay, yep I got it for both json (forgot path in Nix is a separate type) and the attributes. All good, just need to expose the function.