From 16a3e7916395488c4cabec93d5dfef1c40bf397c Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Wed, 21 Dec 2022 09:21:16 +0800 Subject: [PATCH] Revert "use flake for dax" This reverts commit 9cd19ede466559f3e586bac317bdbcfbde572fd3. --- flake.lock | 113 +---------------------------------------------------- flake.nix | 48 +++++++++++++---------- 2 files changed, 29 insertions(+), 132 deletions(-) diff --git a/flake.lock b/flake.lock index 20065b3..97ed106 100644 --- a/flake.lock +++ b/flake.lock @@ -51,66 +51,6 @@ "type": "github" } }, - "artiq-stubs": { - "inputs": { - "artiqpkgs": [ - "daxpkgs", - "artiqpkgs" - ], - "flake8-artiq": [ - "daxpkgs", - "flake8-artiq" - ], - "nixpkgs": [ - "daxpkgs", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1670448913, - "narHash": "sha256-ZCg7Rd5qpYl5Y8FEtLObnFRUiSJVZuSBdpa57SMVoNE=", - "ref": "refs/heads/master", - "rev": "d592ccd1db4d9a97331d5397560d25b59c7820bb", - "revCount": 26, - "type": "git", - "url": "https://gitlab.com/duke-artiq/artiq-stubs.git" - }, - "original": { - "type": "git", - "url": "https://gitlab.com/duke-artiq/artiq-stubs.git" - } - }, - "daxpkgs": { - "inputs": { - "artiq-stubs": "artiq-stubs", - "artiqpkgs": [ - "artiq" - ], - "flake8-artiq": "flake8-artiq", - "nixpkgs": [ - "artiq", - "nixpkgs" - ], - "sipyco": [ - "artiq", - "sipyco" - ], - "trap-dac-utils": "trap-dac-utils" - }, - "locked": { - "lastModified": 1671209611, - "narHash": "sha256-IBIdF8inxa21DTkonUKQ25bTy/1twpQQjU1g5rbBWxo=", - "ref": "refs/heads/master", - "rev": "1c47f53cca6ba455df5c2f6566f138f0b8495a4b", - "revCount": 1080, - "type": "git", - "url": "https://gitlab.com/duke-artiq/dax.git" - }, - "original": { - "type": "git", - "url": "https://gitlab.com/duke-artiq/dax.git" - } - }, "flake-utils": { "locked": { "lastModified": 1659877975, @@ -126,31 +66,6 @@ "type": "github" } }, - "flake8-artiq": { - "inputs": { - "artiqpkgs": [ - "daxpkgs", - "artiqpkgs" - ], - "nixpkgs": [ - "daxpkgs", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1669758648, - "narHash": "sha256-nomQRpu/b8YTAma6kmbSRrz5D9l1l0TV+trKHukT1V8=", - "ref": "refs/heads/master", - "rev": "c4949e7a415d5e35a242d552d4bb83614693b92e", - "revCount": 85, - "type": "git", - "url": "https://gitlab.com/duke-artiq/flake8-artiq.git" - }, - "original": { - "type": "git", - "url": "https://gitlab.com/duke-artiq/flake8-artiq.git" - } - }, "mozilla-overlay": { "flake": false, "locked": { @@ -185,8 +100,7 @@ }, "root": { "inputs": { - "artiq": "artiq", - "daxpkgs": "daxpkgs" + "artiq": "artiq" } }, "sipyco": { @@ -259,31 +173,6 @@ "repo": "pythonparser", "type": "github" } - }, - "trap-dac-utils": { - "inputs": { - "artiqpkgs": [ - "daxpkgs", - "artiqpkgs" - ], - "nixpkgs": [ - "daxpkgs", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1671136817, - "narHash": "sha256-6uVX0st+0rp0sl2i9MOepxPpgpjGdlfwZ7jndnNKR9k=", - "ref": "refs/heads/master", - "rev": "8b754f0735c5efd0e467bed7680f9d1d93d027c3", - "revCount": 261, - "type": "git", - "url": "https://gitlab.com/duke-artiq/trap-dac-utils.git" - }, - "original": { - "type": "git", - "url": "https://gitlab.com/duke-artiq/trap-dac-utils.git" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index ce2119a..51d808f 100644 --- a/flake.nix +++ b/flake.nix @@ -3,16 +3,7 @@ inputs.artiq.url = git+https://github.com/m-labs/artiq.git?ref=release-7; - inputs.daxpkgs = { - url = git+https://gitlab.com/duke-artiq/dax.git; - inputs = { - artiqpkgs.follows = "artiq"; - nixpkgs.follows = "artiq/nixpkgs"; - sipyco.follows = "artiq/sipyco"; - }; - }; - - outputs = { self, artiq, daxpkgs }: + outputs = { self, artiq }: let pkgs = import artiq.inputs.nixpkgs { system = "x86_64-linux"; }; @@ -216,9 +207,32 @@ ++ [ artiq.inputs.sipyco.packages.x86_64-linux.sipyco ] ++ (with pkgs.python3Packages; [ numpy scipy influxdb pyqtgraph setuptools ]); }; - flake8-artiq = daxpkgs.packages.x86_64-linux.flake8-artiq; - dax = daxpkgs.packages.x86_64-linux.dax.overridePythonAttrs (oa: { doCheck = false; }); - trap-dac-utils = daxpkgs.packages.x86_64-linux.trap-dac-utils; + flake8-artiq = pkgs.python3Packages.buildPythonPackage { + pname = "flake8-artiq"; + version = "0.1.0"; + src = pkgs.fetchgit { + url = "https://gitlab.com/duke-artiq/flake8-artiq.git"; + rev = "1216092974140a561850905734fc22fdacdc2cde"; + sha256 = "0rkab2qdwyzms6nxc44jzb5grvkkbpjwwmfv2zj96cm6cm8d9pdr"; + }; + propagatedBuildInputs = [ pkgs.python3Packages.flake8 ]; + checkInputs = [ pkgs.python3Packages.pytestCheckHook ]; + }; + dax = pkgs.python3Packages.buildPythonPackage rec { + pname = "dax"; + version = "6.7"; + src = pkgs.fetchgit { + url = "https://gitlab.com/duke-artiq/dax.git"; + rev = "v${version}"; + sha256 = "0rgvqqiypqvxjzrsixn3h7dn93isqw5vc2wrmpkxhzvw9lh5ihm7"; + }; + VERSIONEER_OVERRIDE = version; + inherit (pkgs.python3Packages.pygit2) SSL_CERT_FILE; + doCheck = false; # tests only pass for the latest stable ARTIQ version + propagatedBuildInputs = [ artiq.packages.x86_64-linux.artiq artiq.inputs.sipyco.packages.x86_64-linux.sipyco ] + ++ (with pkgs.python3Packages; [ numpy scipy pyvcd natsort pygit2 matplotlib graphviz h5py networkx sortedcontainers ]); + checkInputs = [ pkgs.python3Packages.pytestCheckHook ]; + }; dax-applets = pkgs.python3Packages.buildPythonPackage rec { pname = "dax-applets"; version = "0.0.0"; @@ -328,17 +342,11 @@ src = flake8-artiq.src; dependencies = [ "flake8" ]; } - { - name = "trap-dac-utils"; - version = trap-dac-utils.version; - src = trap-dac-utils.src; - dependencies = trap-dac-utils.condaDependencies; - } { name = "dax"; version = dax.version; src = dax.src; - dependencies = dax.condaDependencies; + dependencies = [ "python>=3.7" "artiq" "sipyco" "numpy" "scipy" "pyvcd" "natsort" "pygit2" "matplotlib" "python-graphviz" "h5py" "networkx" "sortedcontainers" ]; } { name = "dax-applets";