forked from M-Labs/artiq
nix: support reusing dev environment in build scripts
This commit is contained in:
parent
154269b77a
commit
3917a0ef46
@ -28,7 +28,7 @@ The above command will setup your entire environment. Note that it will compile
|
||||
ARTIQ development environment with Nix
|
||||
======================================
|
||||
|
||||
Run ``nix-shell artiq-dev.nix`` to obtain an environment containing Migen, MiSoC, Microscope, jesd204b, Clang, Rust, Cargo, and OpenOCD in addition to the user environment above.
|
||||
Run ``nix-shell shell-dev.nix`` to obtain an environment containing Migen, MiSoC, Microscope, jesd204b, Clang, Rust, Cargo, and OpenOCD in addition to the user environment above.
|
||||
|
||||
This creates a FHS chroot environment in order to simplify the installation and patching of Xilinx Vivado (it needs to be installed manually e.g. in your home folder).
|
||||
|
||||
|
@ -1,8 +1,9 @@
|
||||
{runScript ? "", extraProfile ? ""}:
|
||||
|
||||
let
|
||||
pkgs = import <nixpkgs> {};
|
||||
artiqpkgs = import ./default.nix { inherit pkgs; };
|
||||
in
|
||||
(
|
||||
pkgs.buildFHSUserEnv {
|
||||
name = "artiq-dev";
|
||||
targetPkgs = pkgs: (
|
||||
@ -29,8 +30,8 @@ in
|
||||
openocd
|
||||
])
|
||||
);
|
||||
runScript = runScript;
|
||||
profile = ''
|
||||
export TARGET_AR=${artiqpkgs.binutils-or1k}/bin/or1k-linux-ar
|
||||
'';
|
||||
'' + extraProfile;
|
||||
}
|
||||
).env
|
||||
|
4
nix/shell-dev.nix
Normal file
4
nix/shell-dev.nix
Normal file
@ -0,0 +1,4 @@
|
||||
let
|
||||
artiq-dev = import ./artiq-dev.nix {};
|
||||
in
|
||||
artiq-dev.env
|
Loading…
Reference in New Issue
Block a user