From 73a895b6e9e0a50c72ab018e2836f0d548b79ca1 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 12 Aug 2021 13:00:19 +0800 Subject: [PATCH] artiq: use nixpkgs pyqtgraph --- artiq-fast/default.nix | 2 +- artiq-fast/pkgs/artiq.nix | 4 ++-- artiq-fast/pkgs/python-deps.nix | 14 -------------- artiq-full.nix | 2 +- artiq-full/extras.nix | 6 +++--- 5 files changed, 7 insertions(+), 21 deletions(-) diff --git a/artiq-fast/default.nix b/artiq-fast/default.nix index d3af6aa..34e46d8 100644 --- a/artiq-fast/default.nix +++ b/artiq-fast/default.nix @@ -21,7 +21,7 @@ let }) {} boards; mainPackages = rec { - inherit (pythonDeps) sipyco asyncserial pythonparser pyqtgraph-qt5 artiq-netboot misoc migen microscope jesd204b migen-axi lit outputcheck qasync; + inherit (pythonDeps) sipyco asyncserial pythonparser artiq-netboot misoc migen microscope jesd204b migen-axi lit outputcheck qasync; 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 {}; diff --git a/artiq-fast/pkgs/artiq.nix b/artiq-fast/pkgs/artiq.nix index 5385e9b..0f3d76b 100644 --- a/artiq-fast/pkgs/artiq.nix +++ b/artiq-fast/pkgs/artiq.nix @@ -10,8 +10,8 @@ python3Packages.buildPythonPackage rec { nativeBuildInputs = [ qt5.wrapQtAppsHook ]; propagatedBuildInputs = [ binutils-or1k llvm-or1k llvmlite-artiq ] ++ (lib.lists.optionals (lib.strings.versionAtLeast version "6.0") [ binutils-arm ]) - ++ (with pythonDeps; [ sipyco pyqtgraph-qt5 pythonparser ]) - ++ (with python3Packages; [ pygit2 numpy dateutil scipy prettytable pyserial python-Levenshtein h5py pyqt5 ]) + ++ (with pythonDeps; [ sipyco pythonparser ]) + ++ (with python3Packages; [ pygit2 numpy dateutil scipy prettytable pyserial python-Levenshtein h5py pyqt5 pyqtgraph ]) ++ [(if (lib.strings.versionAtLeast version "6.0") then pythonDeps.qasync else python3Packages.quamash)]; dontWrapQtApps = true; diff --git a/artiq-fast/pkgs/python-deps.nix b/artiq-fast/pkgs/python-deps.nix index 8deede3..8d44e9f 100644 --- a/artiq-fast/pkgs/python-deps.nix +++ b/artiq-fast/pkgs/python-deps.nix @@ -39,20 +39,6 @@ rec { propagatedBuildInputs = with python3Packages; [ regex ]; }; - pyqtgraph-qt5 = python3Packages.buildPythonPackage rec { - pname = "pyqtgraph_qt5"; - version = "0.11.0"; - doCheck = false; - pythonImportsCheck = [ "pyqtgraph" ]; - src = fetchFromGitHub { - owner = "pyqtgraph"; - repo = "pyqtgraph"; - rev = "pyqtgraph-${version}"; - sha256 = "03fvpkqdn80ni51msvyivmghw41qk4vplwdqndkvzzzlppimdjbn"; - }; - propagatedBuildInputs = with python3Packages; [ scipy numpy pyqt5 pyopengl ]; - }; - qasync = python3Packages.buildPythonPackage rec { pname = "qasync"; version = "0.10.0"; diff --git a/artiq-full.nix b/artiq-full.nix index 6f9e500..e3d3629 100644 --- a/artiq-full.nix +++ b/artiq-full.nix @@ -208,7 +208,7 @@ let echo file device_db_template \$out/device_db.py >> \$out/nix-support/hydra-build-products "; })) drtio-systems; - extras = import ./extras.nix { inherit pkgs; inherit (artiq-fast) sipyco asyncserial pyqtgraph-qt5 artiq; }; + extras = import ./extras.nix { inherit pkgs; inherit (artiq-fast) sipyco asyncserial artiq; }; in artiq-fast // artiq-targets // drtio-ddbs // extras // rec { conda-artiq-board-kasli-tester = conda-artiq-board { diff --git a/artiq-full/extras.nix b/artiq-full/extras.nix index 4ebf325..dac48d4 100644 --- a/artiq-full/extras.nix +++ b/artiq-full/extras.nix @@ -1,4 +1,4 @@ -{ pkgs, sipyco, asyncserial, pyqtgraph-qt5, artiq }: +{ pkgs, sipyco, asyncserial, artiq }: let condaBuild = import ./fast/conda/build.nix { inherit pkgs; }; condaFakeSource = import ./fast/conda/fake-source.nix { inherit pkgs; }; @@ -267,8 +267,8 @@ in sha256 = "0mgjd92yifs24dg4b14vhawx5mdisbx6jqi5xf7fgkijzjp9hvs3"; }; pythonOptions = { - propagatedBuildInputs = [ artiq pyqtgraph-qt5 ] - ++ (with pkgs.python3Packages; [ numpy pyqt5 ]); + propagatedBuildInputs = [ artiq ] + ++ (with pkgs.python3Packages; [ numpy pyqt5 pyqtgraph ]); doCheck = false; }; condaOptions = { dependencies = [ "python>=3.5" "artiq" "numpy" "pyqt" "pyqtgraph" ]; };