From 84e77322553f95dd6e44163239ea50dc0e311cf3 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Mon, 22 Apr 2019 23:47:38 +0800 Subject: [PATCH] package ARTIQ controller for toptica laser sdk --- artiq/artiq-extras.nix | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/artiq/artiq-extras.nix b/artiq/artiq-extras.nix index 91ec8a1..532d234 100644 --- a/artiq/artiq-extras.nix +++ b/artiq/artiq-extras.nix @@ -104,7 +104,7 @@ in # no unit tests without hardware so do a simple smoke test checkPhase = "python -m hut2.aqctl_hut2 --version"; }; - }) // { + }) // rec { toptica-lasersdk = pkgs.python3Packages.buildPythonPackage rec { version = "2.0.0"; name = "toptica-lasersdk-${version}"; @@ -115,4 +115,23 @@ in }; propagatedBuildInputs = [ pkgs.python3Packages.pyserial ]; }; + toptica-lasersdk-artiq = pkgs.python3Packages.buildPythonPackage rec { + version = "2.0.0"; + name = "toptica-lasersdk-artiq-${version}"; + src = pkgs.fetchFromGitHub { + owner = "quartiq"; + repo = "lasersdk-artiq"; + rev = "d38bb985e7ddffc9ac9d94fe136cac10947bfd72"; + sha256 = "03a09lc81l2l787yjm0xjpnjvs5x77ndmks3xxh25yyxdhsdf1fl"; + }; + postPatch = '' + substituteInPlace lasersdk_artiq/aqctl_laser.py \ + --replace "toptica.lasersdk.async.client" \ + "toptica.lasersdk.asyncio.client" + substituteInPlace lasersdk_artiq/test.py \ + --replace "toptica.lasersdk.async.client" \ + "toptica.lasersdk.asyncio.client" + ''; + propagatedBuildInputs = [ toptica-lasersdk artiq ]; + }; }