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

pull/16/head
parent d9f6661fa3
commit 04c482e2f4
  1. 1
      artiq/artiq-board.nix
  2. 2
      artiq/artiq-dev.nix
  3. 2
      artiq/conda-artiq-board.nix
  4. 4
      artiq/conda-artiq.nix
  5. 2
      artiq/conda-build.nix
  6. 25
      artiq/default.nix
  7. 3
      artiq/shell.nix
  8. 30
      main.nix

@ -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;
};

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

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

@ -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

@ -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;

@ -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

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

@ -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 {

Loading…
Cancel
Save