2021-09-12 17:12:16 +08:00
|
|
|
{ pkgs ? import <nixpkgs> { overlays = [ (import ./mozilla-overlay.nix) ]; }}:
|
2019-02-14 15:29:42 +08:00
|
|
|
with pkgs;
|
|
|
|
let
|
2020-08-01 10:31:07 +08:00
|
|
|
artiq6 = pkgs.lib.strings.versionAtLeast mainPackages.artiq.version "6.0";
|
2021-07-27 11:07:08 +08:00
|
|
|
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
|
|
|
|
2019-02-15 18:17:34 +08:00
|
|
|
boards = [
|
|
|
|
{ target = "kasli"; variant = "tester"; }
|
|
|
|
{ target = "kc705"; variant = "nist_clock"; }
|
|
|
|
];
|
|
|
|
boardPackages = pkgs.lib.lists.foldr (board: start:
|
|
|
|
let
|
2022-02-24 10:06:04 +08:00
|
|
|
boardBinaries = import ./artiq-board.nix { inherit pkgs; } {
|
2019-02-15 18:17:34 +08:00
|
|
|
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 {
|
2022-02-24 10:06:04 +08:00
|
|
|
inherit (pythonDeps) sipyco artiq_tools asyncserial pythonparser artiq-netboot misoc migen microscope jesd204b migen-axi lit outputcheck qasync pyqtgraph;
|
2019-08-25 09:27:12 +08:00
|
|
|
binutils-or1k = callPackage ./pkgs/binutils.nix { platform = "or1k"; target = "or1k-linux"; };
|
2019-08-26 11:22:41 +08:00
|
|
|
binutils-arm = callPackage ./pkgs/binutils.nix { platform = "arm"; target = "armv7-unknown-linux-gnueabihf"; };
|
2019-04-13 16:49:49 +08:00
|
|
|
llvm-or1k = callPackage ./pkgs/llvm-or1k.nix {};
|
2022-02-24 10:06:04 +08:00
|
|
|
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; });
|
2022-02-24 10:06:04 +08:00
|
|
|
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; };
|
2022-02-24 10:06:04 +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}"; });
|
2021-07-27 10:22:07 +08:00
|
|
|
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; } {
|
2020-12-15 09:30:21 +08:00
|
|
|
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; } {
|
2020-12-15 09:30:21 +08:00
|
|
|
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; } {
|
2020-12-15 09:30:21 +08:00
|
|
|
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;
|
|
|
|
};
|
2020-12-12 21:58:04 +08:00
|
|
|
};
|
|
|
|
conda-qasync = import ./conda/build.nix { inherit pkgs; } {
|
2020-12-15 09:30:21 +08:00
|
|
|
pname = "conda-qasync";
|
|
|
|
inherit (pythonDeps.qasync) version;
|
2020-12-12 21:58:04 +08:00
|
|
|
src = import ./conda/fake-source.nix { inherit pkgs; } {
|
|
|
|
name = "qasync";
|
|
|
|
inherit (pythonDeps.qasync) version src;
|
|
|
|
};
|
2020-06-10 11:43:35 +08:00
|
|
|
};
|
2022-02-24 10:06:04 +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;
|
2021-07-26 17:21:57 +08:00
|
|
|
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; } {
|
2020-12-15 09:30:21 +08:00
|
|
|
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-18 16:05:20 +08:00
|
|
|
};
|
2020-06-15 20:11:19 +08:00
|
|
|
|
2022-02-24 10:06:04 +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;
|
|
|
|
};
|
2022-02-24 10:06:04 +08:00
|
|
|
};
|
2020-06-22 15:13:02 +08:00
|
|
|
|
2022-02-24 10:06:04 +08:00
|
|
|
condaWindowsLegacy = {
|
2020-06-20 13:56:15 +08:00
|
|
|
conda-windows-binutils-or1k = import ./conda-windows/redistribute.nix {
|
2020-06-15 20:11:19 +08:00
|
|
|
inherit pkgs;
|
2020-06-20 13:56:15 +08:00
|
|
|
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
|
|
|
};
|
2020-06-20 13:56:15 +08:00
|
|
|
conda-windows-llvm-or1k = import ./conda-windows/redistribute.nix {
|
2020-06-15 20:11:19 +08:00
|
|
|
inherit pkgs;
|
2020-06-20 13:56:15 +08:00
|
|
|
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
|
|
|
};
|
2020-06-20 13:56:15 +08:00
|
|
|
conda-windows-llvmlite-artiq = import ./conda-windows/redistribute.nix {
|
2020-06-16 15:32:48 +08:00
|
|
|
inherit pkgs;
|
2020-06-20 13:56:15 +08:00
|
|
|
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
|
|
|
|
2022-02-24 10:06:04 +08:00
|
|
|
condaWindowsExperimental = rec {
|
2020-07-24 09:35:06 +08:00
|
|
|
conda-windows-binutils-or1k = import ./conda-windows/binutils.nix {
|
2020-07-22 06:43:56 +08:00
|
|
|
inherit pkgs;
|
2020-07-24 09:35:29 +08:00
|
|
|
inherit (mainPackages.binutils-or1k) version src;
|
2020-07-22 06:43:56 +08:00
|
|
|
target = "or1k-linux";
|
|
|
|
};
|
2020-07-24 09:35:06 +08:00
|
|
|
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";
|
|
|
|
};
|
2020-06-23 16:22:41 +08:00
|
|
|
conda-windows-llvm-or1k = import ./conda-windows/llvm-or1k.nix {
|
2020-06-22 12:33:36 +08:00
|
|
|
inherit pkgs;
|
2020-06-23 16:22:41 +08:00
|
|
|
inherit (mainPackages.llvm-or1k) version;
|
|
|
|
src = mainPackages.llvm-or1k.llvm-src;
|
2020-06-22 12:33:36 +08:00
|
|
|
};
|
2020-06-23 19:48:53 +08:00
|
|
|
conda-windows-llvmlite-artiq = import ./conda-windows/llvmlite-artiq.nix {
|
2020-06-23 22:27:18 +08:00
|
|
|
inherit pkgs conda-windows-llvm-or1k;
|
2020-06-23 19:48:53 +08:00
|
|
|
inherit (mainPackages.llvmlite-artiq) version src;
|
2020-06-22 12:33:36 +08:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-02-24 10:06:04 +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
|