artiq-full: package wand
This commit is contained in:
parent
88cd472f90
commit
eb398dcc53
@ -8,8 +8,9 @@ let
|
||||
mkdir $out
|
||||
|
||||
cp -a ${<artiq-fast>} $out/fast
|
||||
cp ${./artiq-full/conda-artiq-board.nix} $out/conda-artiq-board.nix
|
||||
cp ${./artiq-full/extras.nix} $out/extras.nix
|
||||
cp ${./artiq-full}/conda-artiq-board.nix $out
|
||||
cp ${./artiq-full}/extras.nix $out
|
||||
cp ${./artiq-full}/*.patch $out
|
||||
|
||||
REV=`git --git-dir ${sinaraSystemsSrc}/.git rev-parse HEAD`
|
||||
SINARA_SRC_CLEAN=`mktemp -d`
|
||||
|
@ -203,4 +203,22 @@ in
|
||||
dependencies = [ "sipyco" "numpy" "aiohttp >=3" ];
|
||||
};
|
||||
};
|
||||
} // {
|
||||
wand = pkgs.python3Packages.buildPythonApplication rec {
|
||||
name = "wand";
|
||||
version = "0.4.dev";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "OxfordIonTrapGroup";
|
||||
repo = "wand";
|
||||
rev = "0bf1cfef4aa37e5761c20ac8702abec125b45e23";
|
||||
sha256 = "0jfw6w6id7qkx2f6rklrmp13b2hsnvii1qbls60ampx399lcb43g";
|
||||
};
|
||||
patches = [ ./wand-fix-config-dir.patch ];
|
||||
nativeBuildInputs = [ pkgs.qt5.wrapQtAppsHook ];
|
||||
dontWrapQtApps = true;
|
||||
postFixup = ''
|
||||
wrapQtApp "$out/bin/wand_gui"
|
||||
'';
|
||||
propagatedBuildInputs = [ artiq pkgs.python3Packages.numpy pkgs.python3Packages.scipy pkgs.python3Packages.influxdb pkgs.python3Packages.setuptools ];
|
||||
};
|
||||
}
|
||||
|
30
artiq-full/wand-fix-config-dir.patch
Normal file
30
artiq-full/wand-fix-config-dir.patch
Normal file
@ -0,0 +1,30 @@
|
||||
diff --git a/wand/tools.py b/wand/tools.py
|
||||
index a51dabd..4d5a9d1 100644
|
||||
--- a/wand/tools.py
|
||||
+++ b/wand/tools.py
|
||||
@@ -6,6 +6,7 @@ import shutil
|
||||
import logging
|
||||
|
||||
from sipyco import pyon
|
||||
+from artiq.appdirs import user_config_dir
|
||||
import wand
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@@ -26,10 +27,15 @@ class LockException(Exception):
|
||||
pass
|
||||
|
||||
|
||||
+def get_user_config_dir():
|
||||
+ dir = user_config_dir("wand", "oitg", "1")
|
||||
+ os.makedirs(dir, exist_ok=True)
|
||||
+ return dir
|
||||
+
|
||||
+
|
||||
def get_config_path(args, name_suffix=""):
|
||||
config_file = "{}{}_config.pyon".format(args.name, name_suffix)
|
||||
- wand_dir = os.path.dirname(wand.__file__)
|
||||
- config_path = os.path.join(wand_dir, config_file)
|
||||
+ config_path = os.path.join(get_user_config_dir(), config_file)
|
||||
|
||||
if args.backup_dir == "":
|
||||
backup_path = ""
|
Loading…
Reference in New Issue
Block a user