nix-scripts/artiq-fast/default.nix

172 lines
7.0 KiB
Nix
Raw Normal View History

{ pkgs ? import <nixpkgs> { overlays = [ (import ./mozilla-overlay.nix) ]; }}:
with pkgs;
let
2020-08-01 10:31:07 +08:00
artiq6 = pkgs.lib.strings.versionAtLeast mainPackages.artiq.version "6.0";
artiq7 = pkgs.lib.strings.versionAtLeast mainPackages.artiq.version "7.0";
pythonDeps = import ./pkgs/python-deps.nix { inherit (pkgs) lib fetchgit fetchFromGitHub python3Packages; misoc-new = artiq7; };
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;
2020-06-22 15:13:02 +08:00
2019-04-19 19:49:07 +08:00
mainPackages = rec {
inherit (pythonDeps) sipyco artiq_tools asyncserial pythonparser artiq-netboot misoc migen microscope jesd204b migen-axi lit outputcheck qasync pyqtgraph;
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
2021-03-10 05:48:37 +08:00
((lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) {
2019-04-13 15:36:16 +08:00
stdenv = overrideCC stdenv gcc6; # with gcc-7: undefined reference to `__divmoddi4'
}) //
{ inherit llvm-or1k; });
cargo = callPackage ./pkgs/rust/cargo.nix { inherit rustc; rustPlatform = rustPackages_1_45.rustPlatform; };
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; };
2020-08-01 10:40:00 +08:00
artiq = callPackage ./pkgs/artiq.nix { inherit pythonDeps binutils-or1k binutils-arm 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}"; });
openocd = callPackage ./pkgs/openocd.nix { };
2020-06-22 15:13:02 +08:00
};
2020-06-09 14:30:23 +08:00
2020-06-22 15:13:02 +08:00
condaNoarch = {
2020-06-09 15:43:18 +08:00
conda-pythonparser = import ./conda/build.nix { inherit pkgs; } {
pname = "conda-pythonparser";
inherit (pythonDeps.pythonparser) version;
2020-06-09 15:43:18 +08:00
src = import ./conda/fake-source.nix { inherit pkgs; } {
name = "pythonparser";
inherit (pythonDeps.pythonparser) version src;
dependencies = ["regex"];
};
};
2020-06-09 14:30:23 +08:00
conda-sipyco = import ./conda/build.nix { inherit pkgs; } {
pname = "conda-sipyco";
inherit (pythonDeps.sipyco) version;
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-16 19:50:13 +08:00
dependencies = ["numpy"];
2019-11-07 19:34:36 +08:00
};
};
2020-06-10 11:43:35 +08:00
conda-quamash = import ./conda/build.nix { inherit pkgs; } {
pname = "conda-quamash";
inherit (pkgs.python3Packages.quamash) version;
2020-06-10 11:43:35 +08:00
src = import ./conda/fake-source.nix { inherit pkgs; } {
name = "quamash";
inherit (pkgs.python3Packages.quamash) version src;
};
};
conda-qasync = import ./conda/build.nix { inherit pkgs; } {
pname = "conda-qasync";
inherit (pythonDeps.qasync) version;
src = import ./conda/fake-source.nix { inherit pkgs; } {
name = "qasync";
inherit (pythonDeps.qasync) version src;
};
2020-06-10 11:43:35 +08:00
};
conda-pyqtgraph = import ./conda/build.nix { inherit pkgs; } {
pname = "conda-pyqtgraph";
inherit (pythonDeps.pyqtgraph) version;
src = import ./conda/fake-source.nix { inherit pkgs; } {
name = "pyqtgraph";
inherit (pythonDeps.pyqtgraph) version src;
};
};
2020-06-09 15:29:18 +08:00
conda-bscan-spi-bitstreams = import ./conda/bscan-spi-bitstreams.nix {
inherit pkgs;
bscan_spi_bitstreams = "${mainPackages.openocd}/share/bscan-spi-bitstreams";
2020-06-09 15:29:18 +08:00
};
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; } {
pname = "conda-asyncserial";
inherit (pythonDeps.asyncserial) version;
2020-06-09 16:08:14 +08:00
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
2020-06-22 15:22:25 +08:00
condaLinux = rec {
2020-06-22 15:13:02 +08:00
conda-binutils-or1k = import ./conda/binutils.nix {
inherit pkgs;
inherit (mainPackages.binutils-or1k) version src;
target = "or1k-linux";
};
conda-binutils-arm = import ./conda/binutils.nix {
inherit pkgs;
inherit (mainPackages.binutils-arm) version src;
target = "armv7-unknown-linux-gnueabihf";
};
conda-llvm-or1k = import ./conda/llvm-or1k.nix {
inherit pkgs;
inherit (mainPackages.llvm-or1k) version;
src = mainPackages.llvm-or1k.llvm-src;
};
conda-llvmlite-artiq = import ./conda/llvmlite-artiq.nix {
inherit pkgs conda-llvm-or1k;
inherit (mainPackages.llvmlite-artiq) version src;
};
};
2020-06-22 12:33:36 +08:00
condaWindowsLegacy = {
conda-windows-binutils-or1k = import ./conda-windows/redistribute.nix {
2020-06-15 20:11:19 +08:00
inherit pkgs;
name = "binutils-or1k";
filename = "binutils-or1k-linux-2.27-h93a10e1_6.tar.bz2";
baseurl = "https://anaconda.org/m-labs/binutils-or1k-linux/2.27/download/win-64/";
sha256 = "0gbks36hfsx3893mihj0bdmg5vwccrq5fw8xp9b9xb8p5pr8qhzx";
2020-06-15 20:11:19 +08:00
};
conda-windows-llvm-or1k = import ./conda-windows/redistribute.nix {
2020-06-15 20:11:19 +08:00
inherit pkgs;
name = "llvm-or1k";
filename = "llvm-or1k-6.0.0-25.tar.bz2";
baseurl = "https://anaconda.org/m-labs/llvm-or1k/6.0.0/download/win-64/";
sha256 = "06mnrg79rn9ni0d5z0x3jzb300nhqhbc2h9qbq5m50x3sgm8km63";
2020-06-15 20:11:19 +08:00
};
conda-windows-llvmlite-artiq = import ./conda-windows/redistribute.nix {
2020-06-16 15:32:48 +08:00
inherit pkgs;
name = "llvmlite-artiq";
filename = "llvmlite-artiq-0.23.0.dev-py35_5.tar.bz2";
baseurl = "https://anaconda.org/m-labs/llvmlite-artiq/0.23.0.dev/download/win-64/";
sha256 = "10w24w5ljvan06pbvwqj4pzal072jnyynmwm42dn06pq88ryz9wj";
2020-06-16 16:23:47 +08:00
};
2019-07-17 20:27:03 +08:00
};
2020-06-22 12:33:36 +08:00
2020-07-22 08:24:37 +08:00
condaWindowsExperimental = rec {
conda-windows-binutils-or1k = import ./conda-windows/binutils.nix {
inherit pkgs;
inherit (mainPackages.binutils-or1k) version src;
target = "or1k-linux";
};
conda-windows-binutils-arm = import ./conda-windows/binutils.nix {
2020-06-22 12:57:52 +08:00
inherit pkgs;
inherit (mainPackages.binutils-or1k) version src;
target = "armv7-unknown-linux-gnueabihf";
};
conda-windows-llvm-or1k = import ./conda-windows/llvm-or1k.nix {
2020-06-22 12:33:36 +08:00
inherit pkgs;
inherit (mainPackages.llvm-or1k) version;
src = mainPackages.llvm-or1k.llvm-src;
2020-06-22 12:33:36 +08:00
};
conda-windows-llvmlite-artiq = import ./conda-windows/llvmlite-artiq.nix {
inherit pkgs conda-windows-llvm-or1k;
inherit (mainPackages.llvmlite-artiq) version src;
2020-06-22 12:33:36 +08:00
};
};
2020-08-01 10:31:07 +08:00
condaWindows = if artiq6 then condaWindowsExperimental else condaWindowsLegacy;
2019-04-19 19:49:07 +08:00
in
2020-06-22 15:13:02 +08:00
boardPackages // mainPackages // condaNoarch // condaLinux // condaWindows