2020-01-21 13:55:18 +08:00
|
|
|
{ pkgs ? import <nixpkgs> {}}:
|
2019-02-14 15:29:42 +08:00
|
|
|
with pkgs;
|
|
|
|
let
|
2019-08-23 17:01:39 +08:00
|
|
|
pythonDeps = import ./pkgs/python-deps.nix { inherit (pkgs) stdenv fetchFromGitHub python3Packages; };
|
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
|
|
|
|
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 {
|
2020-06-09 15:52:36 +08:00
|
|
|
inherit (pythonDeps) sipyco asyncserial pythonparser pyqtgraph-qt5 misoc migen microscope jesd204b migen-axi lit outputcheck;
|
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 {};
|
2020-04-04 13:02:18 +08:00
|
|
|
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; });
|
2020-04-04 13:02:18 +08:00
|
|
|
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; };
|
2020-06-28 17:29:40 +08:00
|
|
|
artiq = callPackage ./pkgs/artiq.nix { inherit 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}"; });
|
2019-02-19 21:18:38 +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; } {
|
|
|
|
name = "conda-pythonparser";
|
|
|
|
src = import ./conda/fake-source.nix { inherit pkgs; } {
|
|
|
|
name = "pythonparser";
|
|
|
|
inherit (pythonDeps.pythonparser) version src;
|
2020-07-28 13:18:07 +08:00
|
|
|
extraSrcCommands = "patch -p1 < ${./pkgs/pythonparserver.patch}";
|
2020-06-09 15:43:18 +08:00
|
|
|
dependencies = ["regex"];
|
|
|
|
};
|
|
|
|
};
|
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-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; } {
|
|
|
|
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;
|
2020-06-22 15:22:25 +08:00
|
|
|
inherit (mainPackages.openocd) 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; } {
|
|
|
|
name = "conda-asyncserial";
|
|
|
|
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
|
|
|
|
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 = {
|
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
|
|
|
|
2020-07-22 08:24:37 +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
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
condaWindows = if (pkgs.lib.strings.versionAtLeast mainPackages.artiq.version "6.0") 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
|