forked from M-Labs/nix-scripts
shells (artiq-fast): change artiqpkgs, vivado to arguments
This allows overriding the artiqpkgs used downstream. The issue is that previously artiqpkgs required <artiqSrc> to be defined, and overriding that required setting paths, added complexity, and possible impurities. This solution allows reuse of the shell[-dev], from a given version of ARTIQ, without necessarily specifying source or a local source repo.
This commit is contained in:
parent
9a8a59c525
commit
47960f539b
@ -1,9 +1,8 @@
|
||||
{ pkgs ? import <nixpkgs> {}}:
|
||||
{ pkgs ? import <nixpkgs> {}
|
||||
, artiqpkgs ? import ./default.nix { inherit pkgs; }
|
||||
, vivado ? import ./vivado.nix { inherit pkgs; }
|
||||
}:
|
||||
|
||||
let
|
||||
artiqpkgs = import ./default.nix { inherit pkgs; };
|
||||
vivado = import ./vivado.nix { inherit pkgs; };
|
||||
in
|
||||
assert pkgs.lib.asserts.assertMsg (!pkgs.lib.strings.versionAtLeast artiqpkgs.artiq.version "7.0") "For ARTIQ 7+, use 'nix develop' on the flake instead.";
|
||||
pkgs.mkShell {
|
||||
buildInputs = [
|
||||
|
@ -1,8 +1,7 @@
|
||||
{ pkgs ? import <nixpkgs> {}}:
|
||||
{ pkgs ? import <nixpkgs> {}
|
||||
, artiqpkgs ? import ./default.nix { inherit pkgs; }
|
||||
}:
|
||||
|
||||
let
|
||||
artiqpkgs = import ./default.nix { inherit pkgs; };
|
||||
in
|
||||
pkgs.mkShell {
|
||||
buildInputs = [ (pkgs.python3.withPackages(ps: [artiqpkgs.artiq])) ];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user