artiq: fix use of Qt

This commit is contained in:
Sebastien Bourdeauducq 2020-07-17 11:48:43 +08:00
parent cc00cfc1a8
commit e75d16f55a
1 changed files with 14 additions and 2 deletions

View File

@ -1,4 +1,4 @@
{ stdenv, lib, callPackage, fetchgit, git, python3Packages, qt5Full, binutils-or1k, binutils-arm, llvm-or1k, llvmlite-artiq, libartiq-support, lit, outputcheck }: { stdenv, lib, callPackage, fetchgit, git, python3Packages, qt5, binutils-or1k, binutils-arm, llvm-or1k, llvmlite-artiq, libartiq-support, lit, outputcheck }:
let let
pythonDeps = callPackage ./python-deps.nix {}; pythonDeps = callPackage ./python-deps.nix {};
@ -7,11 +7,21 @@ in
name = "artiq-${version}"; name = "artiq-${version}";
version = import ./artiq-version.nix { inherit stdenv fetchgit git; }; version = import ./artiq-version.nix { inherit stdenv fetchgit git; };
src = import ./artiq-src.nix { inherit fetchgit; }; src = import ./artiq-src.nix { inherit fetchgit; };
preBuild = "export VERSIONEER_OVERRIDE=${version}"; preBuild = "export VERSIONEER_OVERRIDE=${version}";
propagatedBuildInputs = [ binutils-or1k llvm-or1k llvmlite-artiq qt5Full ]
nativeBuildInputs = [ qt5.wrapQtAppsHook ];
propagatedBuildInputs = [ binutils-or1k llvm-or1k llvmlite-artiq ]
++ (lib.lists.optionals (lib.strings.versionAtLeast version "6.0") [ binutils-arm ]) ++ (lib.lists.optionals (lib.strings.versionAtLeast version "6.0") [ binutils-arm ])
++ (with pythonDeps; [ sipyco pyqtgraph-qt5 pythonparser ]) ++ (with pythonDeps; [ sipyco pyqtgraph-qt5 pythonparser ])
++ (with python3Packages; [ pygit2 numpy dateutil quamash scipy prettytable pyserial python-Levenshtein h5py pyqt5 ]); ++ (with python3Packages; [ pygit2 numpy dateutil quamash scipy prettytable pyserial python-Levenshtein h5py pyqt5 ]);
dontWrapQtApps = true;
postFixup = ''
wrapQtApp "$out/bin/artiq_dashboard"
wrapQtApp "$out/bin/artiq_browser"
'';
checkInputs = [ binutils-or1k outputcheck ]; checkInputs = [ binutils-or1k outputcheck ];
checkPhase = checkPhase =
'' ''
@ -21,6 +31,8 @@ in
cp --no-preserve=mode,ownership -R ${src}/artiq/test/lit $TESTDIR cp --no-preserve=mode,ownership -R ${src}/artiq/test/lit $TESTDIR
LIBARTIQ_SUPPORT=${libartiq-support}/libartiq_support.so ${lit}/bin/lit -v $TESTDIR/lit LIBARTIQ_SUPPORT=${libartiq-support}/libartiq_support.so ${lit}/bin/lit -v $TESTDIR/lit
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "A leading-edge control system for quantum information experiments"; description = "A leading-edge control system for quantum information experiments";
homepage = https://m-labs/artiq; homepage = https://m-labs/artiq;