Flake support #164

Closed
mwojcik wants to merge 7 commits from mwojcik:flake_support into master
2 changed files with 2 additions and 3 deletions
Showing only changes of commit ba6c33ad21 - Show all commits

View File

@ -33,7 +33,7 @@ not implemented as it seems not very useful.
Development instructions
------------------------
ARTIQ Zynq is packaged using the [Nix](https://nixos.org) Flakes system. Install Nix 2.4+ and enable flakes by adding ``experimental-features = nix-command flakes`` to ``nix.conf`` (e.g. ``~/.config/nix/nix.conf``).
ARTIQ on Zynq is packaged using the [Nix](https://nixos.org) Flakes system. Install Nix 2.4+ and enable flakes by adding ``experimental-features = nix-command flakes`` to ``nix.conf`` (e.g. ``~/.config/nix/nix.conf``).
Pure build with Nix and execution on a remote JTAG server:
@ -55,7 +55,6 @@ cd ..
Notes:
- This is developed with Nixpkgs 21.11, and the ``nixbld.m-labs.hk`` binary substituter can also be used here (see the ARTIQ manual for the public key and instructions).
- The impure build process is also compatible with non-Nix systems.
Outdated
Review

No need to specify nixpkgs version here if we have flakes.

No need to specify nixpkgs version here if we have flakes.
- When calling make, you need to specify both the variant and firmware type.
- Firmware type must be either ``runtime`` for DRTIO-less or DRTIO master variants, or ``satman`` for DRTIO satellite.

View File

@ -3,7 +3,7 @@
inputs.nixpkgs.url = github:NixOS/nixpkgs/nixos-21.11;
inputs.mozilla-overlay = { url = github:mozilla/nixpkgs-mozilla; flake = false; };
inputs.zynq-rs.url = git+file:///home/spaqin/m-labs/zynq-rs;
inputs.zynq-rs.url = git+https://git.m-labs.hk/m-labs/zynq-rs;
Outdated
Review

That won't work outside your machine.

That won't work outside your machine.

Oh yes I completely forgot! Also need to do a zynq-rs PR first before this can be merged.

Oh yes I completely forgot! Also need to do a zynq-rs PR first before this can be merged.

flake.lock will also need updating after the merge...

flake.lock will also need updating after the merge...
inputs.artiq.url = git+https://github.com/m-labs/artiq.git;
Review

You should sync nixpkgs, otherwise there can be three different versions of it involved, resulting in bloat. I suggest using ARTIQ nixpkgs as reference, so I guess it would be something like:

zynq-rs.inputs.nixpkgs.follows = inputs.artiq.nixpkgs;

and below:

pkgs = import artiq.inputs.nixpkgs { system = ...

and remove input.nixpkgs.

You should sync nixpkgs, otherwise there can be three different versions of it involved, resulting in bloat. I suggest using ARTIQ nixpkgs as reference, so I guess it would be something like: ``` zynq-rs.inputs.nixpkgs.follows = inputs.artiq.nixpkgs; ``` and below: ``` pkgs = import artiq.inputs.nixpkgs { system = ... ``` and remove ``input.nixpkgs``.
outputs = { self, nixpkgs, mozilla-overlay, zynq-rs, artiq }: