From 1d9726fe2fbc61d6edf65001b47a8a705c14c857 Mon Sep 17 00:00:00 2001 From: Stephan Maka Date: Tue, 23 Feb 2021 00:39:52 +0100 Subject: [PATCH 1/2] artiq-fast: add jsonschema dependency to artiq Fixes issue #43 --- artiq-fast/conda/artiq.nix | 1 + artiq-fast/pkgs/artiq.nix | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/artiq-fast/conda/artiq.nix b/artiq-fast/conda/artiq.nix index ab21777..4b07e00 100644 --- a/artiq-fast/conda/artiq.nix +++ b/artiq-fast/conda/artiq.nix @@ -21,6 +21,7 @@ let "pygit2" "python-levenshtein" "sipyco" + "jsonschema" ]; extraYaml = '' diff --git a/artiq-fast/pkgs/artiq.nix b/artiq-fast/pkgs/artiq.nix index 78be5a0..49d0dc2 100644 --- a/artiq-fast/pkgs/artiq.nix +++ b/artiq-fast/pkgs/artiq.nix @@ -11,7 +11,7 @@ python3Packages.buildPythonPackage rec { 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 scipy prettytable pyserial python-Levenshtein h5py pyqt5 ]) + ++ (with python3Packages; [ pygit2 numpy dateutil jsonschema scipy prettytable pyserial python-Levenshtein h5py pyqt5 ]) ++ [(if (lib.strings.versionAtLeast version "6.0") then pythonDeps.qasync else python3Packages.quamash)]; dontWrapQtApps = true; -- 2.47.0 From ea69ab9b91b0b6f0aa87106712779cdfbaa239a4 Mon Sep 17 00:00:00 2001 From: Stephan Maka Date: Tue, 23 Feb 2021 01:10:07 +0100 Subject: [PATCH 2/2] remove jsonschema from artiq-fast, artiq-board-generated, shell-dev.nix now that it is a dependency of artiq --- artiq-board-generated/artiq-board.nix | 2 +- artiq-fast/shell-dev.nix | 2 +- artiq-full.nix | 8 ++------ 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/artiq-board-generated/artiq-board.nix b/artiq-board-generated/artiq-board.nix index 710c84e..3d59e71 100644 --- a/artiq-board-generated/artiq-board.nix +++ b/artiq-board-generated/artiq-board.nix @@ -9,7 +9,7 @@ let artiqSrc = import (artiq-fast + "/pkgs/artiq-src.nix") { fetchgit = pkgs.fetchgit; }; artiqpkgs = import artiq-fast { inherit pkgs; }; pythonEnv = pkgs.python3.withPackages (ps: with ps; [ - jinja2 jsonschema numpy artiqpkgs.migen artiqpkgs.microscope artiqpkgs.misoc artiqpkgs.jesd204b artiqpkgs.artiq + jinja2 numpy artiqpkgs.migen artiqpkgs.microscope artiqpkgs.misoc artiqpkgs.jesd204b artiqpkgs.artiq ]); fetchcargo = import (artiq-fast + "/fetchcargo.nix") { inherit (pkgs) stdenv cacert git; diff --git a/artiq-fast/shell-dev.nix b/artiq-fast/shell-dev.nix index 6ef516a..7fd0519 100644 --- a/artiq-fast/shell-dev.nix +++ b/artiq-fast/shell-dev.nix @@ -8,7 +8,7 @@ in buildInputs = [ vivado pkgs.gnumake - (pkgs.python3.withPackages(ps: (with ps; [ jinja2 jsonschema numpy paramiko ]) ++ (with artiqpkgs; [ migen microscope misoc jesd204b migen-axi artiq ]))) + (pkgs.python3.withPackages(ps: (with ps; [ jinja2 numpy paramiko ]) ++ (with artiqpkgs; [ migen microscope misoc jesd204b migen-axi artiq ]))) artiqpkgs.cargo artiqpkgs.rustc artiqpkgs.binutils-or1k diff --git a/artiq-full.nix b/artiq-full.nix index 57b44cf..77eb8d4 100644 --- a/artiq-full.nix +++ b/artiq-full.nix @@ -78,10 +78,6 @@ let let artiq-fast = import ${if a6p then "./board-generated" else "."}/fast { inherit pkgs; }; - ddbDeps = [ - artiq-fast.artiq - (pkgs.python3.withPackages (ps: [ ps.jsonschema ])) - ]; kasliVariants = [${builtins.concatStringsSep " " ( builtins.map (variant: "\"${variant}\"") kasliVariants @@ -135,7 +131,7 @@ let ) { "device-db-\''${target}-\''${variant}" = pkgs.stdenv.mkDerivation { name = "device-db-\''${target}-\''${variant}"; - buildInputs = ddbDeps; + buildInputs = artiq-fast.artiq; phases = [ "buildPhase" ]; buildPhase = " mkdir \$out @@ -196,7 +192,7 @@ let (system: crates: pkgs.lib.attrsets.nameValuePair ("device-db-" + system) (pkgs.stdenv.mkDerivation { name = "device-db-\''${system}"; - buildInputs = ddbDeps; + buildInputs = artiq-fast.artiq; phases = [ "buildPhase" ]; buildPhase = " mkdir \$out -- 2.47.0