From e75d16f55aabe179677356d6c66ab83bfbe8a128 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Fri, 17 Jul 2020 11:48:43 +0800 Subject: [PATCH] artiq: fix use of Qt --- artiq-fast/pkgs/artiq.nix | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/artiq-fast/pkgs/artiq.nix b/artiq-fast/pkgs/artiq.nix index 977e043..f1f5bce 100644 --- a/artiq-fast/pkgs/artiq.nix +++ b/artiq-fast/pkgs/artiq.nix @@ -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 pythonDeps = callPackage ./python-deps.nix {}; @@ -7,11 +7,21 @@ in name = "artiq-${version}"; version = import ./artiq-version.nix { inherit stdenv fetchgit git; }; src = import ./artiq-src.nix { inherit fetchgit; }; + 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 ]) ++ (with pythonDeps; [ sipyco pyqtgraph-qt5 pythonparser ]) ++ (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 ]; checkPhase = '' @@ -21,6 +31,8 @@ in cp --no-preserve=mode,ownership -R ${src}/artiq/test/lit $TESTDIR LIBARTIQ_SUPPORT=${libartiq-support}/libartiq_support.so ${lit}/bin/lit -v $TESTDIR/lit ''; + + meta = with stdenv.lib; { description = "A leading-edge control system for quantum information experiments"; homepage = https://m-labs/artiq;