1
0
Fork 0

cleanup and move board packages to default.nix for installation from channel

This commit is contained in:
Sebastien Bourdeauducq 2019-02-15 18:17:34 +08:00
parent d9f6661fa3
commit 04c482e2f4
8 changed files with 33 additions and 36 deletions

View File

@ -5,7 +5,6 @@
{ target, variant, buildCommand ? "python -m artiq.gateware.targets.${target} -V ${variant}" }:
let
artiqPkgs = import ./default.nix { inherit pkgs; };
fetchcargo = import ./fetchcargo.nix {
inherit (pkgs) stdenv cacert git cargo cargo-vendor;
};

View File

@ -1,4 +1,4 @@
{ pkgs ? import <nixpkgs> {}}:
{ pkgs }:
let
artiqpkgs = import ./default.nix { inherit pkgs; };

View File

@ -1,4 +1,4 @@
{ pkgs ? import <nixpkgs> {}}:
{ pkgs }:
{ artiqSrc, boardBinaries, target, variant }:
with pkgs;

View File

@ -1,9 +1,9 @@
{ pkgs ? import <nixpkgs> {}}:
{ artiqSrc }:
{ pkgs }:
with pkgs;
let
artiqSrc = import ./pkgs/artiq-src.nix { inherit fetchgit; };
fakeCondaSource = runCommand "fake-condasrc-artiq" { }
''
cp --no-preserve=mode,ownership -R ${artiqSrc} $out

View File

@ -1,7 +1,7 @@
# We need to pass the whole source to conda for the git variables to work.
# recipe must be a string pointing to a path within the source.
{ pkgs ? import <nixpkgs> {}}:
{ pkgs }:
{ name, src, recipe }:
with pkgs;

View File

@ -7,6 +7,27 @@ let
stdenv = overrideCC stdenv gcc6; # with gcc-7: undefined reference to `__divmoddi4'
});
llvm-src = callPackage ./fetch-llvm-clang.nix {};
boards = [
{ target = "kasli"; variant = "tester"; }
{ target = "kc705"; variant = "nist_clock"; }
];
boardPackages = pkgs.lib.lists.foldr (board: start:
let
boardBinaries = import ./artiq-board.nix { inherit pkgs; } {
target = board.target;
variant = board.variant;
};
in
start // {
"artiq-board-${board.target}-${board.variant}" = boardBinaries;
"conda-artiq-board-${board.target}-${board.variant}" = import ./conda-artiq-board.nix { inherit pkgs; } {
artiqSrc = import ./pkgs/artiq-src.nix { fetchgit = pkgs.fetchgit; };
boardBinaries = boardBinaries;
target = board.target;
variant = board.variant;
};
}) {} boards;
in rec {
inherit (rust) rustc;
inherit (callPackage ./pkgs/python3Packages.nix {}) migen microscope misoc jesd204b;
@ -15,4 +36,6 @@ in rec {
llvmlite = callPackage ./pkgs/llvmlite.nix { inherit llvm-or1k; };
artiq = callPackage ./pkgs/artiq.nix { inherit binutils-or1k; inherit llvm-or1k; inherit llvmlite; };
openocd = callPackage ./pkgs/openocd.nix {};
}
conda-artiq = import ./conda-artiq.nix { inherit pkgs; };
} // boardPackages

View File

@ -1,5 +1,6 @@
{ pkgs ? import <nixpkgs> {}}:
let
pkgs = import <nixpkgs> {};
artiqpkgs = import ./default.nix { inherit pkgs; };
in
pkgs.mkShell {

View File

@ -16,34 +16,8 @@ let
}
EOF
'';
artiqPkgs = import "${generatedNix}/default.nix" { inherit pkgs; };
boards = [
{ target = "kasli"; variant = "tester"; }
{ target = "kc705"; variant = "nist_clock"; }
];
boardJobs = pkgs.lib.lists.foldr (board: start:
let
boardBinaries = import "${generatedNix}/artiq-board.nix" { inherit pkgs; } {
target = board.target;
variant = board.variant;
};
in
start // {
"artiq-board-${board.target}-${board.variant}" = boardBinaries;
"conda-artiq-board-${board.target}-${board.variant}" = import "${generatedNix}/conda-artiq-board.nix" { inherit pkgs; } {
artiqSrc = import "${generatedNix}/pkgs/artiq-src.nix" { fetchgit = pkgs.fetchgit; };
boardBinaries = boardBinaries;
target = board.target;
variant = board.variant;
};
}) {} boards;
jobs = {
conda-artiq = import "${generatedNix}/conda-artiq.nix" { inherit pkgs; } {
artiqSrc = import "${generatedNix}/pkgs/artiq-src.nix" { fetchgit = pkgs.fetchgit; };
};
} // boardJobs // artiqPkgs;
artiqpkgs = import "${generatedNix}/default.nix" { inherit pkgs; };
jobs = builtins.mapAttrs (key: value: pkgs.lib.hydraJob value) artiqpkgs;
in
jobs // {
channel = pkgs.releaseTools.channel {