From c09ab8502ce6e236b1f2eb2a8c5aab086e2b0f42 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 13 Dec 2018 06:57:10 +0800 Subject: [PATCH] nix: cleanup --- nix/default.nix | 2 +- nix/pkgs/python3Packages.nix | 43 +++--------------------------------- nix/shell.nix | 12 +--------- 3 files changed, 5 insertions(+), 52 deletions(-) diff --git a/nix/default.nix b/nix/default.nix index f06b6d289..72210c430 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -13,5 +13,5 @@ in rec { binutils-or1k = callPackage ./binutils-or1k.nix {}; llvm-or1k = callPackage ./llvm-or1k.nix { inherit llvm-src; }; llvmlite = callPackage ./llvmlite.nix { inherit llvm-or1k; }; - #artiq = callPackage ./artiq.nix { inherit binutils-or1k; }; + artiq = callPackage ./artiq.nix { inherit binutils-or1k; inherit llvm-or1k; inherit llvmlite; }; } diff --git a/nix/pkgs/python3Packages.nix b/nix/pkgs/python3Packages.nix index 0396772f6..cd102f416 100644 --- a/nix/pkgs/python3Packages.nix +++ b/nix/pkgs/python3Packages.nix @@ -28,11 +28,6 @@ rec { pname = "misoc"; name = "${pname}-${version}"; - # you can use the src definition to point to your local git checkout (don't forget the submodules) so - # hacking is easier! - #src = /home/bar/misoc; - - # instead of this (nixcloud team) src = fetchFromGitHub { owner = "m-labs"; repo = "misoc"; @@ -41,40 +36,8 @@ rec { fetchSubmodules = true; }; - # there are still so many tests failing (nixcloud team) - # ====================================================================== - # ERROR: framebuffer (unittest.loader._FailedTest) - # ---------------------------------------------------------------------- - # ImportError: Failed to import test module: framebuffer - # Traceback (most recent call last): - # File "/nix/store/bwfygfcdvis9wd1c1v51xwnwhw1hx0a0-python3-3.6.6/lib/python3.6/unittest/loader.py", line 153, in loadTestsFromName - # module = __import__(module_name) - # File "/build/source/misoc/cores/framebuffer/__init__.py", line 1, in - # from misoc.cores.framebuffer.core import Framebuffer - # File "/build/source/misoc/cores/framebuffer/core.py", line 2, in - # from migen.flow.network import * - # ModuleNotFoundError: No module named 'migen.flow' - # - # - # watch for these messages: - # writing manifest file 'misoc.egg-info/SOURCES.txt' - # running build_ext - # /nix/store/w7cmmmzafv81wwhkadpar6vdvbqphzdf-python3.6-bootstrapped-pip-18.1/lib/python3.6/site-packages/setuptools/dist.py:398: UserWarning: Normalizing '0.6.dev' to '0.6.dev0' - # normalized_version, - # debug (unittest.loader._FailedTest) - # Run the test without collecting errors in a TestResult ... ERROR - # framebuffer (unittest.loader._FailedTest) ... ERROR - # sdram_model (unittest.loader._FailedTest) ... ERROR - # test (unittest.loader._FailedTest) ... ERROR - # test_df (unittest.loader._FailedTest) ... ERROR - # test_wb (unittest.loader._FailedTest) ... ERROR - # test_refresher (unittest.loader._FailedTest) ... ERROR - # test_common (unittest.loader._FailedTest) ... ERROR - # test_lasmi (unittest.loader._FailedTest) ... ERROR - # test_bankmachine (unittest.loader._FailedTest) ... ERROR - # - # you can disable the tests (which is a bad idea, fix them instead) - # doCheck = false; + # TODO: fix misoc bitrot and re-enable tests + doCheck = false; propagatedBuildInputs = with python3Packages; [ pyserial jinja2 numpy asyncserial migen ]; @@ -98,7 +61,7 @@ rec { fetchSubmodules = true; }; - # FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/diamond' (nixcloud team) + # TODO: fix migen platform issues and re-enable tests doCheck = false; propagatedBuildInputs = with python3Packages; [ colorama sphinx sphinx_rtd_theme ] ++ (with pkgs; [ verilator ]); diff --git a/nix/shell.nix b/nix/shell.nix index 19515cc54..cbcea74f3 100644 --- a/nix/shell.nix +++ b/nix/shell.nix @@ -3,19 +3,9 @@ let artiqpkgs = import ./default.nix { inherit pkgs; }; in pkgs.mkShell { - # with this configuration we can't build kasli target(s) because misoc packaged via nix does not work correctly - # want to build using nix-shell anyway? easy: - # 1. remove misoc from the list below - # 2. nix-shell - # 3. export PYTHONPATH=$PYTHONPATH:/home/joachim/Desktop/projects/artiq-toolchain/misoc - # 4. cd artiq/gateware/targets - # 5. python kasli.py --no-compile-gateware - buildInputs = with artiqpkgs; [ rustc cargo binutils-or1k llvm-or1k llvmlite migen misoc ] + buildInputs = with artiqpkgs; [ rustc cargo binutils-or1k llvm-or1k llvmlite migen misoc artiq ] ++ (with pkgs; [ python3 python36Packages.jinja2 python36Packages.numpy ]); # for artiq the python lib... shellHook = '' export TARGET_AR=${artiqpkgs.binutils-or1k}/bin/or1k-linux-ar - export PYTHONPATH=$PYTHONPATH:`pwd`/.. - - echo "please see comments in nix/shell.nix and nix/pkgs/python3Packages.nix (nixcloud team)" ''; }