nix-scripts/artiq-fast/pkgs/artiq.nix

44 lines
1.6 KiB
Nix
Raw Normal View History

2020-07-17 11:48:43 +08:00
{ stdenv, lib, callPackage, fetchgit, git, python3Packages, qt5, binutils-or1k, binutils-arm, llvm-or1k, llvmlite-artiq, libartiq-support, lit, outputcheck }:
let
2019-02-19 21:18:38 +08:00
pythonDeps = callPackage ./python-deps.nix {};
in
2019-02-19 21:18:38 +08:00
python3Packages.buildPythonPackage rec {
name = "artiq-${version}";
version = import ./artiq-version.nix { inherit stdenv fetchgit git; };
2019-02-19 21:18:38 +08:00
src = import ./artiq-src.nix { inherit fetchgit; };
2020-07-17 11:48:43 +08:00
2019-02-19 21:18:38 +08:00
preBuild = "export VERSIONEER_OVERRIDE=${version}";
2020-07-17 11:48:43 +08:00
nativeBuildInputs = [ qt5.wrapQtAppsHook ];
propagatedBuildInputs = [ binutils-or1k llvm-or1k llvmlite-artiq ]
++ (lib.lists.optionals (lib.strings.versionAtLeast version "6.0") [ binutils-arm ])
2020-06-09 15:52:36 +08:00
++ (with pythonDeps; [ sipyco pyqtgraph-qt5 pythonparser ])
++ (with python3Packages; [ pygit2 numpy dateutil quamash scipy prettytable pyserial python-Levenshtein h5py pyqt5 ]);
2020-07-17 11:48:43 +08:00
dontWrapQtApps = true;
postFixup = ''
wrapQtApp "$out/bin/artiq_dashboard"
wrapQtApp "$out/bin/artiq_browser"
wrapQtApp "$out/bin/artiq_session"
2020-07-17 11:48:43 +08:00
'';
checkInputs = [ binutils-or1k outputcheck ];
2019-03-31 22:33:19 +08:00
checkPhase =
''
python -m unittest discover -v artiq.test
2019-03-31 23:06:08 +08:00
TESTDIR=`mktemp -d`
cp --no-preserve=mode,ownership -R ${src}/artiq/test/lit $TESTDIR
LIBARTIQ_SUPPORT=${libartiq-support}/libartiq_support.so ${lit}/bin/lit -v $TESTDIR/lit
2019-03-31 22:33:19 +08:00
'';
2020-07-17 11:48:43 +08:00
2019-02-19 21:18:38 +08:00
meta = with stdenv.lib; {
description = "A leading-edge control system for quantum information experiments";
homepage = https://m-labs/artiq;
license = licenses.lgpl3;
2019-04-12 19:05:24 +08:00
maintainers = [ maintainers.sb0 ];
2019-02-19 21:18:38 +08:00
};
}