From d42d6075476861e77aa3a16c9a9259993356d541 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Wed, 2 Jan 2019 16:13:08 +0800 Subject: [PATCH] nix: add microscope --- nix/artiq-dev.nix | 2 +- nix/default.nix | 2 +- nix/pkgs/python3Packages.nix | 21 +++++++++++++++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/nix/artiq-dev.nix b/nix/artiq-dev.nix index 89c079379..ad6ada554 100644 --- a/nix/artiq-dev.nix +++ b/nix/artiq-dev.nix @@ -16,7 +16,7 @@ in xorg.libXext xorg.libXtst xorg.libXi - (python3.withPackages(ps: with ps; [ jinja2 numpy artiqpkgs.migen artiqpkgs.misoc artiqpkgs.artiq ])) + (python3.withPackages(ps: with ps; [ jinja2 numpy artiqpkgs.migen artiqpkgs.microscope artiqpkgs.misoc artiqpkgs.artiq ])) ] ++ (with artiqpkgs; [ rustc diff --git a/nix/default.nix b/nix/default.nix index a5df6aa72..66c626540 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -9,7 +9,7 @@ let llvm-src = callPackage ./fetch-llvm-clang.nix {}; in rec { inherit (rust) cargo rustc; - inherit (callPackage ./pkgs/python3Packages.nix {}) migen misoc; + inherit (callPackage ./pkgs/python3Packages.nix {}) migen microscope misoc; binutils-or1k = callPackage ./pkgs/binutils-or1k.nix {}; llvm-or1k = callPackage ./pkgs/llvm-or1k.nix { inherit llvm-src; }; llvmlite = callPackage ./pkgs/llvmlite.nix { inherit llvm-or1k; }; diff --git a/nix/pkgs/python3Packages.nix b/nix/pkgs/python3Packages.nix index 4ce508f41..b34b0a9a1 100644 --- a/nix/pkgs/python3Packages.nix +++ b/nix/pkgs/python3Packages.nix @@ -73,4 +73,25 @@ rec { platforms = platforms.unix; }; }; + microscope = python3Packages.buildPythonPackage rec { + version = "git-02cffc"; + pname = "microscope"; + name = "${pname}-${version}"; + + src = fetchFromGitHub { + owner = "m-labs"; + repo = "microscope"; + rev = "02cffc360ec5a234c589de6cb9616b057ed22253"; + sha256 = "09yvgk16xfv5r5cf55vcg0f14wam42w53r4snlalcyw5gkm0rlhq"; + }; + + propagatedBuildInputs = with python3Packages; [ pyserial prettytable msgpack-python migen ]; + + meta = with stdenv.lib; { + description = "Finding the bacteria in rotting FPGA designs"; + homepage = "https://m-labs.hk/migen"; + license = licenses.bsd2; + platforms = platforms.unix; + }; + }; }