From 7d8d301b78e2cd7eb1dac45bba225a9101ba5884 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 4 Aug 2022 13:59:01 +0800 Subject: [PATCH] Nix flake --- flake.lock | 164 +++++++++++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 18 ++++++ siglent.py | 2 - 3 files changed, 182 insertions(+), 2 deletions(-) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..cd3a69a --- /dev/null +++ b/flake.lock @@ -0,0 +1,164 @@ +{ + "nodes": { + "artiq": { + "inputs": { + "artiq-comtools": "artiq-comtools", + "mozilla-overlay": "mozilla-overlay", + "nixpkgs": "nixpkgs", + "sipyco": "sipyco", + "src-migen": "src-migen", + "src-misoc": "src-misoc", + "src-pythonparser": "src-pythonparser" + }, + "locked": { + "lastModified": 1659431458, + "narHash": "sha256-+CZVEohTMBLVbBf6W81H309rxrF7fOzAKkEJ7QVIu14=", + "ref": "release-7", + "rev": "eba143a47530adbd9d402a9736d0fdc06dcf836f", + "revCount": 8116, + "type": "git", + "url": "https://github.com/m-labs/artiq.git" + }, + "original": { + "ref": "release-7", + "type": "git", + "url": "https://github.com/m-labs/artiq.git" + } + }, + "artiq-comtools": { + "inputs": { + "nixpkgs": [ + "artiq", + "nixpkgs" + ], + "sipyco": [ + "artiq", + "sipyco" + ] + }, + "locked": { + "lastModified": 1654007592, + "narHash": "sha256-vaDFhE1ItjqtIcinC/6RAJGbj44pxxMUEeQUa3FtgEE=", + "owner": "m-labs", + "repo": "artiq-comtools", + "rev": "cb73281154656ee8f74db1866859e31bf42755cd", + "type": "github" + }, + "original": { + "owner": "m-labs", + "repo": "artiq-comtools", + "type": "github" + } + }, + "mozilla-overlay": { + "flake": false, + "locked": { + "lastModified": 1657214286, + "narHash": "sha256-rO/4oymKXU09wG2bcTt4uthPCp1XsBZjxuCJo3yVXNs=", + "owner": "mozilla", + "repo": "nixpkgs-mozilla", + "rev": "0508a66e28a5792fdfb126bbf4dec1029c2509e0", + "type": "github" + }, + "original": { + "owner": "mozilla", + "repo": "nixpkgs-mozilla", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1657123678, + "narHash": "sha256-cowVkScfUPlbBXUp08MeVk/wgm9E1zp1uC+9no2hZYw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "316b762afdb9e142a803f29c49a88b4a47db80ee", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-22.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "artiq": "artiq" + } + }, + "sipyco": { + "inputs": { + "nixpkgs": [ + "artiq", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1654830914, + "narHash": "sha256-tratXcWu6Dgzd0Qd9V6EMjuNlE9qDN1pKFhP+Gt0b64=", + "owner": "m-labs", + "repo": "sipyco", + "rev": "58b0935f7ae47659abee5b5792fa594153328d6f", + "type": "github" + }, + "original": { + "owner": "m-labs", + "repo": "sipyco", + "type": "github" + } + }, + "src-migen": { + "flake": false, + "locked": { + "lastModified": 1656649178, + "narHash": "sha256-A91sZRrprEuPOtIUVxm6wX5djac9wnNZQ4+cU1nvJPc=", + "owner": "m-labs", + "repo": "migen", + "rev": "0fb91737090fe45fd764ea3f71257a4c53c7a4ae", + "type": "github" + }, + "original": { + "owner": "m-labs", + "repo": "migen", + "type": "github" + } + }, + "src-misoc": { + "flake": false, + "locked": { + "lastModified": 1649324486, + "narHash": "sha256-Mw/fQS3lHFvCm7L1k63joRkz5uyijQfywcOq+X2+o2s=", + "ref": "master", + "rev": "f1dc58d2b8c222ba41c25cee4301626625f46e43", + "revCount": 2420, + "submodules": true, + "type": "git", + "url": "https://github.com/m-labs/misoc.git" + }, + "original": { + "submodules": true, + "type": "git", + "url": "https://github.com/m-labs/misoc.git" + } + }, + "src-pythonparser": { + "flake": false, + "locked": { + "lastModified": 1628745371, + "narHash": "sha256-p6TgeeaK4NEmbhimEXp31W8hVRo4DgWmcCoqZ+UdN60=", + "owner": "m-labs", + "repo": "pythonparser", + "rev": "5413ee5c9f8760e95c6acd5d6e88dabb831ad201", + "type": "github" + }, + "original": { + "owner": "m-labs", + "repo": "pythonparser", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..b0c9ff8 --- /dev/null +++ b/flake.nix @@ -0,0 +1,18 @@ +{ + inputs.artiq.url = "git+https://github.com/m-labs/artiq.git?ref=release-7"; + outputs = { self, artiq }: + let + pkgs = artiq.inputs.nixpkgs.legacyPackages.x86_64-linux; + aqmain = artiq.packages.x86_64-linux; + in { + defaultPackage.x86_64-linux = pkgs.buildEnv { + name = "aq6140-env"; + paths = [ + (pkgs.python3.withPackages(ps: [ + aqmain.artiq + ps.pyvisa ps.pyvisa-py ps.numpy + ])) + ]; + }; + }; +} diff --git a/siglent.py b/siglent.py index 82eb397..00d0445 100644 --- a/siglent.py +++ b/siglent.py @@ -1,5 +1,3 @@ -# nix-shell -p python3Packages.pyvisa python3Packages.pyvisa-py python3Packages.numpy - import pyvisa as visa import time import numpy as np