nix-scripts/artiq-fast/default.nix

107 lines
4.2 KiB
Nix
Raw Normal View History

{ pkgs ? import <nixpkgs> {}}:
with pkgs;
let
pythonDeps = import ./pkgs/python-deps.nix { inherit (pkgs) stdenv fetchFromGitHub python3Packages; };
2019-02-19 21:18:38 +08:00
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;
}) {} boards;
2019-04-19 19:49:07 +08:00
mainPackages = rec {
2020-06-09 15:52:36 +08:00
inherit (pythonDeps) sipyco asyncserial pythonparser pyqtgraph-qt5 misoc migen microscope jesd204b migen-axi lit outputcheck;
binutils-or1k = callPackage ./pkgs/binutils.nix { platform = "or1k"; target = "or1k-linux"; };
binutils-arm = callPackage ./pkgs/binutils.nix { platform = "arm"; target = "armv7-unknown-linux-gnueabihf"; };
llvm-or1k = callPackage ./pkgs/llvm-or1k.nix {};
rustc = callPackage ./pkgs/rust/rustc-with-crates.nix
2019-04-13 15:36:16 +08:00
((stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) {
stdenv = overrideCC stdenv gcc6; # with gcc-7: undefined reference to `__divmoddi4'
}) //
{ inherit llvm-or1k; });
cargo = callPackage ./pkgs/rust/cargo.nix { inherit rustc; };
cargo-vendor = callPackage ./pkgs/rust/cargo-vendor.nix {};
2019-02-19 21:18:38 +08:00
llvmlite-artiq = callPackage ./pkgs/llvmlite-artiq.nix { inherit llvm-or1k; };
2019-03-31 22:18:36 +08:00
libartiq-support = callPackage ./pkgs/libartiq-support.nix { inherit rustc; };
2019-03-31 22:33:19 +08:00
artiq = callPackage ./pkgs/artiq.nix { inherit binutils-or1k llvm-or1k llvmlite-artiq libartiq-support lit outputcheck; };
2019-03-06 23:01:11 +08:00
artiq-env = (pkgs.python3.withPackages(ps: [ artiq ])).overrideAttrs (oldAttrs: { name = "${pkgs.python3.name}-artiq-env-${artiq.version}"; });
2019-02-19 21:18:38 +08:00
openocd = callPackage ./pkgs/openocd.nix {};
2020-06-09 14:30:23 +08:00
2020-06-09 15:43:18 +08:00
conda-pythonparser = import ./conda/build.nix { inherit pkgs; } {
name = "conda-pythonparser";
src = import ./conda/fake-source.nix { inherit pkgs; } {
name = "pythonparser";
inherit (pythonDeps.pythonparser) version src;
extraSrcCommands = "patch -p1 < ${./pkgs/python37hack.patch}";
dependencies = ["regex"];
};
};
2020-06-09 17:29:38 +08:00
conda-binutils-or1k = import ./conda/binutils.nix {
inherit pkgs;
inherit (binutils-or1k) version src;
target = "or1k-linux";
};
conda-binutils-arm = import ./conda/binutils.nix {
inherit pkgs;
inherit (binutils-arm) version src;
target = "armv7-unknown-linux-gnueabihf";
};
2020-06-09 18:21:54 +08:00
conda-llvm-or1k = import ./conda/llvm-or1k.nix {
inherit pkgs;
inherit (llvm-or1k) version;
src = llvm-or1k.llvm-src;
};
2020-06-10 11:53:43 +08:00
conda-llvmlite-artiq = import ./conda/llvmlite-artiq.nix {
inherit pkgs conda-llvm-or1k;
inherit (llvmlite-artiq) version src;
};
2020-06-09 14:30:23 +08:00
conda-sipyco = import ./conda/build.nix { inherit pkgs; } {
2019-11-07 19:34:36 +08:00
name = "conda-sipyco";
2020-06-09 14:30:23 +08:00
src = import ./conda/fake-source.nix { inherit pkgs; } {
2019-11-07 19:34:36 +08:00
name = "sipyco";
inherit (pythonDeps.sipyco) version src;
};
};
2020-06-10 11:43:35 +08:00
conda-quamash = import ./conda/build.nix { inherit pkgs; } {
name = "conda-quamash";
src = import ./conda/fake-source.nix { inherit pkgs; } {
name = "quamash";
inherit (pkgs.python3Packages.quamash) version src;
};
};
2020-06-09 15:29:18 +08:00
conda-bscan-spi-bitstreams = import ./conda/bscan-spi-bitstreams.nix {
inherit pkgs;
inherit (openocd) bscan_spi_bitstreams;
};
2020-06-09 14:30:23 +08:00
conda-artiq = import ./conda/artiq.nix { inherit pkgs; };
2020-06-09 16:08:14 +08:00
conda-asyncserial = import ./conda/build.nix { inherit pkgs; } {
name = "conda-asyncserial";
src = import ./conda/fake-source.nix { inherit pkgs; } {
name = "asyncserial";
inherit (pythonDeps.asyncserial) version src;
dependencies = ["pyserial"];
};
};
2020-06-15 20:11:19 +08:00
conda-windows-binutils-or1k = import ./conda-windows/binutils.nix {
inherit pkgs;
inherit (binutils-or1k) version src;
target = "or1k-linux";
};
conda-windows-binutils-arm = import ./conda-windows/binutils.nix {
inherit pkgs;
inherit (binutils-arm) version src;
target = "armv7-unknown-linux-gnueabihf";
};
2019-07-17 20:27:03 +08:00
};
2019-04-19 19:49:07 +08:00
in
2019-07-17 20:27:03 +08:00
mainPackages // boardPackages