Flake support #164

Closed
mwojcik wants to merge 7 commits from mwojcik:flake_support into master

Tested nix develop to build kasli-soc fw; nix build for zc706 in various variants.

Weirdly enough didn't get any errors when using nixpkgs, that would indicate that an older version is required.

Tested ``nix develop`` to build kasli-soc fw; ``nix build`` for zc706 in various variants. Weirdly enough didn't get any errors when using nixpkgs, that would indicate that an older version is required.
mwojcik added 5 commits 2022-02-04 17:06:23 +08:00
sb10q reviewed 2022-02-04 17:14:50 +08:00
README.md Outdated
@ -63,3 +56,3 @@
Notes:
- This is developed with Nixpkgs 21.05[^1], and the ``nixbld.m-labs.hk`` binary substituter can also be used here (see the ARTIQ manual for the public key and instructions).
- 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).

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

No need to specify nixpkgs version here if we have flakes.
sb10q reviewed 2022-02-04 17:15:28 +08:00
flake.nix Outdated
@ -0,0 +3,4 @@
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;

That won't work outside your machine.

That won't work outside your machine.
Poster
Owner

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.
Poster
Owner

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

flake.lock will also need updating after the merge...
mwojcik added 1 commit 2022-02-04 17:30:55 +08:00
sb10q reviewed 2022-02-04 18:46:16 +08:00
README.md Outdated
@ -70,3 +62,1 @@
- To update ``zynq-rs``, update the cargo files as per usual for Rust projects, but also keep ``zynq-rs.nix`` in sync.
[^1]: Thus, on newer version of NixOS, you should run `nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/21.05.tar.gz` instead
- To update ``zynq-rs``, update the cargo files as per usual for Rust projects, but also keep ``flake.nix`` in sync.

That would be flake.lock.

That would be ``flake.lock``.
mwojcik added 1 commit 2022-02-04 18:48:51 +08:00
sb10q reviewed 2022-02-04 18:59:38 +08:00
@ -0,0 +4,4 @@
inputs.nixpkgs.url = github:NixOS/nixpkgs/nixos-21.11;
inputs.mozilla-overlay = { url = github:mozilla/nixpkgs-mozilla; flake = false; };
inputs.zynq-rs.url = git+https://git.m-labs.hk/m-labs/zynq-rs;
inputs.artiq.url = git+https://github.com/m-labs/artiq.git;

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``.

Merged manually

Merged manually
sb10q closed this pull request 2022-02-05 16:34:58 +08:00

Pull request closed

Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/artiq-zynq#164
There is no content yet.