From 60e554c501b8023d5d49501dd69fba6b3df9423a Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sat, 1 Aug 2020 10:31:07 +0800 Subject: [PATCH] artiq: use new misoc for artiq-6 --- artiq-fast/default.nix | 5 +++-- artiq-fast/pkgs/python-deps.nix | 26 +++++++++++++++++--------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/artiq-fast/default.nix b/artiq-fast/default.nix index 9959b2f..f95aaa6 100644 --- a/artiq-fast/default.nix +++ b/artiq-fast/default.nix @@ -1,7 +1,8 @@ { pkgs ? import {}}: with pkgs; let - pythonDeps = import ./pkgs/python-deps.nix { inherit (pkgs) stdenv fetchFromGitHub python3Packages; }; + artiq6 = pkgs.lib.strings.versionAtLeast mainPackages.artiq.version "6.0"; + pythonDeps = import ./pkgs/python-deps.nix { inherit (pkgs) stdenv fetchFromGitHub python3Packages; misoc-new = artiq6; }; boards = [ { target = "kasli"; variant = "tester"; } @@ -145,6 +146,6 @@ let }; }; - condaWindows = if (pkgs.lib.strings.versionAtLeast mainPackages.artiq.version "6.0") then condaWindowsExperimental else condaWindowsLegacy; + condaWindows = if artiq6 then condaWindowsExperimental else condaWindowsLegacy; in boardPackages // mainPackages // condaNoarch // condaLinux // condaWindows diff --git a/artiq-fast/pkgs/python-deps.nix b/artiq-fast/pkgs/python-deps.nix index ad76745..1714454 100644 --- a/artiq-fast/pkgs/python-deps.nix +++ b/artiq-fast/pkgs/python-deps.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, python3Packages }: +{ stdenv, fetchFromGitHub, python3Packages, misoc-new }: rec { # User dependencies @@ -53,16 +53,24 @@ rec { }; # Development/firmware dependencies - misoc = python3Packages.buildPythonPackage rec { + misoc = python3Packages.buildPythonPackage { name = "misoc"; - src = fetchFromGitHub { - owner = "m-labs"; - repo = "misoc"; - rev = "7e5fe8d38835175202dad2c51d37b20b76fd9e16"; - sha256 = "0i8bppz7x2s45lx9n49c0r87pqps09z35yzc17amvx21qsplahxn"; - fetchSubmodules = true; - }; + src = if misoc-new + then (fetchFromGitHub { + owner = "m-labs"; + repo = "misoc"; + rev = "9cad449a283d3b7a6e496afa523547df06e75829"; + sha256 = "1fw3qfhaa435iv5qnvhhfwj29skhkj6yagr6ila9va9nb2zvklf5"; + fetchSubmodules = true; + }) + else (fetchFromGitHub { + owner = "m-labs"; + repo = "misoc"; + rev = "7e5fe8d38835175202dad2c51d37b20b76fd9e16"; + sha256 = "0i8bppz7x2s45lx9n49c0r87pqps09z35yzc17amvx21qsplahxn"; + fetchSubmodules = true; + }); # TODO: fix misoc bitrot and re-enable tests doCheck = false;