forked from M-Labs/nix-scripts
cleanup
This commit is contained in:
parent
110f968199
commit
7ade154330
|
@ -1,6 +1,8 @@
|
||||||
{ pkgs ? import <nixpkgs> {}}:
|
{ pkgs ? import <nixpkgs> {}}:
|
||||||
with pkgs;
|
with pkgs;
|
||||||
let
|
let
|
||||||
|
pythonDeps = callPackage ./pkgs/python-deps.nix {};
|
||||||
|
|
||||||
# this code was copied from nipxkgs rev. ffafe9 (nixcloud team) and slightly modified
|
# this code was copied from nipxkgs rev. ffafe9 (nixcloud team) and slightly modified
|
||||||
rust = callPackage ./pkgs/rust
|
rust = callPackage ./pkgs/rust
|
||||||
(stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) {
|
(stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) {
|
||||||
|
@ -27,14 +29,14 @@ let
|
||||||
boardBinaries = boardBinaries;
|
boardBinaries = boardBinaries;
|
||||||
};
|
};
|
||||||
}) {} boards;
|
}) {} boards;
|
||||||
in rec {
|
in
|
||||||
|
rec {
|
||||||
inherit (rust) rustc;
|
inherit (rust) rustc;
|
||||||
inherit (callPackage ./pkgs/python3Packages.nix {}) migen microscope misoc jesd204b;
|
inherit (pythonDeps) asyncserial levenshtein pythonparser quamash pyqtgraph-qt5 misoc migen microscope jesd204b sphinx-argparse wavedrom sphinxcontrib-wavedrom;
|
||||||
binutils-or1k = callPackage ./pkgs/binutils-or1k.nix {};
|
binutils-or1k = callPackage ./pkgs/binutils-or1k.nix {};
|
||||||
llvm-or1k = callPackage ./pkgs/llvm-or1k.nix { inherit llvm-src; };
|
llvm-or1k = callPackage ./pkgs/llvm-or1k.nix { inherit llvm-src; };
|
||||||
llvmlite-artiq = callPackage ./pkgs/llvmlite-artiq.nix { inherit llvm-or1k; };
|
llvmlite-artiq = callPackage ./pkgs/llvmlite-artiq.nix { inherit llvm-or1k; };
|
||||||
artiq = callPackage ./pkgs/artiq.nix { inherit binutils-or1k; inherit llvm-or1k; inherit llvmlite-artiq; };
|
artiq = callPackage ./pkgs/artiq.nix { inherit binutils-or1k; inherit llvm-or1k; inherit llvmlite-artiq; };
|
||||||
openocd = callPackage ./pkgs/openocd.nix {};
|
openocd = callPackage ./pkgs/openocd.nix {};
|
||||||
|
|
||||||
conda-artiq = import ./conda-artiq.nix { inherit pkgs; };
|
conda-artiq = import ./conda-artiq.nix { inherit pkgs; };
|
||||||
} // boardPackages
|
} // boardPackages
|
||||||
|
|
|
@ -1,74 +1,16 @@
|
||||||
{ stdenv, git, fetchFromGitHub, fetchgit, python3Packages, qt5Full, binutils-or1k, llvm-or1k, llvmlite-artiq, python3 }:
|
{ stdenv, callPackage, fetchgit, python3Packages, qt5Full, binutils-or1k, llvm-or1k, llvmlite-artiq }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
pythonDeps = callPackage ./python-deps.nix {};
|
||||||
levenshtein = python3Packages.buildPythonPackage rec {
|
|
||||||
name = "levenshtein";
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "ztane";
|
|
||||||
repo = "python-Levenshtein";
|
|
||||||
rev = "854e61a05bb8b750e990add96df412cd5448b75e";
|
|
||||||
sha256 = "1yf21kg1g2ivm5a4dx1jra9k0c33np54d0hk5ymnfyc4f6pg386q";
|
|
||||||
};
|
|
||||||
doCheck = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
pythonparser = python3Packages.buildPythonPackage rec {
|
|
||||||
name = "pythonparser";
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "m-labs";
|
|
||||||
repo = "pythonparser";
|
|
||||||
rev = "5b391fe86f43bb9f4f96c5bc0532e2a112db2936";
|
|
||||||
sha256 = "1gw1fk4y2l6bwq0fg2a9dfc1rvq8cv492dyil96amjdhsxvnx35b";
|
|
||||||
};
|
|
||||||
propagatedBuildInputs = with python3Packages; [ regex ];
|
|
||||||
};
|
|
||||||
|
|
||||||
asyncserial = python3Packages.buildPythonPackage rec {
|
|
||||||
name = "asyncserial";
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "m-labs";
|
|
||||||
repo = "asyncserial";
|
|
||||||
rev = "d95bc1d6c791b0e9785935d2f62f628eb5cdf98d";
|
|
||||||
sha256 = "0yzkka9jk3612v8gx748x6ziwykq5lr7zmr9wzkcls0v2yilqx9k";
|
|
||||||
};
|
|
||||||
propagatedBuildInputs = with python3Packages; [ pyserial ];
|
|
||||||
doCheck = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
quamash = python3Packages.buildPythonPackage rec {
|
|
||||||
name = "quamash";
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "harvimt";
|
|
||||||
repo = "quamash";
|
|
||||||
rev = "e513b30f137415c5e098602fa383e45debab85e7";
|
|
||||||
sha256 = "117rp9r4lz0kfz4dmmpa35hp6nhbh6b4xq0jmgvqm68g9hwdxmqa";
|
|
||||||
};
|
|
||||||
propagatedBuildInputs = with python3Packages; [ pyqt5 ];
|
|
||||||
doCheck = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
pyqtgraph-qt5 = python3Packages.buildPythonPackage rec {
|
|
||||||
name = "pyqtgraph_qt5-${version}";
|
|
||||||
version = "0.10.0";
|
|
||||||
doCheck = false;
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "pyqtgraph";
|
|
||||||
repo = "pyqtgraph";
|
|
||||||
rev = "1426e334e1d20542400d77c72c132b04c6d17ddb";
|
|
||||||
sha256 = "1079haxyr316jf0wpirxdj0ry6j8mr16cqr0dyyrd5cnxwl7zssh";
|
|
||||||
};
|
|
||||||
propagatedBuildInputs = with python3Packages; [ scipy numpy pyqt5 pyopengl ];
|
|
||||||
};
|
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
python3Packages.buildPythonPackage rec {
|
python3Packages.buildPythonPackage rec {
|
||||||
name = "artiq-${version}";
|
name = "artiq-${version}";
|
||||||
version = import ./artiq-version.nix;
|
version = import ./artiq-version.nix;
|
||||||
src = import ./artiq-src.nix { inherit fetchgit; };
|
src = import ./artiq-src.nix { inherit fetchgit; };
|
||||||
preBuild = "export VERSIONEER_OVERRIDE=${version}";
|
preBuild = "export VERSIONEER_OVERRIDE=${version}";
|
||||||
propagatedBuildInputs = with python3Packages; [ binutils-or1k llvm-or1k llvmlite-artiq levenshtein pyqtgraph-qt5 aiohttp pygit2 pythonparser numpy dateutil quamash scipy prettytable pyserial asyncserial h5py cython regex qt5Full pyqt5 ];
|
propagatedBuildInputs = [ binutils-or1k llvm-or1k llvmlite-artiq ]
|
||||||
|
++ (with pythonDeps; [ levenshtein pyqtgraph-qt5 quamash pythonparser asyncserial ])
|
||||||
|
++ (with python3Packages; [ aiohttp pygit2 numpy dateutil scipy prettytable pyserial h5py cython regex qt5Full pyqt5 ]);
|
||||||
checkPhase = "python -m unittest discover -v artiq.test";
|
checkPhase = "python -m unittest discover -v artiq.test";
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "A leading-edge control system for quantum information experiments";
|
description = "A leading-edge control system for quantum information experiments";
|
||||||
|
|
|
@ -1,26 +1,68 @@
|
||||||
{ pkgs, stdenv, fetchFromGitHub, python, python3Packages }:
|
{ pkgs, stdenv, fetchFromGitHub, python, python3Packages }:
|
||||||
|
|
||||||
rec {
|
rec {
|
||||||
|
# User dependencies
|
||||||
asyncserial = python3Packages.buildPythonPackage rec {
|
asyncserial = python3Packages.buildPythonPackage rec {
|
||||||
name = "asyncserial";
|
name = "asyncserial";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "m-labs";
|
owner = "m-labs";
|
||||||
repo = "asyncserial";
|
repo = "asyncserial";
|
||||||
rev = "d95bc1d6c791b0e9785935d2f62f628eb5cdf98d";
|
rev = "d95bc1d6c791b0e9785935d2f62f628eb5cdf98d";
|
||||||
sha256 = "0yzkka9jk3612v8gx748x6ziwykq5lr7zmr9wzkcls0v2yilqx9k";
|
sha256 = "0yzkka9jk3612v8gx748x6ziwykq5lr7zmr9wzkcls0v2yilqx9k";
|
||||||
fetchSubmodules = true;
|
};
|
||||||
|
propagatedBuildInputs = with python3Packages; [ pyserial ];
|
||||||
|
doCheck = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = with python3Packages; [ pyserial ] ++ (with pkgs; [ ]);
|
levenshtein = python3Packages.buildPythonPackage rec {
|
||||||
|
name = "levenshtein";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "ztane";
|
||||||
|
repo = "python-Levenshtein";
|
||||||
|
rev = "854e61a05bb8b750e990add96df412cd5448b75e";
|
||||||
|
sha256 = "1yf21kg1g2ivm5a4dx1jra9k0c33np54d0hk5ymnfyc4f6pg386q";
|
||||||
|
};
|
||||||
|
doCheck = false;
|
||||||
|
};
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
pythonparser = python3Packages.buildPythonPackage rec {
|
||||||
description = "asyncio support for pyserial";
|
name = "pythonparser";
|
||||||
homepage = "https://m-labs.hk";
|
src = fetchFromGitHub {
|
||||||
license = licenses.bsd2;
|
owner = "m-labs";
|
||||||
platforms = platforms.unix;
|
repo = "pythonparser";
|
||||||
|
rev = "5b391fe86f43bb9f4f96c5bc0532e2a112db2936";
|
||||||
|
sha256 = "1gw1fk4y2l6bwq0fg2a9dfc1rvq8cv492dyil96amjdhsxvnx35b";
|
||||||
};
|
};
|
||||||
|
propagatedBuildInputs = with python3Packages; [ regex ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
quamash = python3Packages.buildPythonPackage rec {
|
||||||
|
name = "quamash";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "harvimt";
|
||||||
|
repo = "quamash";
|
||||||
|
rev = "e513b30f137415c5e098602fa383e45debab85e7";
|
||||||
|
sha256 = "117rp9r4lz0kfz4dmmpa35hp6nhbh6b4xq0jmgvqm68g9hwdxmqa";
|
||||||
|
};
|
||||||
|
propagatedBuildInputs = with python3Packages; [ pyqt5 ];
|
||||||
|
doCheck = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
pyqtgraph-qt5 = python3Packages.buildPythonPackage rec {
|
||||||
|
name = "pyqtgraph_qt5-${version}";
|
||||||
|
version = "0.10.0";
|
||||||
|
doCheck = false;
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "pyqtgraph";
|
||||||
|
repo = "pyqtgraph";
|
||||||
|
rev = "1426e334e1d20542400d77c72c132b04c6d17ddb";
|
||||||
|
sha256 = "1079haxyr316jf0wpirxdj0ry6j8mr16cqr0dyyrd5cnxwl7zssh";
|
||||||
|
};
|
||||||
|
propagatedBuildInputs = with python3Packages; [ scipy numpy pyqt5 pyopengl ];
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
# Development/firmware dependencies
|
||||||
misoc = python3Packages.buildPythonPackage rec {
|
misoc = python3Packages.buildPythonPackage rec {
|
||||||
name = "misoc";
|
name = "misoc";
|
||||||
|
|
||||||
|
@ -44,6 +86,7 @@ rec {
|
||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
migen = python3Packages.buildPythonPackage rec {
|
migen = python3Packages.buildPythonPackage rec {
|
||||||
name = "migen";
|
name = "migen";
|
||||||
|
|
||||||
|
@ -66,6 +109,7 @@ rec {
|
||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
microscope = python3Packages.buildPythonPackage rec {
|
microscope = python3Packages.buildPythonPackage rec {
|
||||||
name = "microscope";
|
name = "microscope";
|
||||||
|
|
||||||
|
@ -85,6 +129,7 @@ rec {
|
||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
jesd204b = python3Packages.buildPythonPackage rec {
|
jesd204b = python3Packages.buildPythonPackage rec {
|
||||||
name = "jesd204b";
|
name = "jesd204b";
|
||||||
|
|
||||||
|
@ -105,6 +150,8 @@ rec {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
# Documentation building dependencies
|
||||||
# sphinx-argparse will be included in nixpkgs 19.03
|
# sphinx-argparse will be included in nixpkgs 19.03
|
||||||
sphinx-argparse = python3Packages.buildPythonPackage rec {
|
sphinx-argparse = python3Packages.buildPythonPackage rec {
|
||||||
pname = "sphinx-argparse";
|
pname = "sphinx-argparse";
|
||||||
|
@ -124,7 +171,7 @@ rec {
|
||||||
description = "A sphinx extension that automatically documents argparse commands and options";
|
description = "A sphinx extension that automatically documents argparse commands and options";
|
||||||
homepage = https://github.com/ribozz/sphinx-argparse;
|
homepage = https://github.com/ribozz/sphinx-argparse;
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
maintainers = with maintainers; [ clacke ];
|
#maintainers = with maintainers; [ clacke ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -159,7 +206,7 @@ rec {
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ python3Packages.setuptools_scm ];
|
buildInputs = [ python3Packages.setuptools_scm ];
|
||||||
propagatedBuildInputs = with python3Packages; [ sphinx wavedrom cairosvg xcffib ];
|
propagatedBuildInputs = [ wavedrom ] ++ (with python3Packages; [ sphinx cairosvg xcffib ]);
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "A Sphinx extension that allows including WaveDrom diagrams";
|
description = "A Sphinx extension that allows including WaveDrom diagrams";
|
3
main.nix
3
main.nix
|
@ -18,7 +18,6 @@ let
|
||||||
echo \"5e.`cut -c1-8 <<< $REV`\" > $out/pkgs/artiq-version.nix
|
echo \"5e.`cut -c1-8 <<< $REV`\" > $out/pkgs/artiq-version.nix
|
||||||
'';
|
'';
|
||||||
artiqpkgs = import "${generatedNix}/default.nix" { inherit pkgs; };
|
artiqpkgs = import "${generatedNix}/default.nix" { inherit pkgs; };
|
||||||
python3pkgs = pkgs.callPackage "${generatedNix}/pkgs/python3Packages.nix" {};
|
|
||||||
artiqVersion = import "${generatedNix}/pkgs/artiq-version.nix";
|
artiqVersion = import "${generatedNix}/pkgs/artiq-version.nix";
|
||||||
jobs = builtins.mapAttrs (key: value: pkgs.lib.hydraJob value) artiqpkgs;
|
jobs = builtins.mapAttrs (key: value: pkgs.lib.hydraJob value) artiqpkgs;
|
||||||
in
|
in
|
||||||
|
@ -32,7 +31,7 @@ in
|
||||||
docs = pkgs.runCommand "docs"
|
docs = pkgs.runCommand "docs"
|
||||||
{
|
{
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
(pkgs.python3.withPackages(ps: [python3pkgs.sphinx-argparse python3pkgs.sphinxcontrib-wavedrom ps.sphinx_rtd_theme ps.sphinx]))
|
(pkgs.python3.withPackages(ps: [ artiqpkgs.sphinx-argparse artiqpkgs.sphinxcontrib-wavedrom ps.sphinx_rtd_theme ps.sphinx ]))
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
''
|
''
|
||||||
|
|
Loading…
Reference in New Issue