forked from M-Labs/nix-scripts
Compare commits
1 Commits
master
...
stm32-no-o
Author | SHA1 | Date | |
---|---|---|---|
7345020cf1 |
@ -1,97 +0,0 @@
|
|||||||
# Install Vivado in /opt and add to /etc/nixos/configuration.nix:
|
|
||||||
# nix.sandboxPaths = ["/opt"];
|
|
||||||
|
|
||||||
{ pkgs ? import <nixpkgs> {}
|
|
||||||
, artiq-fast
|
|
||||||
}:
|
|
||||||
|
|
||||||
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
|
|
||||||
]);
|
|
||||||
fetchcargo = import (artiq-fast + "/fetchcargo.nix") {
|
|
||||||
inherit (pkgs) stdenv lib cacert git;
|
|
||||||
inherit (artiqpkgs) cargo cargo-vendor;
|
|
||||||
};
|
|
||||||
cargoDeps = fetchcargo rec {
|
|
||||||
name = "artiq-firmware-cargo-deps";
|
|
||||||
src = "${artiqSrc}/artiq/firmware";
|
|
||||||
sha256 = import (artiqSrc + "/artiq/firmware/cargosha256.nix");
|
|
||||||
};
|
|
||||||
|
|
||||||
cargoVendored = pkgs.stdenv.mkDerivation {
|
|
||||||
name = "artiq-firmware-cargo-vendored";
|
|
||||||
src = cargoDeps;
|
|
||||||
phases = [ "unpackPhase" "installPhase" ];
|
|
||||||
installPhase =
|
|
||||||
''
|
|
||||||
mkdir -p $out/registry
|
|
||||||
cat << EOF > $out/config
|
|
||||||
[source.crates-io]
|
|
||||||
registry = "https://github.com/rust-lang/crates.io-index"
|
|
||||||
replace-with = "vendored-sources"
|
|
||||||
|
|
||||||
[source."https://github.com/m-labs/libfringe"]
|
|
||||||
git = "https://github.com/m-labs/libfringe"
|
|
||||||
rev = "b8a6d8f"
|
|
||||||
replace-with = "vendored-sources"
|
|
||||||
|
|
||||||
[source.vendored-sources]
|
|
||||||
directory = "$out/registry"
|
|
||||||
EOF
|
|
||||||
cp -R * $out/registry
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{ target
|
|
||||||
, variant
|
|
||||||
, src ? null
|
|
||||||
, buildCommand ? "python -m artiq.gateware.targets.${target} -V ${variant}"
|
|
||||||
, extraInstallCommands ? ""
|
|
||||||
, ...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
name = "artiq-board-${target}-${variant}-${artiqpkgs.artiq.version}-xxx";
|
|
||||||
installPath = "${pkgs.python3Packages.python.sitePackages}/artiq/board-support/${target}-${variant}";
|
|
||||||
in
|
|
||||||
# Board packages are Python modules so that they get added to the ARTIQ Python
|
|
||||||
# environment, and artiq_flash finds them.
|
|
||||||
pkgs.stdenv.mkDerivation {
|
|
||||||
name = "artiq-board-${target}-${variant}-${artiqpkgs.artiq.version}";
|
|
||||||
inherit src;
|
|
||||||
phases = [ "buildPhase" "installPhase" ];
|
|
||||||
nativeBuildInputs = [
|
|
||||||
pkgs.gnumake pkgs.which pythonEnv
|
|
||||||
artiqpkgs.cargo
|
|
||||||
artiqpkgs.rustc
|
|
||||||
artiqpkgs.binutils-or1k
|
|
||||||
artiqpkgs.llvm-or1k
|
|
||||||
];
|
|
||||||
buildInputs = [ pythonEnv ];
|
|
||||||
buildPhase =
|
|
||||||
''
|
|
||||||
export CARGO_HOME=${cargoVendored}
|
|
||||||
export TARGET_AR=or1k-linux-ar
|
|
||||||
${buildCommand} --no-compile-gateware --gateware-identifier-str=unprogrammed
|
|
||||||
'';
|
|
||||||
installPhase =
|
|
||||||
''
|
|
||||||
mkdir -p $out
|
|
||||||
cp -ar artiq_${target}/${variant}/gateware $out
|
|
||||||
|
|
||||||
TARGET_DIR=$out/${pkgs.python3Packages.python.sitePackages}/artiq/board-support/${target}-${variant}
|
|
||||||
mkdir -p $TARGET_DIR
|
|
||||||
if [ -e artiq_${target}/${variant}/software/bootloader/bootloader.bin ]
|
|
||||||
then cp artiq_${target}/${variant}/software/bootloader/bootloader.bin $TARGET_DIR
|
|
||||||
fi
|
|
||||||
if [ -e artiq_${target}/${variant}/software/runtime ]
|
|
||||||
then cp artiq_${target}/${variant}/software/runtime/runtime.{elf,fbi} $TARGET_DIR
|
|
||||||
else cp artiq_${target}/${variant}/software/satman/satman.{elf,fbi} $TARGET_DIR
|
|
||||||
fi
|
|
||||||
${extraInstallCommands}
|
|
||||||
'';
|
|
||||||
# don't mangle ELF files as they are not for NixOS
|
|
||||||
dontFixup = true;
|
|
||||||
}
|
|
@ -1,54 +0,0 @@
|
|||||||
{ pkgs ? import <artiq-fast/pkgs/nixpkgs.nix> { inherit (import <nixpkgs> {}) fetchgit; } {}
|
|
||||||
, artiq-fast ? <artiq-fast>
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
|
||||||
sinaraSystemsSrc = <sinaraSystemsSrc>;
|
|
||||||
generatedNix = pkgs.runCommand "generated-nix" { buildInputs = [ pkgs.nix pkgs.git ]; }
|
|
||||||
''
|
|
||||||
mkdir $out
|
|
||||||
cp ${./artiq-board.nix} $out/artiq-board.nix
|
|
||||||
cp ${../artiq-full/artiq-targets.nix} $out/artiq-targets.nix
|
|
||||||
cp -a ${artiq-fast} $out/fast
|
|
||||||
|
|
||||||
REV=`git --git-dir ${sinaraSystemsSrc}/.git rev-parse HEAD`
|
|
||||||
echo -n $REV > $out/sinara-rev.txt
|
|
||||||
SINARA_SRC_CLEAN=`mktemp -d`
|
|
||||||
cp -a ${sinaraSystemsSrc}/. $SINARA_SRC_CLEAN
|
|
||||||
chmod -R 755 $SINARA_SRC_CLEAN/.git
|
|
||||||
chmod 755 $SINARA_SRC_CLEAN
|
|
||||||
rm -rf $SINARA_SRC_CLEAN/.git
|
|
||||||
HASH=`nix-hash --type sha256 --base32 $SINARA_SRC_CLEAN`
|
|
||||||
echo -n $HASH > $out/sinara-hash.txt
|
|
||||||
|
|
||||||
cat > $out/default.nix << EOF
|
|
||||||
{ pkgs ? import ./fast/pkgs/nixpkgs.git { inherit (import <nixpkgs> {}) fetchgit; }
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
|
||||||
sinaraSystemsSrc = pkgs.fetchgit {
|
|
||||||
url = "https://git.m-labs.hk/M-Labs/sinara-systems.git";
|
|
||||||
rev = "$REV";
|
|
||||||
sha256 = "$HASH";
|
|
||||||
};
|
|
||||||
artiq-fast = import ./fast { inherit pkgs; };
|
|
||||||
artiq-board = import ./artiq-board.nix {
|
|
||||||
inherit pkgs;
|
|
||||||
artiq-fast = ./fast;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
builtins.mapAttrs (_: conf: pkgs.lib.hydraJob (artiq-board conf)) (
|
|
||||||
import ./artiq-targets.nix {
|
|
||||||
inherit pkgs sinaraSystemsSrc;
|
|
||||||
artiqVersion = artiq-fast.artiq.version;
|
|
||||||
}
|
|
||||||
)
|
|
||||||
EOF
|
|
||||||
'';
|
|
||||||
artiq-board-generated = import generatedNix {
|
|
||||||
inherit pkgs;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
artiq-board-generated // {
|
|
||||||
generated-nix = pkgs.lib.hydraJob generatedNix;
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
--- a/intl/relocatable.c 2018-02-28 18:19:46.318224392 +0000
|
|
||||||
+++ b/intl/relocatable.c 2018-02-28 18:19:37.614224749 +0000
|
|
||||||
@@ -145,7 +145,7 @@
|
|
||||||
libcharset_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
|
|
||||||
#endif
|
|
||||||
#if DEPENDS_ON_LIBICONV && HAVE_ICONV && _LIBICONV_VERSION >= 0x0109
|
|
||||||
- libiconv_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
|
|
||||||
+ // libiconv_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
|
|
||||||
#endif
|
|
||||||
#if DEPENDS_ON_LIBINTL && ENABLE_NLS && defined libintl_set_relocation_prefix
|
|
||||||
libintl_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
|
|
@ -1,21 +0,0 @@
|
|||||||
set MSYS=C:\MSYS64
|
|
||||||
set TRIPLE=x86_64-w64-mingw32
|
|
||||||
set PATH=%MSYS%\usr\bin;%MSYS%\mingw64\bin;%PATH%
|
|
||||||
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
set CFLAGS=-I%PREFIX:\=/%/Library/include/
|
|
||||||
set LDFLAGS=-L%PREFIX:\=/%/Library/lib/
|
|
||||||
sh ../configure --build=%TRIPLE% ^
|
|
||||||
--prefix="%PREFIX:\=/%/Library" ^
|
|
||||||
--target=##TARGET##
|
|
||||||
if errorlevel 1 exit 1
|
|
||||||
|
|
||||||
make -j4
|
|
||||||
if errorlevel 1 exit 1
|
|
||||||
|
|
||||||
make install
|
|
||||||
if errorlevel 1 exit 1
|
|
||||||
|
|
||||||
rem this is a copy of prefixed executables
|
|
||||||
rmdir /S /Q %PREFIX%\Library\##TARGET##
|
|
@ -1,17 +0,0 @@
|
|||||||
package:
|
|
||||||
name: binutils-##TARGET##
|
|
||||||
version: ##VERSION##
|
|
||||||
|
|
||||||
source:
|
|
||||||
url: ../src.tar.bz2
|
|
||||||
|
|
||||||
requirements:
|
|
||||||
build:
|
|
||||||
- libiconv
|
|
||||||
run:
|
|
||||||
- libiconv
|
|
||||||
|
|
||||||
about:
|
|
||||||
home: https://www.gnu.org/software/binutils/
|
|
||||||
license: GPL
|
|
||||||
summary: 'A set of programming tools for creating and managing binary programs, object files, libraries, profile data, and assembly source code.'
|
|
@ -1,54 +0,0 @@
|
|||||||
{ pkgs, version, src, target }:
|
|
||||||
|
|
||||||
let
|
|
||||||
wfvm = import ../wfvm.nix { inherit pkgs; };
|
|
||||||
libiconv-filename = "libiconv-1.15-h1df5818_7.tar.bz2";
|
|
||||||
libiconv = pkgs.fetchurl {
|
|
||||||
url = "https://anaconda.org/anaconda/libiconv/1.15/download/win-64/${libiconv-filename}";
|
|
||||||
sha256 = "0p431madykrjmi9sbl2sy9kzb0l3vhgs677i8q7cx8g210ab5g52";
|
|
||||||
};
|
|
||||||
vc14-filename = "vc-14.1-h0510ff6_4.tar.bz2";
|
|
||||||
vc14 = pkgs.fetchurl {
|
|
||||||
url = "https://anaconda.org/anaconda/vc/14.1/download/win-64/${vc14-filename}";
|
|
||||||
sha256 = "0nsyxph667x8ky1nybakpnk816dkrzbf1684jd7pp6wm5x73p34v";
|
|
||||||
};
|
|
||||||
vs2015_runtime-filename = "vs2015_runtime-14.16.27012-hf0eaf9b_2.tar.bz2";
|
|
||||||
vs2015_runtime = pkgs.fetchurl {
|
|
||||||
url = "https://anaconda.org/anaconda/vs2015_runtime/14.16.27012/download/win-64/${vs2015_runtime-filename}";
|
|
||||||
sha256 = "1gbm6i6nkp8linmak5mm42hj1nzqd5ppak8kv1n3wfn52p21ngvs";
|
|
||||||
};
|
|
||||||
build = wfvm.utils.wfvm-run {
|
|
||||||
name = "build-binutils";
|
|
||||||
image = wfvm.makeWindowsImage { installCommands = with wfvm.layers; [ anaconda3 msys2 (msys2-packages (import ./msys_packages.nix { inherit pkgs; } )) ]; };
|
|
||||||
script = ''
|
|
||||||
# Create a fake channel to work around another pile of bugs and cretinous design decisions from conda.
|
|
||||||
${wfvm.utils.win-exec}/bin/win-exec "mkdir fake-channel && mkdir fake-channel\win-64"
|
|
||||||
ln -s ${libiconv} ${libiconv-filename}
|
|
||||||
${wfvm.utils.win-put}/bin/win-put ${libiconv-filename} ./fake-channel/win-64
|
|
||||||
ln -s ${vc14} ${vc14-filename}
|
|
||||||
${wfvm.utils.win-put}/bin/win-put ${vc14-filename} ./fake-channel/win-64
|
|
||||||
ln -s ${vs2015_runtime} ${vs2015_runtime-filename}
|
|
||||||
${wfvm.utils.win-put}/bin/win-put ${vs2015_runtime-filename} ./fake-channel/win-64
|
|
||||||
${wfvm.utils.win-exec}/bin/win-exec ".\Anaconda3\scripts\activate && conda index fake-channel"
|
|
||||||
|
|
||||||
cp --no-preserve=mode,ownership -R ${./binutils-recipe} binutils
|
|
||||||
sed -i s/##TARGET##/${target}/g binutils/*
|
|
||||||
sed -i s/##VERSION##/${version}/g binutils/*
|
|
||||||
${wfvm.utils.win-put}/bin/win-put binutils .
|
|
||||||
tar xjf ${src}
|
|
||||||
patch -d binutils-${version} -p1 < ${./binutils-hack-libiconv.patch}
|
|
||||||
tar cjf src.tar.bz2 binutils-${version}
|
|
||||||
${wfvm.utils.win-put}/bin/win-put src.tar.bz2 .
|
|
||||||
|
|
||||||
${wfvm.utils.win-exec}/bin/win-exec ".\Anaconda3\scripts\activate && conda build --no-anaconda-upload --no-test -c file:///C:/users/wfvm/fake-channel --override-channels binutils"
|
|
||||||
|
|
||||||
${wfvm.utils.win-get}/bin/win-get "Anaconda3/conda-bld/win-64/binutils-${target}-${version}-0.tar.bz2"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
in
|
|
||||||
pkgs.runCommand "conda-windows-binutils-${target}" { buildInputs = [ build ]; } ''
|
|
||||||
wfvm-run-build-binutils
|
|
||||||
mkdir -p $out/win-64 $out/nix-support
|
|
||||||
cp binutils-*.tar.bz2 $out/win-64
|
|
||||||
echo file conda $out/win-64/*.tar.bz2 >> $out/nix-support/hydra-build-products
|
|
||||||
''
|
|
@ -1,83 +0,0 @@
|
|||||||
{ pkgs, version, src }:
|
|
||||||
|
|
||||||
let
|
|
||||||
wfvm = import ../wfvm.nix { inherit pkgs; };
|
|
||||||
conda-vs2015_runtime-filename = "vs2015_runtime-14.16.27012-hf0eaf9b_2.tar.bz2";
|
|
||||||
conda-vs2015_runtime = pkgs.fetchurl {
|
|
||||||
url = "https://anaconda.org/anaconda/vs2015_runtime/14.16.27012/download/win-64/${conda-vs2015_runtime-filename}";
|
|
||||||
sha256 = "1gbm6i6nkp8linmak5mm42hj1nzqd5ppak8kv1n3wfn52p21ngvs";
|
|
||||||
};
|
|
||||||
conda-cmake-filename = "cmake-3.17.2-h33f27b4_0.tar.bz2";
|
|
||||||
conda-cmake = pkgs.fetchurl {
|
|
||||||
url = "https://anaconda.org/anaconda/cmake/3.17.2/download/win-64/${conda-cmake-filename}";
|
|
||||||
sha256 = "0lg782pj2i9h20rwfkwwskis038r98b3z4c9j1a6ih95rc6m2acn";
|
|
||||||
};
|
|
||||||
build = wfvm.utils.wfvm-run {
|
|
||||||
name = "build-llvm-or1k";
|
|
||||||
image = wfvm.makeWindowsImage { installCommands = with wfvm.layers; [ anaconda3 msvc msvc-ide-unbreak ]; };
|
|
||||||
script = ''
|
|
||||||
# Create a fake channel so that the conda garbage doesn't complain about not finding the packages it just installed.
|
|
||||||
ln -s ${conda-vs2015_runtime} ${conda-vs2015_runtime-filename}
|
|
||||||
ln -s ${conda-cmake} ${conda-cmake-filename}
|
|
||||||
${wfvm.utils.win-exec}/bin/win-exec "mkdir fake-channel && mkdir fake-channel\win-64"
|
|
||||||
${wfvm.utils.win-put}/bin/win-put ${conda-vs2015_runtime-filename} ./fake-channel/win-64
|
|
||||||
${wfvm.utils.win-put}/bin/win-put ${conda-cmake-filename} ./fake-channel/win-64
|
|
||||||
${wfvm.utils.win-exec}/bin/win-exec ".\Anaconda3\scripts\activate && conda index fake-channel"
|
|
||||||
|
|
||||||
cat > meta.yaml << EOF
|
|
||||||
package:
|
|
||||||
name: llvm-or1k
|
|
||||||
version: ${version}
|
|
||||||
|
|
||||||
source:
|
|
||||||
url: ../src.tar
|
|
||||||
|
|
||||||
requirements:
|
|
||||||
build:
|
|
||||||
- cmake
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat > bld.bat << EOF
|
|
||||||
set BUILD_TYPE=Release
|
|
||||||
set CMAKE_GENERATOR=Visual Studio 15 2017 Win64
|
|
||||||
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
cmake .. -G "%CMAKE_GENERATOR%" ^
|
|
||||||
-Thost=x64 ^
|
|
||||||
-DCMAKE_BUILD_TYPE="%BUILD_TYPE%" ^
|
|
||||||
-DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" ^
|
|
||||||
-DLLVM_BUILD_LLVM_DYLIB=ON ^
|
|
||||||
-DLLVM_TARGETS_TO_BUILD=X86;ARM ^
|
|
||||||
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=OR1K ^
|
|
||||||
-DLLVM_ENABLE_ASSERTIONS=OFF ^
|
|
||||||
-DLLVM_INSTALL_UTILS=ON ^
|
|
||||||
-DLLVM_INCLUDE_TESTS=OFF ^
|
|
||||||
-DLLVM_INCLUDE_DOCS=OFF ^
|
|
||||||
-DLLVM_INCLUDE_EXAMPLES=OFF
|
|
||||||
if errorlevel 1 exit 1
|
|
||||||
cmake --build . --config "%BUILD_TYPE%" --parallel 4
|
|
||||||
if errorlevel 1 exit 1
|
|
||||||
cmake --build . --config "%BUILD_TYPE%" --target install
|
|
||||||
if errorlevel 1 exit 1
|
|
||||||
EOF
|
|
||||||
|
|
||||||
${wfvm.utils.win-exec}/bin/win-exec "mkdir llvm-or1k"
|
|
||||||
${wfvm.utils.win-put}/bin/win-put meta.yaml llvm-or1k
|
|
||||||
${wfvm.utils.win-put}/bin/win-put bld.bat llvm-or1k
|
|
||||||
ln -s ${src} src
|
|
||||||
tar chf src.tar src
|
|
||||||
${wfvm.utils.win-put}/bin/win-put src.tar .
|
|
||||||
|
|
||||||
${wfvm.utils.win-exec}/bin/win-exec ".\Anaconda3\scripts\activate && conda build --no-anaconda-upload --no-test -c file:///C:/users/wfvm/fake-channel --override-channels llvm-or1k"
|
|
||||||
|
|
||||||
${wfvm.utils.win-get}/bin/win-get "Anaconda3/conda-bld/win-64/llvm-or1k-${version}-0.tar.bz2"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
in
|
|
||||||
pkgs.runCommand "conda-windows-llvm-or1k" { buildInputs = [ build ]; } ''
|
|
||||||
wfvm-run-build-llvm-or1k
|
|
||||||
mkdir -p $out/win-64 $out/nix-support
|
|
||||||
cp llvm-or1k-*.tar.bz2 $out/win-64
|
|
||||||
echo file conda $out/win-64/*.tar.bz2 >> $out/nix-support/hydra-build-products
|
|
||||||
''
|
|
@ -1,76 +0,0 @@
|
|||||||
{ pkgs, conda-windows-llvm-or1k, version, src }:
|
|
||||||
|
|
||||||
let
|
|
||||||
wfvm = import ../wfvm.nix { inherit pkgs; };
|
|
||||||
conda-vs2015_runtime-filename = "vs2015_runtime-14.16.27012-hf0eaf9b_2.tar.bz2";
|
|
||||||
conda-vs2015_runtime = pkgs.fetchurl {
|
|
||||||
url = "https://anaconda.org/anaconda/vs2015_runtime/14.16.27012/download/win-64/${conda-vs2015_runtime-filename}";
|
|
||||||
sha256 = "1gbm6i6nkp8linmak5mm42hj1nzqd5ppak8kv1n3wfn52p21ngvs";
|
|
||||||
};
|
|
||||||
conda-cmake-filename = "cmake-3.17.2-h33f27b4_0.tar.bz2";
|
|
||||||
conda-cmake = pkgs.fetchurl {
|
|
||||||
url = "https://anaconda.org/anaconda/cmake/3.17.2/download/win-64/${conda-cmake-filename}";
|
|
||||||
sha256 = "0lg782pj2i9h20rwfkwwskis038r98b3z4c9j1a6ih95rc6m2acn";
|
|
||||||
};
|
|
||||||
build = wfvm.utils.wfvm-run {
|
|
||||||
name = "build-llvmlite-artiq";
|
|
||||||
image = wfvm.makeWindowsImage { installCommands = with wfvm.layers; [ anaconda3 msvc msvc-ide-unbreak ]; };
|
|
||||||
script = ''
|
|
||||||
ln -s ${conda-vs2015_runtime} ${conda-vs2015_runtime-filename}
|
|
||||||
ln -s ${conda-cmake} ${conda-cmake-filename}
|
|
||||||
${wfvm.utils.win-exec}/bin/win-exec "mkdir fake-channel && mkdir fake-channel\win-64"
|
|
||||||
${wfvm.utils.win-put}/bin/win-put ${conda-vs2015_runtime-filename} ./fake-channel/win-64
|
|
||||||
${wfvm.utils.win-put}/bin/win-put ${conda-cmake-filename} ./fake-channel/win-64
|
|
||||||
${wfvm.utils.win-put}/bin/win-put ${conda-windows-llvm-or1k}/win-64/llvm-or1k-*.tar.bz2 ./fake-channel/win-64
|
|
||||||
${wfvm.utils.win-exec}/bin/win-exec ".\Anaconda3\scripts\activate && conda index fake-channel"
|
|
||||||
|
|
||||||
cat > meta.yaml << EOF
|
|
||||||
package:
|
|
||||||
name: llvmlite-artiq
|
|
||||||
version: ${version}
|
|
||||||
|
|
||||||
source:
|
|
||||||
url: ../src.tar
|
|
||||||
|
|
||||||
requirements:
|
|
||||||
build:
|
|
||||||
- cmake
|
|
||||||
- llvm-or1k
|
|
||||||
run:
|
|
||||||
- python<3.8
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat > bld.bat << EOF
|
|
||||||
@rem Let CMake know about the LLVM install path, for find_package()
|
|
||||||
set CMAKE_PREFIX_PATH=%LIBRARY_PREFIX%
|
|
||||||
|
|
||||||
@rem Ensure there are no build leftovers (CMake can complain)
|
|
||||||
if exist ffi\build rmdir /S /Q ffi\build
|
|
||||||
|
|
||||||
python setup.py install \
|
|
||||||
--prefix=%PREFIX% \
|
|
||||||
--single-version-externally-managed \
|
|
||||||
--record=record.txt \
|
|
||||||
--no-compile
|
|
||||||
if errorlevel 1 exit 1
|
|
||||||
EOF
|
|
||||||
|
|
||||||
${wfvm.utils.win-exec}/bin/win-exec "mkdir llvmlite-artiq"
|
|
||||||
${wfvm.utils.win-put}/bin/win-put meta.yaml llvmlite-artiq
|
|
||||||
${wfvm.utils.win-put}/bin/win-put bld.bat llvmlite-artiq
|
|
||||||
ln -s ${src} src
|
|
||||||
tar chf src.tar src
|
|
||||||
${wfvm.utils.win-put}/bin/win-put src.tar .
|
|
||||||
|
|
||||||
${wfvm.utils.win-exec}/bin/win-exec ".\Anaconda3\scripts\activate && conda build --no-anaconda-upload --no-test -c file:///C:/users/wfvm/fake-channel --override-channels llvmlite-artiq"
|
|
||||||
|
|
||||||
${wfvm.utils.win-get}/bin/win-get "Anaconda3/conda-bld/win-64/llvmlite-artiq-${version}-0.tar.bz2"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
in
|
|
||||||
pkgs.runCommand "conda-windows-llvmlite-artiq" { buildInputs = [ build ]; } ''
|
|
||||||
wfvm-run-build-llvmlite-artiq
|
|
||||||
mkdir -p $out/win-64 $out/nix-support
|
|
||||||
cp llvmlite-artiq-*.tar.bz2 $out/win-64
|
|
||||||
echo file conda $out/win-64/*.tar.bz2 >> $out/nix-support/hydra-build-products
|
|
||||||
''
|
|
@ -1,177 +0,0 @@
|
|||||||
{ pkgs } : [
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-libiconv-1.16-1-any.pkg.tar.xz";
|
|
||||||
sha256 = "0w8jkjr5gwybw9469216vs6vpibkq36wx47bbl4r0smi4wvh2yxk";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-zlib-1.2.11-7-any.pkg.tar.xz";
|
|
||||||
sha256 = "1hnfagn5m0ys4f8349d8dpbqvh9p900jjn83r7fi1az6i9dz1v0x";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-binutils-2.34-3-any.pkg.tar.zst";
|
|
||||||
sha256 = "0ahlwbg5ir89nbra407yrzsplib4cia9m0dggcqjw1i4bxi7ypj1";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-headers-git-8.0.0.5905.066f1b3c-1-any.pkg.tar.zst";
|
|
||||||
sha256 = "0sskg0vvgggs932i09ipm5rrllv6vdf1ai3d3fvbi5pxis1xc9g0";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-crt-git-8.0.0.5905.066f1b3c-1-any.pkg.tar.zst";
|
|
||||||
sha256 = "1sjizkvknivbjs962fqxcmjkgnrvhd1frq96cfj2fyzk5cz7kfx0";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-isl-0.22.1-1-any.pkg.tar.xz";
|
|
||||||
sha256 = "1nj7sj3hgxhziqs1l7k42ginl10w7iy1b753mwvqiczfs322hb90";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gmp-6.2.0-1-any.pkg.tar.xz";
|
|
||||||
sha256 = "1l4qdxr8xp6xyxabwcf9b876db3rhj4v54zsvb4v1kwm3jrs7caw";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-mpfr-4.0.2-2-any.pkg.tar.xz";
|
|
||||||
sha256 = "0hriryx58bkk3sihnhd4i6966civ3hq8i68rnc9kjivk47wi49rj";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-mpc-1.1.0-1-any.pkg.tar.xz";
|
|
||||||
sha256 = "0x1kg178l6mf9ivdy71bci36h2a37vypg4jk3k7y31ks6i79zifp";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-libwinpthread-git-8.0.0.5906.c9a21571-1-any.pkg.tar.zst";
|
|
||||||
sha256 = "16aqi04drn252cxdh1brpbi4syn4bfjb84qk4xqbnffnpxpvv5ph";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gcc-libs-10.1.0-3-any.pkg.tar.zst";
|
|
||||||
sha256 = "0bmkrb9x7z0azzxl3z08r6chcl0pbnaijar7cdjxb2nh7fbbdzzp";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-windows-default-manifest-6.4-3-any.pkg.tar.xz";
|
|
||||||
sha256 = "1kwxb3q2slgsg17lkd0dc9fjks5f205dgm79fj0xq0zmrsns83kc";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-winpthreads-git-8.0.0.5906.c9a21571-1-any.pkg.tar.zst";
|
|
||||||
sha256 = "17nq8gs1nnxgligdrp5n6h4pnk46xw0yhjk2hn6y12vvpn7iv05v";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-zstd-1.4.5-1-any.pkg.tar.zst";
|
|
||||||
sha256 = "1jfxzajmbvlap1c0v17s8dzwdx0fi8kyrkmgr6gw1snisgllifyh";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gcc-10.1.0-3-any.pkg.tar.zst";
|
|
||||||
sha256 = "1gkcc6hh20glx4b96ldsnd70r8dbp460bxfznm9z2rwgr0mxb374";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "http://repo.msys2.org/msys/x86_64/make-4.3-1-x86_64.pkg.tar.xz";
|
|
||||||
sha256 = "0bmgggw56gkx7dcd8simpi2lhgz98limikx8wm0cb8cn7awi9w82";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "http://repo.msys2.org/msys/x86_64/m4-1.4.18-2-x86_64.pkg.tar.xz";
|
|
||||||
sha256 = "05x7myqwwxk3vfqmliwk5pfn0w04fnjh1sqafsynpb9hx0c563ji";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "http://repo.msys2.org/msys/x86_64/diffutils-3.7-1-x86_64.pkg.tar.xz";
|
|
||||||
sha256 = "11qdxn4mr8a96palhp5jkam904fh77bsw5v7mslhnzag4cg3kybx";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "http://repo.msys2.org/msys/x86_64/autoconf-2.69-5-any.pkg.tar.xz";
|
|
||||||
sha256 = "1fxvgbjnmmb7dvmssfxkiw151dfd1wzj04hf45zklmzs4h2kkwda";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "http://repo.msys2.org/msys/x86_64/automake1.6-1.6.3-2-any.pkg.tar.xz";
|
|
||||||
sha256 = "0if4wrr1vm2f1zjjh6dpln97xc1l1052bcawzmndwfh561cfxqb6";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "http://repo.msys2.org/msys/x86_64/automake1.7-1.7.9-2-any.pkg.tar.xz";
|
|
||||||
sha256 = "1mjhp1k4c0xm8hfm3yckqvfb4ablzgg8a87l7wxaq1mmmskjmhpq";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "http://repo.msys2.org/msys/x86_64/automake1.8-1.8.5-3-any.pkg.tar.xz";
|
|
||||||
sha256 = "046bzr44ss0lglx9lzccj9li74arz632hyvz6l9fcp98dndr3qjk";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "http://repo.msys2.org/msys/x86_64/automake1.9-1.9.6-2-any.pkg.tar.xz";
|
|
||||||
sha256 = "0bh0dldmrd46xhix5358nj9sgf298n4ap0y8dsl6rvjsb5c0l5hd";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "http://repo.msys2.org/msys/x86_64/automake1.10-1.10.3-3-any.pkg.tar.xz";
|
|
||||||
sha256 = "0p26lkx5n1mmmw1y98bgwzbxfxkfa18fqxvkgsm60fznjig4dq61";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "http://repo.msys2.org/msys/x86_64/automake1.11-1.11.6-3-any.pkg.tar.xz";
|
|
||||||
sha256 = "1cjkav2bskf9rdm8g3hsl2l7wz1lx8dfigwqib0xhm7n8i8gc560";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "http://repo.msys2.org/msys/x86_64/automake1.12-1.12.6-3-any.pkg.tar.xz";
|
|
||||||
sha256 = "1c0h2lngfjjfvw0jkrfah1fs25k0vdm80hlxfjs912almh2yg5gv";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "http://repo.msys2.org/msys/x86_64/automake1.13-1.13.4-4-any.pkg.tar.xz";
|
|
||||||
sha256 = "0mczn8hanqn3hxr104klb832b4cnzn44bbn7lvqfsbvvjpklv9ld";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "http://repo.msys2.org/msys/x86_64/automake1.14-1.14.1-3-any.pkg.tar.xz";
|
|
||||||
sha256 = "04gjyfszyphxy7qc1rr8378ms9hql0sy8a1gyj0mvpbmgb0phgkp";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "http://repo.msys2.org/msys/x86_64/automake1.15-1.15.1-1-any.pkg.tar.xz";
|
|
||||||
sha256 = "00n1f3c6fwznpm1f6xmj30q41ixw5vdg52yg48yvr4jswb78qf8q";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "http://repo.msys2.org/msys/x86_64/automake1.16-1.16.1-1-any.pkg.tar.xz";
|
|
||||||
sha256 = "1ds8rpagrlkzi28n5rh0jcibbic49xssl2hz6sy41my0vd8a3z9y";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "http://repo.msys2.org/msys/x86_64/automake-wrapper-11-1-any.pkg.tar.xz";
|
|
||||||
sha256 = "1dzymv59wri7qqmgmy5xfkq6zvfcb0znwspc149a04d0bhxs75gw";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "http://repo.msys2.org/msys/x86_64/libltdl-2.4.6-9-x86_64.pkg.tar.xz";
|
|
||||||
sha256 = "0j0xazjpj28dib9vjn3paibhry77k903rzvbkdn6gnl20smj18g2";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "http://repo.msys2.org/msys/x86_64/tar-1.32-1-x86_64.pkg.tar.xz";
|
|
||||||
sha256 = "0ynz2qwzbcmixcxddp05q2wc7iqli6svzkrjss9izrpmbkv5ifa5";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "http://repo.msys2.org/msys/x86_64/libtool-2.4.6-9-x86_64.pkg.tar.xz";
|
|
||||||
sha256 = "0mrnkayrhmrgq446nyysvj3kadqm1xhyl97qqv6hrq57lhkcry2p";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "http://repo.msys2.org/msys/x86_64/texinfo-6.7-1-x86_64.pkg.tar.xz";
|
|
||||||
sha256 = "0c50809yg9g95m8yib867q8m28sjabqppz2qbzh3gr83z55kknnw";
|
|
||||||
})
|
|
||||||
]
|
|
@ -1,13 +0,0 @@
|
|||||||
{ pkgs, name, filename, baseurl, sha256 }:
|
|
||||||
|
|
||||||
let
|
|
||||||
download = pkgs.fetchurl {
|
|
||||||
url = "${baseurl}${filename}";
|
|
||||||
inherit sha256;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
pkgs.runCommand "conda-windows-${name}" { } ''
|
|
||||||
mkdir -p $out/win-64 $out/nix-support
|
|
||||||
ln -s ${download} $out/win-64/${filename}
|
|
||||||
echo file conda $out/win-64/${filename} >> $out/nix-support/hydra-build-products
|
|
||||||
''
|
|
@ -1,38 +0,0 @@
|
|||||||
{ pkgs }:
|
|
||||||
|
|
||||||
let
|
|
||||||
version = import ../pkgs/artiq-version.nix (with pkgs; { inherit stdenv fetchgit git; });
|
|
||||||
fakeCondaSource = import ./fake-source.nix { inherit pkgs; } {
|
|
||||||
name = "artiq";
|
|
||||||
inherit version;
|
|
||||||
src = import ../pkgs/artiq-src.nix { fetchgit = pkgs.fetchgit; };
|
|
||||||
dependencies = [
|
|
||||||
"llvmlite-artiq"
|
|
||||||
"binutils-or1k-linux"
|
|
||||||
"pythonparser"
|
|
||||||
"scipy"
|
|
||||||
"numpy"
|
|
||||||
"prettytable"
|
|
||||||
"h5py"
|
|
||||||
"python-dateutil"
|
|
||||||
"pyqt"
|
|
||||||
(if (pkgs.lib.strings.versionAtLeast version "6.0") then "qasync" else "quamash")
|
|
||||||
"pyqtgraph"
|
|
||||||
"pygit2"
|
|
||||||
"python-levenshtein"
|
|
||||||
"sipyco"
|
|
||||||
];
|
|
||||||
extraYaml =
|
|
||||||
''
|
|
||||||
about:
|
|
||||||
home: https://m-labs.hk/artiq
|
|
||||||
license: LGPL
|
|
||||||
summary: 'A leading-edge control system for quantum information experiments'
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
conda-artiq = import ./build.nix { inherit pkgs; } {
|
|
||||||
name = "conda-artiq";
|
|
||||||
src = fakeCondaSource;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
conda-artiq
|
|
@ -1,45 +0,0 @@
|
|||||||
{ pkgs, version, src, target }:
|
|
||||||
|
|
||||||
let
|
|
||||||
fake-src = pkgs.runCommand "conda-fake-source-binutils-${target}" { }
|
|
||||||
''
|
|
||||||
mkdir -p $out/fake-conda;
|
|
||||||
|
|
||||||
cat << EOF > $out/fake-conda/meta.yaml
|
|
||||||
package:
|
|
||||||
name: binutils-${target}
|
|
||||||
version: ${version}
|
|
||||||
|
|
||||||
source:
|
|
||||||
url: ${src}
|
|
||||||
|
|
||||||
# Note: libiconv is also a build dependency, but the conda garbage won't find it
|
|
||||||
# if installed from a file (even if it shows up in conda list), as is the case
|
|
||||||
# when using this script.
|
|
||||||
requirements:
|
|
||||||
run:
|
|
||||||
- libiconv
|
|
||||||
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat << EOF > $out/fake-conda/build.sh
|
|
||||||
#!/bin/bash
|
|
||||||
set -e
|
|
||||||
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
../configure --target=${target} --prefix=\$PREFIX
|
|
||||||
make
|
|
||||||
make install
|
|
||||||
|
|
||||||
# this is a copy of prefixed executables
|
|
||||||
rm -rf $PREFIX/${target}
|
|
||||||
|
|
||||||
EOF
|
|
||||||
chmod 755 $out/fake-conda/build.sh
|
|
||||||
'';
|
|
||||||
in
|
|
||||||
import ./build.nix { inherit pkgs; } {
|
|
||||||
name = "conda-binutils-${target}";
|
|
||||||
src = fake-src;
|
|
||||||
}
|
|
@ -1,36 +0,0 @@
|
|||||||
{ pkgs, bscan_spi_bitstreams }:
|
|
||||||
|
|
||||||
let
|
|
||||||
src = pkgs.runCommand "conda-fake-source-bscan_spi_bitstreams" { }
|
|
||||||
''
|
|
||||||
mkdir -p $out/fake-conda;
|
|
||||||
|
|
||||||
# work around yet more idiotic conda behavior - build breaks if write permissions aren't set on source files.
|
|
||||||
cp --no-preserve=mode,ownership -R ${bscan_spi_bitstreams} workaround-conda
|
|
||||||
pushd workaround-conda
|
|
||||||
tar cf $out/src.tar .
|
|
||||||
popd
|
|
||||||
rm -rf workaround-conda
|
|
||||||
|
|
||||||
cat << EOF > $out/fake-conda/meta.yaml
|
|
||||||
package:
|
|
||||||
name: bscan-spi-bitstreams
|
|
||||||
version: "0.10.0"
|
|
||||||
|
|
||||||
source:
|
|
||||||
url: ../src.tar
|
|
||||||
|
|
||||||
build:
|
|
||||||
noarch: generic
|
|
||||||
binary_relocation: false
|
|
||||||
script:
|
|
||||||
- "mkdir -p \$PREFIX/share/bscan-spi-bitstreams"
|
|
||||||
- "cp *.bit \$PREFIX/share/bscan-spi-bitstreams"
|
|
||||||
|
|
||||||
EOF
|
|
||||||
'';
|
|
||||||
in
|
|
||||||
import ./build.nix { inherit pkgs; } {
|
|
||||||
name = "conda-bscan_spi_bitstreams";
|
|
||||||
inherit src;
|
|
||||||
}
|
|
@ -1,30 +0,0 @@
|
|||||||
# We need to pass the whole source to conda for the git variables to work.
|
|
||||||
# recipe must be a string pointing to a path within the source.
|
|
||||||
|
|
||||||
{ pkgs }:
|
|
||||||
{ name ? null
|
|
||||||
, src
|
|
||||||
, pname ? null
|
|
||||||
, version ? null
|
|
||||||
, recipe ? "fake-conda"
|
|
||||||
}:
|
|
||||||
|
|
||||||
# Check that either name is specified or both pname & version are specified.
|
|
||||||
assert (name == null) -> pname != null && version != null;
|
|
||||||
assert (name != null) -> pname == null && version == null;
|
|
||||||
let
|
|
||||||
condaBuilderEnv = import ./builder-env.nix { inherit pkgs; };
|
|
||||||
realName = if (name != null) then name else "${pname}-${version}";
|
|
||||||
in pkgs.stdenv.mkDerivation {
|
|
||||||
name = realName;
|
|
||||||
inherit src;
|
|
||||||
buildCommand =
|
|
||||||
''
|
|
||||||
HOME=`pwd`
|
|
||||||
mkdir $out
|
|
||||||
${condaBuilderEnv}/bin/conda-builder-env -c "conda build --no-anaconda-upload --no-test --output-folder $out $src/${recipe}"
|
|
||||||
|
|
||||||
mkdir -p $out/nix-support
|
|
||||||
echo file conda $out/*/*.tar.bz2 >> $out/nix-support/hydra-build-products
|
|
||||||
'';
|
|
||||||
}
|
|
@ -1,47 +0,0 @@
|
|||||||
{ pkgs }:
|
|
||||||
|
|
||||||
with pkgs;
|
|
||||||
|
|
||||||
let
|
|
||||||
condaDeps = [ stdenv.cc xorg.libSM xorg.libICE xorg.libX11 xorg.libXau xorg.libXi xorg.libXrender libselinux libGL ];
|
|
||||||
# Use the full Anaconda distribution, which already contains conda-build and its many dependencies,
|
|
||||||
# so we don't have to manually deal with them.
|
|
||||||
condaInstaller = fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/archive/Anaconda3-2019.03-Linux-x86_64.sh";
|
|
||||||
sha256 = "0fmpdd5876ylds98mydmv5klnwlzasa461k0l1f4vhbw96vm3j25";
|
|
||||||
};
|
|
||||||
condaSrcChmod = runCommand "conda-src-chmod" { } "mkdir $out; cp ${condaInstaller} $out/conda-installer.sh; chmod +x $out/conda-installer.sh";
|
|
||||||
condaInstallerEnv = buildFHSUserEnv {
|
|
||||||
name = "conda-installer-env";
|
|
||||||
targetPkgs = pkgs: ([ condaSrcChmod ] ++ condaDeps);
|
|
||||||
};
|
|
||||||
|
|
||||||
# for binutils
|
|
||||||
libiconv-filename = "libiconv-1.15-h516909a_1006.tar.bz2";
|
|
||||||
libiconv = pkgs.fetchurl {
|
|
||||||
url = "https://anaconda.org/conda-forge/libiconv/1.15/download/linux-64/${libiconv-filename}";
|
|
||||||
sha256 = "1y1g807881j95f9s6mjinf6b7mqa51vc9jf0v7cx8hn7xx4d10ik";
|
|
||||||
};
|
|
||||||
|
|
||||||
condaInstalled = runCommand "conda-installed" { }
|
|
||||||
''
|
|
||||||
${condaInstallerEnv}/bin/conda-installer-env -c "${condaSrcChmod}/conda-installer.sh -p $out -b"
|
|
||||||
substituteInPlace $out/lib/python3.7/site-packages/conda/gateways/disk/__init__.py \
|
|
||||||
--replace "os.chmod(path, 0o2775)" "pass"
|
|
||||||
|
|
||||||
# The conda garbage breaks if the package filename is prefixed with the Nix store hash.
|
|
||||||
# Symptom is "WARNING conda.core.prefix_data:_load_single_record(167): Ignoring malformed
|
|
||||||
# prefix record at: /nix/store/[...].json", and the package is not registered in the conda
|
|
||||||
# list, even though its files are installed.
|
|
||||||
ln -s ${libiconv} ${libiconv-filename}
|
|
||||||
${condaInstallerEnv}/bin/conda-installer-env -c "$out/bin/conda install ${libiconv-filename}"
|
|
||||||
'';
|
|
||||||
in
|
|
||||||
buildFHSUserEnv {
|
|
||||||
name = "conda-builder-env";
|
|
||||||
targetPkgs = pkgs: ([ condaInstalled ] ++ condaDeps ++ [
|
|
||||||
# for llvm-or1k
|
|
||||||
cmake
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
|
@ -1,52 +0,0 @@
|
|||||||
{ pkgs, version, src }:
|
|
||||||
|
|
||||||
let
|
|
||||||
fake-src = pkgs.runCommand "conda-fake-source-llvm-or1k" { }
|
|
||||||
''
|
|
||||||
mkdir -p $out/fake-conda;
|
|
||||||
|
|
||||||
# work around yet more idiotic conda behavior - build breaks if write permissions aren't set on source files.
|
|
||||||
cp --no-preserve=mode,ownership -R ${src} workaround-conda
|
|
||||||
pushd workaround-conda
|
|
||||||
tar cf $out/src.tar .
|
|
||||||
popd
|
|
||||||
rm -rf workaround-conda
|
|
||||||
|
|
||||||
cat << EOF > $out/fake-conda/meta.yaml
|
|
||||||
package:
|
|
||||||
name: llvm-or1k
|
|
||||||
version: ${version}
|
|
||||||
|
|
||||||
# Use the nixpkgs cmake to build, so we are less bothered by conda idiocy.
|
|
||||||
|
|
||||||
source:
|
|
||||||
url: ../src.tar
|
|
||||||
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat << EOF > $out/fake-conda/build.sh
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
cmake .. \$COMPILER32 \
|
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
|
||||||
-DCMAKE_INSTALL_PREFIX=\$PREFIX \
|
|
||||||
-DLLVM_BUILD_LLVM_DYLIB=ON \
|
|
||||||
-DLLVM_LINK_LLVM_DYLIB=ON \
|
|
||||||
-DLLVM_TARGETS_TO_BUILD=X86\;ARM \
|
|
||||||
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=OR1K \
|
|
||||||
-DLLVM_ENABLE_ASSERTIONS=OFF \
|
|
||||||
-DLLVM_INSTALL_UTILS=ON \
|
|
||||||
-DLLVM_INCLUDE_TESTS=OFF \
|
|
||||||
-DLLVM_INCLUDE_DOCS=OFF \
|
|
||||||
-DLLVM_INCLUDE_EXAMPLES=OFF
|
|
||||||
make -j2
|
|
||||||
make install
|
|
||||||
|
|
||||||
EOF
|
|
||||||
chmod 755 $out/fake-conda/build.sh
|
|
||||||
'';
|
|
||||||
in
|
|
||||||
import ./build.nix { inherit pkgs; } {
|
|
||||||
name = "conda-llvm-or1k";
|
|
||||||
src = fake-src;
|
|
||||||
}
|
|
@ -1,69 +0,0 @@
|
|||||||
{ pkgs, conda-llvm-or1k, version, src }:
|
|
||||||
|
|
||||||
let
|
|
||||||
condaBuilderEnv = import ./builder-env.nix { inherit pkgs; };
|
|
||||||
fake-src = pkgs.runCommand "conda-fake-source-llvmlite-artiq" { }
|
|
||||||
''
|
|
||||||
mkdir -p $out/fake-conda;
|
|
||||||
|
|
||||||
# work around yet more idiotic conda behavior - build breaks if write permissions aren't set on source files.
|
|
||||||
cp --no-preserve=mode,ownership -R ${src} workaround-conda
|
|
||||||
pushd workaround-conda
|
|
||||||
tar cf $out/src.tar .
|
|
||||||
popd
|
|
||||||
rm -rf workaround-conda
|
|
||||||
|
|
||||||
cat << EOF > $out/fake-conda/meta.yaml
|
|
||||||
package:
|
|
||||||
name: llvmlite-artiq
|
|
||||||
version: ${version}
|
|
||||||
|
|
||||||
source:
|
|
||||||
url: ../src.tar
|
|
||||||
|
|
||||||
# Again, we don't specify build dependencies since the conda garbage mistakenly thinks
|
|
||||||
# that they are not there if they have been installed from files.
|
|
||||||
requirements:
|
|
||||||
run:
|
|
||||||
- python<3.8
|
|
||||||
- ncurses [linux]
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat << EOF > $out/fake-conda/build.sh
|
|
||||||
#!/bin/bash
|
|
||||||
set -e
|
|
||||||
|
|
||||||
export LD_LIBRARY_PATH=/lib
|
|
||||||
python setup.py install \
|
|
||||||
--prefix=\$PREFIX \
|
|
||||||
--single-version-externally-managed \
|
|
||||||
--record=record.txt \
|
|
||||||
--no-compile
|
|
||||||
|
|
||||||
EOF
|
|
||||||
chmod 755 $out/fake-conda/build.sh
|
|
||||||
'';
|
|
||||||
in
|
|
||||||
pkgs.stdenv.mkDerivation {
|
|
||||||
name = "conda-llvmlite-artiq";
|
|
||||||
src = fake-src;
|
|
||||||
buildCommand =
|
|
||||||
''
|
|
||||||
HOME=`pwd`
|
|
||||||
mkdir $out
|
|
||||||
cat << EOF > conda-commands.sh
|
|
||||||
set -e
|
|
||||||
|
|
||||||
conda create --prefix ./conda_tmp ${conda-llvm-or1k}/*/*.tar.bz2
|
|
||||||
conda init
|
|
||||||
source .bashrc
|
|
||||||
conda activate ./conda_tmp
|
|
||||||
|
|
||||||
conda build --no-anaconda-upload --no-test --output-folder $out $src/fake-conda
|
|
||||||
EOF
|
|
||||||
${condaBuilderEnv}/bin/conda-builder-env conda-commands.sh
|
|
||||||
|
|
||||||
mkdir -p $out/nix-support
|
|
||||||
echo file conda $out/*/*.tar.bz2 >> $out/nix-support/hydra-build-products
|
|
||||||
'';
|
|
||||||
}
|
|
@ -1,163 +0,0 @@
|
|||||||
{ pkgs ? import ./pkgs/nixpkgs.nix { inherit (import <nixpkgs> {}) fetchgit; } {}}:
|
|
||||||
with pkgs;
|
|
||||||
let
|
|
||||||
artiq6 = pkgs.lib.strings.versionAtLeast mainPackages.artiq.version "6.0";
|
|
||||||
pythonDeps = import ./pkgs/python-deps.nix { inherit (pkgs) lib fetchgit fetchFromGitHub python3Packages; misoc-new = artiq6; };
|
|
||||||
|
|
||||||
boards = [
|
|
||||||
{ target = "kasli"; variant = "tester"; }
|
|
||||||
{ target = "kc705"; variant = "nist_clock"; }
|
|
||||||
];
|
|
||||||
boardPackages = pkgs.lib.lists.foldr (board: start:
|
|
||||||
let
|
|
||||||
boardBinaries = import ./artiq-board.nix { inherit pkgs; } {
|
|
||||||
target = board.target;
|
|
||||||
variant = board.variant;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
start // {
|
|
||||||
"artiq-board-${board.target}-${board.variant}" = boardBinaries;
|
|
||||||
}) {} boards;
|
|
||||||
|
|
||||||
mainPackages = rec {
|
|
||||||
inherit (pythonDeps) sipyco asyncserial pythonparser pyqtgraph-qt5 artiq-netboot misoc migen microscope jesd204b migen-axi lit outputcheck qasync;
|
|
||||||
binutils-or1k = callPackage ./pkgs/binutils.nix { platform = "or1k"; target = "or1k-linux"; };
|
|
||||||
binutils-arm = callPackage ./pkgs/binutils.nix { platform = "arm"; target = "armv7-unknown-linux-gnueabihf"; };
|
|
||||||
llvm-or1k = callPackage ./pkgs/llvm-or1k.nix {};
|
|
||||||
rustc = callPackage ./pkgs/rust/rustc-with-crates.nix
|
|
||||||
((lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) {
|
|
||||||
stdenv = overrideCC stdenv gcc6; # with gcc-7: undefined reference to `__divmoddi4'
|
|
||||||
}) //
|
|
||||||
{ inherit llvm-or1k; });
|
|
||||||
cargo = callPackage ./pkgs/rust/cargo.nix { inherit rustc; };
|
|
||||||
cargo-vendor = callPackage ./pkgs/rust/cargo-vendor.nix {};
|
|
||||||
llvmlite-artiq = callPackage ./pkgs/llvmlite-artiq.nix { inherit llvm-or1k; };
|
|
||||||
libartiq-support = callPackage ./pkgs/libartiq-support.nix { inherit rustc; };
|
|
||||||
artiq = callPackage ./pkgs/artiq.nix { inherit pythonDeps binutils-or1k binutils-arm llvm-or1k llvmlite-artiq libartiq-support lit outputcheck; };
|
|
||||||
artiq-env = (pkgs.python3.withPackages(ps: [ artiq ])).overrideAttrs (oldAttrs: { name = "${pkgs.python3.name}-artiq-env-${artiq.version}"; });
|
|
||||||
openocd = callPackage ./pkgs/openocd.nix {};
|
|
||||||
};
|
|
||||||
|
|
||||||
condaNoarch = {
|
|
||||||
conda-pythonparser = import ./conda/build.nix { inherit pkgs; } {
|
|
||||||
pname = "conda-pythonparser";
|
|
||||||
inherit (pythonDeps.pythonparser) version;
|
|
||||||
src = import ./conda/fake-source.nix { inherit pkgs; } {
|
|
||||||
name = "pythonparser";
|
|
||||||
inherit (pythonDeps.pythonparser) version src;
|
|
||||||
extraSrcCommands = "patch -p1 < ${./pkgs/pythonparserver.patch}";
|
|
||||||
dependencies = ["regex"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
conda-sipyco = import ./conda/build.nix { inherit pkgs; } {
|
|
||||||
pname = "conda-sipyco";
|
|
||||||
inherit (pythonDeps.sipyco) version;
|
|
||||||
src = import ./conda/fake-source.nix { inherit pkgs; } {
|
|
||||||
name = "sipyco";
|
|
||||||
inherit (pythonDeps.sipyco) version src;
|
|
||||||
dependencies = ["numpy"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
conda-quamash = import ./conda/build.nix { inherit pkgs; } {
|
|
||||||
pname = "conda-quamash";
|
|
||||||
inherit (pkgs.python3Packages.quamash) version;
|
|
||||||
src = import ./conda/fake-source.nix { inherit pkgs; } {
|
|
||||||
name = "quamash";
|
|
||||||
inherit (pkgs.python3Packages.quamash) version src;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
conda-qasync = import ./conda/build.nix { inherit pkgs; } {
|
|
||||||
pname = "conda-qasync";
|
|
||||||
inherit (pythonDeps.qasync) version;
|
|
||||||
src = import ./conda/fake-source.nix { inherit pkgs; } {
|
|
||||||
name = "qasync";
|
|
||||||
inherit (pythonDeps.qasync) version src;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
conda-bscan-spi-bitstreams = import ./conda/bscan-spi-bitstreams.nix {
|
|
||||||
inherit pkgs;
|
|
||||||
inherit (mainPackages.openocd) bscan_spi_bitstreams;
|
|
||||||
};
|
|
||||||
conda-artiq = import ./conda/artiq.nix { inherit pkgs; };
|
|
||||||
conda-asyncserial = import ./conda/build.nix { inherit pkgs; } {
|
|
||||||
pname = "conda-asyncserial";
|
|
||||||
inherit (pythonDeps.asyncserial) version;
|
|
||||||
src = import ./conda/fake-source.nix { inherit pkgs; } {
|
|
||||||
name = "asyncserial";
|
|
||||||
inherit (pythonDeps.asyncserial) version src;
|
|
||||||
dependencies = ["pyserial"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
condaLinux = rec {
|
|
||||||
conda-binutils-or1k = import ./conda/binutils.nix {
|
|
||||||
inherit pkgs;
|
|
||||||
inherit (mainPackages.binutils-or1k) version src;
|
|
||||||
target = "or1k-linux";
|
|
||||||
};
|
|
||||||
conda-binutils-arm = import ./conda/binutils.nix {
|
|
||||||
inherit pkgs;
|
|
||||||
inherit (mainPackages.binutils-arm) version src;
|
|
||||||
target = "armv7-unknown-linux-gnueabihf";
|
|
||||||
};
|
|
||||||
conda-llvm-or1k = import ./conda/llvm-or1k.nix {
|
|
||||||
inherit pkgs;
|
|
||||||
inherit (mainPackages.llvm-or1k) version;
|
|
||||||
src = mainPackages.llvm-or1k.llvm-src;
|
|
||||||
};
|
|
||||||
conda-llvmlite-artiq = import ./conda/llvmlite-artiq.nix {
|
|
||||||
inherit pkgs conda-llvm-or1k;
|
|
||||||
inherit (mainPackages.llvmlite-artiq) version src;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
condaWindowsLegacy = {
|
|
||||||
conda-windows-binutils-or1k = import ./conda-windows/redistribute.nix {
|
|
||||||
inherit pkgs;
|
|
||||||
name = "binutils-or1k";
|
|
||||||
filename = "binutils-or1k-linux-2.27-h93a10e1_6.tar.bz2";
|
|
||||||
baseurl = "https://anaconda.org/m-labs/binutils-or1k-linux/2.27/download/win-64/";
|
|
||||||
sha256 = "0gbks36hfsx3893mihj0bdmg5vwccrq5fw8xp9b9xb8p5pr8qhzx";
|
|
||||||
};
|
|
||||||
conda-windows-llvm-or1k = import ./conda-windows/redistribute.nix {
|
|
||||||
inherit pkgs;
|
|
||||||
name = "llvm-or1k";
|
|
||||||
filename = "llvm-or1k-6.0.0-25.tar.bz2";
|
|
||||||
baseurl = "https://anaconda.org/m-labs/llvm-or1k/6.0.0/download/win-64/";
|
|
||||||
sha256 = "06mnrg79rn9ni0d5z0x3jzb300nhqhbc2h9qbq5m50x3sgm8km63";
|
|
||||||
};
|
|
||||||
conda-windows-llvmlite-artiq = import ./conda-windows/redistribute.nix {
|
|
||||||
inherit pkgs;
|
|
||||||
name = "llvmlite-artiq";
|
|
||||||
filename = "llvmlite-artiq-0.23.0.dev-py35_5.tar.bz2";
|
|
||||||
baseurl = "https://anaconda.org/m-labs/llvmlite-artiq/0.23.0.dev/download/win-64/";
|
|
||||||
sha256 = "10w24w5ljvan06pbvwqj4pzal072jnyynmwm42dn06pq88ryz9wj";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
condaWindowsExperimental = rec {
|
|
||||||
conda-windows-binutils-or1k = import ./conda-windows/binutils.nix {
|
|
||||||
inherit pkgs;
|
|
||||||
inherit (mainPackages.binutils-or1k) version src;
|
|
||||||
target = "or1k-linux";
|
|
||||||
};
|
|
||||||
conda-windows-binutils-arm = import ./conda-windows/binutils.nix {
|
|
||||||
inherit pkgs;
|
|
||||||
inherit (mainPackages.binutils-or1k) version src;
|
|
||||||
target = "armv7-unknown-linux-gnueabihf";
|
|
||||||
};
|
|
||||||
conda-windows-llvm-or1k = import ./conda-windows/llvm-or1k.nix {
|
|
||||||
inherit pkgs;
|
|
||||||
inherit (mainPackages.llvm-or1k) version;
|
|
||||||
src = mainPackages.llvm-or1k.llvm-src;
|
|
||||||
};
|
|
||||||
conda-windows-llvmlite-artiq = import ./conda-windows/llvmlite-artiq.nix {
|
|
||||||
inherit pkgs conda-windows-llvm-or1k;
|
|
||||||
inherit (mainPackages.llvmlite-artiq) version src;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
condaWindows = if artiq6 then condaWindowsExperimental else condaWindowsLegacy;
|
|
||||||
in
|
|
||||||
boardPackages // mainPackages // condaNoarch // condaLinux // condaWindows
|
|
@ -1,22 +0,0 @@
|
|||||||
{ stdenv, git, fetchgit }:
|
|
||||||
let
|
|
||||||
artiq-version = stdenv.mkDerivation {
|
|
||||||
name = "artiq-version";
|
|
||||||
src = import ./artiq-src.nix { inherit fetchgit; };
|
|
||||||
# keep in sync with ../../artiq-fast.nix
|
|
||||||
buildPhase = ''
|
|
||||||
REV=`${git}/bin/git rev-parse HEAD`
|
|
||||||
MAJOR_VERSION=`cat MAJOR_VERSION`
|
|
||||||
if [ -e BETA ]; then
|
|
||||||
SUFFIX=".beta"
|
|
||||||
else
|
|
||||||
SUFFIX=""
|
|
||||||
fi
|
|
||||||
COMMIT_COUNT=`${git}/bin/git rev-list --count HEAD`
|
|
||||||
'';
|
|
||||||
installPhase = ''
|
|
||||||
echo -n $MAJOR_VERSION.$COMMIT_COUNT.`cut -c1-8 <<< $REV`$SUFFIX > $out
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
in
|
|
||||||
builtins.readFile artiq-version
|
|
@ -1,45 +0,0 @@
|
|||||||
{ stdenv, lib, pythonDeps, fetchgit, git, python3Packages, qt5, binutils-or1k, binutils-arm, llvm-or1k, llvmlite-artiq, libartiq-support, lit, outputcheck }:
|
|
||||||
|
|
||||||
python3Packages.buildPythonPackage rec {
|
|
||||||
pname = "artiq";
|
|
||||||
version = import ./artiq-version.nix { inherit stdenv fetchgit git; };
|
|
||||||
src = import ./artiq-src.nix { inherit fetchgit; };
|
|
||||||
|
|
||||||
preBuild = "export VERSIONEER_OVERRIDE=${version}";
|
|
||||||
|
|
||||||
nativeBuildInputs = [ qt5.wrapQtAppsHook ];
|
|
||||||
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 ])
|
|
||||||
++ [(if (lib.strings.versionAtLeast version "6.0") then pythonDeps.qasync else python3Packages.quamash)];
|
|
||||||
|
|
||||||
dontWrapQtApps = true;
|
|
||||||
postFixup = ''
|
|
||||||
wrapQtApp "$out/bin/artiq_dashboard"
|
|
||||||
wrapQtApp "$out/bin/artiq_browser"
|
|
||||||
wrapQtApp "$out/bin/artiq_session"
|
|
||||||
'';
|
|
||||||
|
|
||||||
# Modifies PATH to pass the wrapped python environment (i.e. python3.withPackages(...) to subprocesses.
|
|
||||||
# Allows subprocesses using python to find all packages you have installed
|
|
||||||
makeWrapperArgs = [ ''--run 'if [ ! -z "$NIX_PYTHONPREFIX" ]; then export PATH=$NIX_PYTHONPREFIX/bin:$PATH;fi' '' ];
|
|
||||||
|
|
||||||
checkInputs = [ binutils-or1k outputcheck ];
|
|
||||||
checkPhase =
|
|
||||||
''
|
|
||||||
python -m unittest discover -v artiq.test
|
|
||||||
|
|
||||||
TESTDIR=`mktemp -d`
|
|
||||||
cp --no-preserve=mode,ownership -R ${src}/artiq/test/lit $TESTDIR
|
|
||||||
LIBARTIQ_SUPPORT=${libartiq-support}/libartiq_support.so ${lit}/bin/lit -v $TESTDIR/lit
|
|
||||||
'';
|
|
||||||
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "A leading-edge control system for quantum information experiments";
|
|
||||||
homepage = https://m-labs/artiq;
|
|
||||||
license = licenses.lgpl3;
|
|
||||||
maintainers = [ maintainers.sb0 ];
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
{ fetchgit }:
|
|
||||||
import (fetchgit {
|
|
||||||
url = "https://github.com/nixos/nixpkgs.git";
|
|
||||||
rev = "1c7f02b0b9f115ccbc122ce39ae99debc1af857a";
|
|
||||||
sha256 = "14sichs3hyg4ybcacvzglw97lg747y1ls5lsazv0n5yxv5w06l3d";
|
|
||||||
})
|
|
@ -1,308 +0,0 @@
|
|||||||
{ lib, fetchgit, fetchFromGitHub, python3Packages, misoc-new }:
|
|
||||||
|
|
||||||
rec {
|
|
||||||
# User dependencies
|
|
||||||
sipyco = python3Packages.buildPythonPackage rec {
|
|
||||||
pname = "sipyco";
|
|
||||||
version = "1.2";
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "m-labs";
|
|
||||||
repo = "sipyco";
|
|
||||||
rev = "v${version}";
|
|
||||||
sha256 = "02x2s66x9bbzj82d823vjg2i73w7iqwvkrjbbyrsav6ccj7f90sj";
|
|
||||||
};
|
|
||||||
propagatedBuildInputs = with python3Packages; [ numpy ];
|
|
||||||
};
|
|
||||||
|
|
||||||
asyncserial = python3Packages.buildPythonPackage rec {
|
|
||||||
pname = "asyncserial";
|
|
||||||
version = "0.1";
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "m-labs";
|
|
||||||
repo = "asyncserial";
|
|
||||||
rev = "d95bc1d6c791b0e9785935d2f62f628eb5cdf98d";
|
|
||||||
sha256 = "0yzkka9jk3612v8gx748x6ziwykq5lr7zmr9wzkcls0v2yilqx9k";
|
|
||||||
};
|
|
||||||
propagatedBuildInputs = with python3Packages; [ pyserial ];
|
|
||||||
};
|
|
||||||
|
|
||||||
pythonparser = python3Packages.buildPythonPackage rec {
|
|
||||||
pname = "pythonparser";
|
|
||||||
version = "1.3";
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "m-labs";
|
|
||||||
repo = "pythonparser";
|
|
||||||
rev = "5b391fe86f43bb9f4f96c5bc0532e2a112db2936";
|
|
||||||
sha256 = "1gw1fk4y2l6bwq0fg2a9dfc1rvq8cv492dyil96amjdhsxvnx35b";
|
|
||||||
};
|
|
||||||
patches = [ ./pythonparserver.patch ];
|
|
||||||
propagatedBuildInputs = with python3Packages; [ regex ];
|
|
||||||
};
|
|
||||||
|
|
||||||
pyqtgraph-qt5 = python3Packages.buildPythonPackage rec {
|
|
||||||
pname = "pyqtgraph_qt5";
|
|
||||||
version = "0.11.0";
|
|
||||||
doCheck = false;
|
|
||||||
pythonImportsCheck = [ "pyqtgraph" ];
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "pyqtgraph";
|
|
||||||
repo = "pyqtgraph";
|
|
||||||
rev = "pyqtgraph-${version}";
|
|
||||||
sha256 = "03fvpkqdn80ni51msvyivmghw41qk4vplwdqndkvzzzlppimdjbn";
|
|
||||||
};
|
|
||||||
propagatedBuildInputs = with python3Packages; [ scipy numpy pyqt5 pyopengl ];
|
|
||||||
};
|
|
||||||
|
|
||||||
qasync = python3Packages.buildPythonPackage rec {
|
|
||||||
pname = "qasync";
|
|
||||||
version = "0.10.0";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "CabbageDevelopment";
|
|
||||||
repo = "qasync";
|
|
||||||
rev = "v${version}";
|
|
||||||
sha256 = "1zga8s6dr7gk6awmxkh4pf25gbg8n6dv1j4b0by7y0fhi949qakq";
|
|
||||||
};
|
|
||||||
|
|
||||||
propagatedBuildInputs = [ python3Packages.pyqt5 ];
|
|
||||||
|
|
||||||
checkInputs = [ python3Packages.pytest ];
|
|
||||||
checkPhase = ''
|
|
||||||
pytest -k 'test_qthreadexec.py' # the others cause the test execution to be aborted, I think because of asyncio
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
# Development/firmware dependencies
|
|
||||||
artiq-netboot = python3Packages.buildPythonPackage rec {
|
|
||||||
pname = "artiq-netboot";
|
|
||||||
version = "unstable-2020-10-15";
|
|
||||||
|
|
||||||
src = fetchgit {
|
|
||||||
url = "https://git.m-labs.hk/m-labs/artiq-netboot.git";
|
|
||||||
rev = "04f69eb07df73abe4b89fde2c24084f7664f2104";
|
|
||||||
sha256 = "0ql4fr8m8gpb2yql8aqsdqsssxb8zqd6l65kl1f6s9845zy7shs9";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
misoc = python3Packages.buildPythonPackage {
|
|
||||||
pname = "misoc";
|
|
||||||
version = if misoc-new then "unstable-2021-02-15" else "unstable-2020-05-29";
|
|
||||||
|
|
||||||
src = if misoc-new
|
|
||||||
then (fetchFromGitHub {
|
|
||||||
owner = "m-labs";
|
|
||||||
repo = "misoc";
|
|
||||||
rev = "d84551418042cea0891ea743442e20684b51e77a";
|
|
||||||
sha256 = "1id5qjr9dl4r3vi6jdn7dfpnr2wb08nrm3nfscn18clbbdxybyjn";
|
|
||||||
fetchSubmodules = true;
|
|
||||||
})
|
|
||||||
else (fetchFromGitHub {
|
|
||||||
owner = "m-labs";
|
|
||||||
repo = "misoc";
|
|
||||||
rev = "7e5fe8d38835175202dad2c51d37b20b76fd9e16";
|
|
||||||
sha256 = "0i8bppz7x2s45lx9n49c0r87pqps09z35yzc17amvx21qsplahxn";
|
|
||||||
fetchSubmodules = true;
|
|
||||||
});
|
|
||||||
|
|
||||||
# TODO: fix misoc bitrot and re-enable tests
|
|
||||||
doCheck = false;
|
|
||||||
|
|
||||||
propagatedBuildInputs = with python3Packages; [ pyserial jinja2 numpy asyncserial migen ];
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "A high performance and small footprint system-on-chip based on Migen";
|
|
||||||
homepage = "https://m-labs.hk/migen";
|
|
||||||
license = licenses.bsd2;
|
|
||||||
platforms = platforms.unix;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
migen = python3Packages.buildPythonPackage rec {
|
|
||||||
pname = "migen";
|
|
||||||
version = "unstable-2021-02-08";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "m-labs";
|
|
||||||
repo = "migen";
|
|
||||||
rev = "7014bdccc11270764186e6a4441fb58238c612aa";
|
|
||||||
sha256 = "12mhmcdf0jqv33ald9x9zb1qi26sw4ywdfgg5saqvmx0pmbmvynk";
|
|
||||||
};
|
|
||||||
|
|
||||||
propagatedBuildInputs = with python3Packages; [ colorama ];
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "A Python toolbox for building complex digital hardware";
|
|
||||||
homepage = "https://m-labs.hk/migen";
|
|
||||||
license = licenses.bsd2;
|
|
||||||
platforms = platforms.unix;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
microscope = python3Packages.buildPythonPackage rec {
|
|
||||||
pname = "microscope";
|
|
||||||
version = "unstable-2019-05-17";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "m-labs";
|
|
||||||
repo = "microscope";
|
|
||||||
rev = "bcbc5346c71ad8f7a1a0b7771a9d126b18fdf558";
|
|
||||||
sha256 = "1hslm2nn2z1bl84ya4fsab3pvcdmbziwn7zkai0cm3bv525fjxxd";
|
|
||||||
};
|
|
||||||
|
|
||||||
propagatedBuildInputs = with python3Packages; [ pyserial prettytable msgpack migen ];
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "Finding the bacteria in rotting FPGA designs";
|
|
||||||
homepage = "https://m-labs.hk/migen";
|
|
||||||
license = licenses.bsd2;
|
|
||||||
platforms = platforms.unix;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
jesd204b = python3Packages.buildPythonPackage rec {
|
|
||||||
pname = "jesd204b";
|
|
||||||
version = "unstable-2020-12-18";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "m-labs";
|
|
||||||
repo = "jesd204b";
|
|
||||||
rev = "23bd08f5ee95eb42502f9fbe1c2a45e8c083eab9";
|
|
||||||
sha256 = "0x2mh5fv4q0b1f8pjc2kcyjqbfgiyp1hlvbfgk8dbsraj50i566h";
|
|
||||||
};
|
|
||||||
|
|
||||||
propagatedBuildInputs = with python3Packages; [ migen misoc ];
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "JESD204B core for Migen/MiSoC";
|
|
||||||
homepage = "https://m-labs.hk/migen";
|
|
||||||
license = licenses.bsd2;
|
|
||||||
platforms = platforms.unix;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
fastnumbers = python3Packages.buildPythonPackage rec {
|
|
||||||
pname = "fastnumbers";
|
|
||||||
version = "2.2.1";
|
|
||||||
|
|
||||||
src = python3Packages.fetchPypi {
|
|
||||||
inherit pname version;
|
|
||||||
sha256 = "0j15i54p7nri6hkzn1wal9pxri4pgql01wgjccig6ar0v5jjbvsy";
|
|
||||||
};
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "Super-fast and clean conversions to numbers";
|
|
||||||
homepage = "https://github.com/SethMMorton/fastnumbers";
|
|
||||||
license = licenses.mit;
|
|
||||||
platforms = platforms.unix;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
ramda = python3Packages.buildPythonPackage {
|
|
||||||
pname = "ramda";
|
|
||||||
version = "unstable-2019-02-01";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "peteut";
|
|
||||||
repo = "ramda.py";
|
|
||||||
rev = "bd58f8e69d0e9a713d9c1f286a1ac5e5603956b1";
|
|
||||||
sha256 = "0qzd5yp9lbaham8p1wiymdjapzbqsli7lvngv24c3z4ybd9jlq9g";
|
|
||||||
};
|
|
||||||
|
|
||||||
nativeBuildInputs = [ python3Packages.pbr ];
|
|
||||||
propagatedBuildInputs = [ python3Packages.future fastnumbers ];
|
|
||||||
|
|
||||||
checkInputs = [ python3Packages.pytest python3Packages.pytest-flake8 ];
|
|
||||||
checkPhase = "pytest";
|
|
||||||
|
|
||||||
preBuild = ''
|
|
||||||
export PBR_VERSION=0.0.1
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "Ramda, ported to Python";
|
|
||||||
homepage = "https://github.com/peteut/ramda.py";
|
|
||||||
license = licenses.mit;
|
|
||||||
platforms = platforms.unix;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
migen-axi = python3Packages.buildPythonPackage {
|
|
||||||
pname = "migen-axi";
|
|
||||||
version = "unstable-2021-01-22";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "peteut";
|
|
||||||
repo = "migen-axi";
|
|
||||||
rev = "9439ee900358598cecc682db327aa30e506172b5";
|
|
||||||
sha256 = "1z5s8ifq7fbpqi6sx2i87rmz63kbgh9ck94fs2qf21ixhxi46nm3";
|
|
||||||
};
|
|
||||||
|
|
||||||
nativeBuildInputs = [ python3Packages.pbr ];
|
|
||||||
propagatedBuildInputs = [ python3Packages.click python3Packages.numpy python3Packages.toolz python3Packages.jinja2 ramda migen misoc ];
|
|
||||||
|
|
||||||
postPatch = ''
|
|
||||||
substituteInPlace requirements.txt \
|
|
||||||
--replace "jinja2==2.10.3" "jinja2"
|
|
||||||
substituteInPlace requirements.txt \
|
|
||||||
--replace "future==0.18.2" "future"
|
|
||||||
substituteInPlace requirements.txt \
|
|
||||||
--replace "ramda==0.5.5" "ramda"
|
|
||||||
substituteInPlace requirements.txt \
|
|
||||||
--replace "colorama==0.4.3" "colorama"
|
|
||||||
'';
|
|
||||||
|
|
||||||
|
|
||||||
checkInputs = [ python3Packages.pytest python3Packages.pytest-flake8 ];
|
|
||||||
checkPhase = "pytest";
|
|
||||||
|
|
||||||
preBuild = ''
|
|
||||||
export PBR_VERSION=0.0.1
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "AXI support for Migen/MiSoC";
|
|
||||||
homepage = "https://github.com/peteut/migen-axi";
|
|
||||||
license = licenses.mit;
|
|
||||||
platforms = platforms.unix;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# not using the nixpkgs version because it is Python 2 and an "application"
|
|
||||||
lit = python3Packages.buildPythonPackage rec {
|
|
||||||
pname = "lit";
|
|
||||||
version = "0.7.1";
|
|
||||||
|
|
||||||
src = python3Packages.fetchPypi {
|
|
||||||
inherit pname version;
|
|
||||||
sha256 = "ecef2833aef7f411cb923dac109c7c9dcc7dbe7cafce0650c1e8d19c243d955f";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Non-standard test suite. Needs custom checkPhase.
|
|
||||||
doCheck = false;
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "Portable tool for executing LLVM and Clang style test suites";
|
|
||||||
homepage = http://llvm.org/docs/CommandGuide/lit.html;
|
|
||||||
license = licenses.ncsa;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
outputcheck = python3Packages.buildPythonApplication rec {
|
|
||||||
pname = "outputcheck";
|
|
||||||
version = "0.4.2";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "stp";
|
|
||||||
repo = "OutputCheck";
|
|
||||||
rev = "e0f533d3c5af2949349856c711bf4bca50022b48";
|
|
||||||
sha256 = "1y27vz6jq6sywas07kz3v01sqjd0sga9yv9w2cksqac3v7wmf2a0";
|
|
||||||
};
|
|
||||||
prePatch = "echo ${version} > RELEASE-VERSION";
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "A tool for checking tool output inspired by LLVM's FileCheck";
|
|
||||||
homepage = "https://github.com/stp/OutputCheck";
|
|
||||||
license = licenses.bsd3;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,693 +0,0 @@
|
|||||||
# Generated by carnix 0.10.0: carnix generate-nix --src .
|
|
||||||
{ lib, buildPlatform, buildRustCrate, buildRustCrateHelpers, cratesIO, fetchgit }:
|
|
||||||
with buildRustCrateHelpers;
|
|
||||||
let inherit (lib.lists) fold;
|
|
||||||
inherit (lib.attrsets) recursiveUpdate;
|
|
||||||
in
|
|
||||||
rec {
|
|
||||||
crates = cratesIO // rec {
|
|
||||||
# cargo-vendor-0.1.23
|
|
||||||
|
|
||||||
crates.cargo_vendor."0.1.23" = deps: { features?(features_.cargo_vendor."0.1.23" deps {}) }: buildRustCrate {
|
|
||||||
crateName = "cargo-vendor";
|
|
||||||
version = "0.1.23";
|
|
||||||
description = "A Cargo subcommand to vendor all crates.io dependencies onto the local\nfilesystem.\n";
|
|
||||||
authors = [ "Alex Crichton <alex@alexcrichton.com>" ];
|
|
||||||
edition = "2018";
|
|
||||||
src = exclude [ ".git" "target" ] ./.;
|
|
||||||
dependencies = mapFeatures features ([
|
|
||||||
(cratesIO.crates."cargo"."${deps."cargo_vendor"."0.1.23"."cargo"}" deps)
|
|
||||||
(cratesIO.crates."docopt"."${deps."cargo_vendor"."0.1.23"."docopt"}" deps)
|
|
||||||
(cratesIO.crates."env_logger"."${deps."cargo_vendor"."0.1.23"."env_logger"}" deps)
|
|
||||||
(cratesIO.crates."failure"."${deps."cargo_vendor"."0.1.23"."failure"}" deps)
|
|
||||||
(cratesIO.crates."serde"."${deps."cargo_vendor"."0.1.23"."serde"}" deps)
|
|
||||||
(cratesIO.crates."serde_json"."${deps."cargo_vendor"."0.1.23"."serde_json"}" deps)
|
|
||||||
(cratesIO.crates."toml"."${deps."cargo_vendor"."0.1.23"."toml"}" deps)
|
|
||||||
]
|
|
||||||
++ (if features.cargo_vendor."0.1.23".openssl or false then [ (cratesIO.crates.openssl."${deps."cargo_vendor"."0.1.23".openssl}" deps) ] else []));
|
|
||||||
features = mkFeatures (features."cargo_vendor"."0.1.23" or {});
|
|
||||||
};
|
|
||||||
features_.cargo_vendor."0.1.23" = deps: f: updateFeatures f (rec {
|
|
||||||
cargo."${deps.cargo_vendor."0.1.23".cargo}".default = true;
|
|
||||||
cargo_vendor."0.1.23".default = (f.cargo_vendor."0.1.23".default or true);
|
|
||||||
docopt."${deps.cargo_vendor."0.1.23".docopt}".default = true;
|
|
||||||
env_logger."${deps.cargo_vendor."0.1.23".env_logger}".default = true;
|
|
||||||
failure."${deps.cargo_vendor."0.1.23".failure}".default = true;
|
|
||||||
openssl = fold recursiveUpdate {} [
|
|
||||||
{ "${deps.cargo_vendor."0.1.23".openssl}"."vendored" =
|
|
||||||
(f.openssl."${deps.cargo_vendor."0.1.23".openssl}"."vendored" or false) ||
|
|
||||||
(cargo_vendor."0.1.23"."vendored-openssl" or false) ||
|
|
||||||
(f."cargo_vendor"."0.1.23"."vendored-openssl" or false); }
|
|
||||||
{ "${deps.cargo_vendor."0.1.23".openssl}".default = true; }
|
|
||||||
];
|
|
||||||
serde = fold recursiveUpdate {} [
|
|
||||||
{ "${deps.cargo_vendor."0.1.23".serde}"."derive" = true; }
|
|
||||||
{ "${deps.cargo_vendor."0.1.23".serde}".default = true; }
|
|
||||||
];
|
|
||||||
serde_json."${deps.cargo_vendor."0.1.23".serde_json}".default = true;
|
|
||||||
toml."${deps.cargo_vendor."0.1.23".toml}".default = true;
|
|
||||||
}) [
|
|
||||||
(cratesIO.features_.cargo."${deps."cargo_vendor"."0.1.23"."cargo"}" deps)
|
|
||||||
(cratesIO.features_.docopt."${deps."cargo_vendor"."0.1.23"."docopt"}" deps)
|
|
||||||
(cratesIO.features_.env_logger."${deps."cargo_vendor"."0.1.23"."env_logger"}" deps)
|
|
||||||
(cratesIO.features_.failure."${deps."cargo_vendor"."0.1.23"."failure"}" deps)
|
|
||||||
(cratesIO.features_.openssl."${deps."cargo_vendor"."0.1.23"."openssl"}" deps)
|
|
||||||
(cratesIO.features_.serde."${deps."cargo_vendor"."0.1.23"."serde"}" deps)
|
|
||||||
(cratesIO.features_.serde_json."${deps."cargo_vendor"."0.1.23"."serde_json"}" deps)
|
|
||||||
(cratesIO.features_.toml."${deps."cargo_vendor"."0.1.23"."toml"}" deps)
|
|
||||||
];
|
|
||||||
|
|
||||||
|
|
||||||
# end
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
cargo_vendor = crates.crates.cargo_vendor."0.1.23" deps;
|
|
||||||
__all = [ (cargo_vendor {}) ];
|
|
||||||
deps.adler32."1.0.3" = {};
|
|
||||||
deps.aho_corasick."0.7.3" = {
|
|
||||||
memchr = "2.2.0";
|
|
||||||
};
|
|
||||||
deps.ansi_term."0.11.0" = {
|
|
||||||
winapi = "0.3.7";
|
|
||||||
};
|
|
||||||
deps.atty."0.2.11" = {
|
|
||||||
termion = "1.5.1";
|
|
||||||
libc = "0.2.51";
|
|
||||||
winapi = "0.3.7";
|
|
||||||
};
|
|
||||||
deps.autocfg."0.1.2" = {};
|
|
||||||
deps.backtrace."0.3.15" = {
|
|
||||||
cfg_if = "0.1.7";
|
|
||||||
rustc_demangle = "0.1.14";
|
|
||||||
autocfg = "0.1.2";
|
|
||||||
backtrace_sys = "0.1.28";
|
|
||||||
libc = "0.2.51";
|
|
||||||
winapi = "0.3.7";
|
|
||||||
};
|
|
||||||
deps.backtrace_sys."0.1.28" = {
|
|
||||||
libc = "0.2.51";
|
|
||||||
cc = "1.0.35";
|
|
||||||
};
|
|
||||||
deps.bitflags."1.0.4" = {};
|
|
||||||
deps.bstr."0.1.2" = {
|
|
||||||
memchr = "2.2.0";
|
|
||||||
};
|
|
||||||
deps.build_const."0.2.1" = {};
|
|
||||||
deps.byteorder."1.3.1" = {};
|
|
||||||
deps.bytes."0.4.12" = {
|
|
||||||
byteorder = "1.3.1";
|
|
||||||
iovec = "0.1.2";
|
|
||||||
};
|
|
||||||
deps.bytesize."1.0.0" = {};
|
|
||||||
deps.cargo."0.35.0" = {
|
|
||||||
atty = "0.2.11";
|
|
||||||
byteorder = "1.3.1";
|
|
||||||
bytesize = "1.0.0";
|
|
||||||
clap = "2.33.0";
|
|
||||||
crates_io = "0.23.0";
|
|
||||||
crossbeam_utils = "0.6.5";
|
|
||||||
crypto_hash = "0.3.3";
|
|
||||||
curl = "0.4.21";
|
|
||||||
curl_sys = "0.4.18";
|
|
||||||
env_logger = "0.6.1";
|
|
||||||
failure = "0.1.5";
|
|
||||||
filetime = "0.2.4";
|
|
||||||
flate2 = "1.0.7";
|
|
||||||
fs2 = "0.4.3";
|
|
||||||
git2 = "0.8.0";
|
|
||||||
git2_curl = "0.9.0";
|
|
||||||
glob = "0.2.11";
|
|
||||||
hex = "0.3.2";
|
|
||||||
home = "0.3.4";
|
|
||||||
ignore = "0.4.7";
|
|
||||||
im_rc = "12.3.4";
|
|
||||||
jobserver = "0.1.13";
|
|
||||||
lazy_static = "1.3.0";
|
|
||||||
lazycell = "1.2.1";
|
|
||||||
libc = "0.2.51";
|
|
||||||
libgit2_sys = "0.7.11";
|
|
||||||
log = "0.4.6";
|
|
||||||
num_cpus = "1.10.0";
|
|
||||||
opener = "0.3.2";
|
|
||||||
rustc_workspace_hack = "1.0.0";
|
|
||||||
rustfix = "0.4.5";
|
|
||||||
same_file = "1.0.4";
|
|
||||||
semver = "0.9.0";
|
|
||||||
serde = "1.0.90";
|
|
||||||
serde_ignored = "0.0.4";
|
|
||||||
serde_json = "1.0.39";
|
|
||||||
shell_escape = "0.1.4";
|
|
||||||
tar = "0.4.22";
|
|
||||||
tempfile = "3.0.7";
|
|
||||||
termcolor = "1.0.4";
|
|
||||||
toml = "0.4.10";
|
|
||||||
unicode_width = "0.1.5";
|
|
||||||
url = "1.7.2";
|
|
||||||
url_serde = "0.2.0";
|
|
||||||
core_foundation = "0.6.4";
|
|
||||||
fwdansi = "1.0.1";
|
|
||||||
miow = "0.3.3";
|
|
||||||
winapi = "0.3.7";
|
|
||||||
};
|
|
||||||
deps.cargo_vendor."0.1.23" = {
|
|
||||||
cargo = "0.35.0";
|
|
||||||
docopt = "1.1.0";
|
|
||||||
env_logger = "0.6.1";
|
|
||||||
failure = "0.1.5";
|
|
||||||
openssl = "0.10.20";
|
|
||||||
serde = "1.0.90";
|
|
||||||
serde_json = "1.0.39";
|
|
||||||
toml = "0.5.0";
|
|
||||||
};
|
|
||||||
deps.cc."1.0.35" = {};
|
|
||||||
deps.cfg_if."0.1.7" = {};
|
|
||||||
deps.clap."2.33.0" = {
|
|
||||||
atty = "0.2.11";
|
|
||||||
bitflags = "1.0.4";
|
|
||||||
strsim = "0.8.0";
|
|
||||||
textwrap = "0.11.0";
|
|
||||||
unicode_width = "0.1.5";
|
|
||||||
vec_map = "0.8.1";
|
|
||||||
ansi_term = "0.11.0";
|
|
||||||
};
|
|
||||||
deps.cloudabi."0.0.3" = {
|
|
||||||
bitflags = "1.0.4";
|
|
||||||
};
|
|
||||||
deps.commoncrypto."0.2.0" = {
|
|
||||||
commoncrypto_sys = "0.2.0";
|
|
||||||
};
|
|
||||||
deps.commoncrypto_sys."0.2.0" = {
|
|
||||||
libc = "0.2.51";
|
|
||||||
};
|
|
||||||
deps.core_foundation."0.6.4" = {
|
|
||||||
core_foundation_sys = "0.6.2";
|
|
||||||
libc = "0.2.51";
|
|
||||||
};
|
|
||||||
deps.core_foundation_sys."0.6.2" = {};
|
|
||||||
deps.crates_io."0.23.0" = {
|
|
||||||
curl = "0.4.21";
|
|
||||||
failure = "0.1.5";
|
|
||||||
http = "0.1.17";
|
|
||||||
serde = "1.0.90";
|
|
||||||
serde_derive = "1.0.90";
|
|
||||||
serde_json = "1.0.39";
|
|
||||||
url = "1.7.2";
|
|
||||||
};
|
|
||||||
deps.crc."1.8.1" = {
|
|
||||||
build_const = "0.2.1";
|
|
||||||
};
|
|
||||||
deps.crc32fast."1.2.0" = {
|
|
||||||
cfg_if = "0.1.7";
|
|
||||||
};
|
|
||||||
deps.crossbeam_channel."0.3.8" = {
|
|
||||||
crossbeam_utils = "0.6.5";
|
|
||||||
smallvec = "0.6.9";
|
|
||||||
};
|
|
||||||
deps.crossbeam_utils."0.6.5" = {
|
|
||||||
cfg_if = "0.1.7";
|
|
||||||
lazy_static = "1.3.0";
|
|
||||||
};
|
|
||||||
deps.crypto_hash."0.3.3" = {
|
|
||||||
hex = "0.3.2";
|
|
||||||
commoncrypto = "0.2.0";
|
|
||||||
openssl = "0.10.20";
|
|
||||||
winapi = "0.3.7";
|
|
||||||
};
|
|
||||||
deps.curl."0.4.21" = {
|
|
||||||
curl_sys = "0.4.18";
|
|
||||||
libc = "0.2.51";
|
|
||||||
socket2 = "0.3.8";
|
|
||||||
openssl_probe = "0.1.2";
|
|
||||||
openssl_sys = "0.9.43";
|
|
||||||
kernel32_sys = "0.2.2";
|
|
||||||
schannel = "0.1.15";
|
|
||||||
winapi = "0.2.8";
|
|
||||||
};
|
|
||||||
deps.curl_sys."0.4.18" = {
|
|
||||||
libc = "0.2.51";
|
|
||||||
libnghttp2_sys = "0.1.1";
|
|
||||||
libz_sys = "1.0.25";
|
|
||||||
cc = "1.0.35";
|
|
||||||
pkg_config = "0.3.14";
|
|
||||||
openssl_sys = "0.9.43";
|
|
||||||
winapi = "0.3.7";
|
|
||||||
};
|
|
||||||
deps.docopt."1.1.0" = {
|
|
||||||
lazy_static = "1.3.0";
|
|
||||||
regex = "1.1.6";
|
|
||||||
serde = "1.0.90";
|
|
||||||
strsim = "0.9.1";
|
|
||||||
};
|
|
||||||
deps.either."1.5.2" = {};
|
|
||||||
deps.env_logger."0.6.1" = {
|
|
||||||
atty = "0.2.11";
|
|
||||||
humantime = "1.2.0";
|
|
||||||
log = "0.4.6";
|
|
||||||
regex = "1.1.6";
|
|
||||||
termcolor = "1.0.4";
|
|
||||||
};
|
|
||||||
deps.failure."0.1.5" = {
|
|
||||||
backtrace = "0.3.15";
|
|
||||||
failure_derive = "0.1.5";
|
|
||||||
};
|
|
||||||
deps.failure_derive."0.1.5" = {
|
|
||||||
proc_macro2 = "0.4.27";
|
|
||||||
quote = "0.6.12";
|
|
||||||
syn = "0.15.32";
|
|
||||||
synstructure = "0.10.1";
|
|
||||||
};
|
|
||||||
deps.filetime."0.2.4" = {
|
|
||||||
cfg_if = "0.1.7";
|
|
||||||
redox_syscall = "0.1.54";
|
|
||||||
libc = "0.2.51";
|
|
||||||
};
|
|
||||||
deps.flate2."1.0.7" = {
|
|
||||||
crc32fast = "1.2.0";
|
|
||||||
libc = "0.2.51";
|
|
||||||
libz_sys = "1.0.25";
|
|
||||||
miniz_sys = "0.1.11";
|
|
||||||
miniz_oxide_c_api = "0.2.1";
|
|
||||||
};
|
|
||||||
deps.fnv."1.0.6" = {};
|
|
||||||
deps.foreign_types."0.3.2" = {
|
|
||||||
foreign_types_shared = "0.1.1";
|
|
||||||
};
|
|
||||||
deps.foreign_types_shared."0.1.1" = {};
|
|
||||||
deps.fs2."0.4.3" = {
|
|
||||||
libc = "0.2.51";
|
|
||||||
winapi = "0.3.7";
|
|
||||||
};
|
|
||||||
deps.fuchsia_cprng."0.1.1" = {};
|
|
||||||
deps.fwdansi."1.0.1" = {
|
|
||||||
memchr = "2.2.0";
|
|
||||||
termcolor = "1.0.4";
|
|
||||||
};
|
|
||||||
deps.git2."0.8.0" = {
|
|
||||||
bitflags = "1.0.4";
|
|
||||||
libc = "0.2.51";
|
|
||||||
libgit2_sys = "0.7.11";
|
|
||||||
log = "0.4.6";
|
|
||||||
url = "1.7.2";
|
|
||||||
openssl_probe = "0.1.2";
|
|
||||||
openssl_sys = "0.9.43";
|
|
||||||
};
|
|
||||||
deps.git2_curl."0.9.0" = {
|
|
||||||
curl = "0.4.21";
|
|
||||||
git2 = "0.8.0";
|
|
||||||
log = "0.4.6";
|
|
||||||
url = "1.7.2";
|
|
||||||
};
|
|
||||||
deps.glob."0.2.11" = {};
|
|
||||||
deps.globset."0.4.3" = {
|
|
||||||
aho_corasick = "0.7.3";
|
|
||||||
bstr = "0.1.2";
|
|
||||||
fnv = "1.0.6";
|
|
||||||
log = "0.4.6";
|
|
||||||
regex = "1.1.6";
|
|
||||||
};
|
|
||||||
deps.hashbrown."0.1.8" = {
|
|
||||||
byteorder = "1.3.1";
|
|
||||||
scopeguard = "0.3.3";
|
|
||||||
};
|
|
||||||
deps.hex."0.3.2" = {};
|
|
||||||
deps.home."0.3.4" = {
|
|
||||||
scopeguard = "0.3.3";
|
|
||||||
winapi = "0.3.7";
|
|
||||||
};
|
|
||||||
deps.http."0.1.17" = {
|
|
||||||
bytes = "0.4.12";
|
|
||||||
fnv = "1.0.6";
|
|
||||||
itoa = "0.4.3";
|
|
||||||
};
|
|
||||||
deps.humantime."1.2.0" = {
|
|
||||||
quick_error = "1.2.2";
|
|
||||||
};
|
|
||||||
deps.idna."0.1.5" = {
|
|
||||||
matches = "0.1.8";
|
|
||||||
unicode_bidi = "0.3.4";
|
|
||||||
unicode_normalization = "0.1.8";
|
|
||||||
};
|
|
||||||
deps.ignore."0.4.7" = {
|
|
||||||
crossbeam_channel = "0.3.8";
|
|
||||||
globset = "0.4.3";
|
|
||||||
lazy_static = "1.3.0";
|
|
||||||
log = "0.4.6";
|
|
||||||
memchr = "2.2.0";
|
|
||||||
regex = "1.1.6";
|
|
||||||
same_file = "1.0.4";
|
|
||||||
thread_local = "0.3.6";
|
|
||||||
walkdir = "2.2.7";
|
|
||||||
winapi_util = "0.1.2";
|
|
||||||
};
|
|
||||||
deps.im_rc."12.3.4" = {
|
|
||||||
sized_chunks = "0.1.3";
|
|
||||||
typenum = "1.10.0";
|
|
||||||
rustc_version = "0.2.3";
|
|
||||||
};
|
|
||||||
deps.iovec."0.1.2" = {
|
|
||||||
libc = "0.2.51";
|
|
||||||
winapi = "0.2.8";
|
|
||||||
};
|
|
||||||
deps.itertools."0.7.11" = {
|
|
||||||
either = "1.5.2";
|
|
||||||
};
|
|
||||||
deps.itoa."0.4.3" = {};
|
|
||||||
deps.jobserver."0.1.13" = {
|
|
||||||
log = "0.4.6";
|
|
||||||
libc = "0.2.51";
|
|
||||||
rand = "0.6.5";
|
|
||||||
};
|
|
||||||
deps.kernel32_sys."0.2.2" = {
|
|
||||||
winapi = "0.2.8";
|
|
||||||
winapi_build = "0.1.1";
|
|
||||||
};
|
|
||||||
deps.lazy_static."1.3.0" = {};
|
|
||||||
deps.lazycell."1.2.1" = {};
|
|
||||||
deps.libc."0.2.51" = {};
|
|
||||||
deps.libgit2_sys."0.7.11" = {
|
|
||||||
curl_sys = "0.4.18";
|
|
||||||
libc = "0.2.51";
|
|
||||||
libssh2_sys = "0.2.11";
|
|
||||||
libz_sys = "1.0.25";
|
|
||||||
cc = "1.0.35";
|
|
||||||
pkg_config = "0.3.14";
|
|
||||||
openssl_sys = "0.9.43";
|
|
||||||
};
|
|
||||||
deps.libnghttp2_sys."0.1.1" = {
|
|
||||||
libc = "0.2.51";
|
|
||||||
cc = "1.0.35";
|
|
||||||
};
|
|
||||||
deps.libssh2_sys."0.2.11" = {
|
|
||||||
libc = "0.2.51";
|
|
||||||
libz_sys = "1.0.25";
|
|
||||||
cc = "1.0.35";
|
|
||||||
pkg_config = "0.3.14";
|
|
||||||
openssl_sys = "0.9.43";
|
|
||||||
};
|
|
||||||
deps.libz_sys."1.0.25" = {
|
|
||||||
libc = "0.2.51";
|
|
||||||
cc = "1.0.35";
|
|
||||||
pkg_config = "0.3.14";
|
|
||||||
};
|
|
||||||
deps.lock_api."0.1.5" = {
|
|
||||||
scopeguard = "0.3.3";
|
|
||||||
};
|
|
||||||
deps.log."0.4.6" = {
|
|
||||||
cfg_if = "0.1.7";
|
|
||||||
};
|
|
||||||
deps.matches."0.1.8" = {};
|
|
||||||
deps.matrixmultiply."0.1.15" = {
|
|
||||||
rawpointer = "0.1.0";
|
|
||||||
};
|
|
||||||
deps.memchr."2.2.0" = {};
|
|
||||||
deps.miniz_sys."0.1.11" = {
|
|
||||||
libc = "0.2.51";
|
|
||||||
cc = "1.0.35";
|
|
||||||
};
|
|
||||||
deps.miniz_oxide."0.2.1" = {
|
|
||||||
adler32 = "1.0.3";
|
|
||||||
};
|
|
||||||
deps.miniz_oxide_c_api."0.2.1" = {
|
|
||||||
crc = "1.8.1";
|
|
||||||
libc = "0.2.51";
|
|
||||||
miniz_oxide = "0.2.1";
|
|
||||||
cc = "1.0.35";
|
|
||||||
};
|
|
||||||
deps.miow."0.3.3" = {
|
|
||||||
socket2 = "0.3.8";
|
|
||||||
winapi = "0.3.7";
|
|
||||||
};
|
|
||||||
deps.ndarray."0.12.1" = {
|
|
||||||
itertools = "0.7.11";
|
|
||||||
matrixmultiply = "0.1.15";
|
|
||||||
num_complex = "0.2.1";
|
|
||||||
num_traits = "0.2.6";
|
|
||||||
};
|
|
||||||
deps.num_complex."0.2.1" = {
|
|
||||||
num_traits = "0.2.6";
|
|
||||||
};
|
|
||||||
deps.num_traits."0.2.6" = {};
|
|
||||||
deps.num_cpus."1.10.0" = {
|
|
||||||
libc = "0.2.51";
|
|
||||||
};
|
|
||||||
deps.once_cell."0.1.8" = {
|
|
||||||
parking_lot = "0.7.1";
|
|
||||||
};
|
|
||||||
deps.opener."0.3.2" = {
|
|
||||||
failure = "0.1.5";
|
|
||||||
failure_derive = "0.1.5";
|
|
||||||
winapi = "0.3.7";
|
|
||||||
};
|
|
||||||
deps.openssl."0.10.20" = {
|
|
||||||
bitflags = "1.0.4";
|
|
||||||
cfg_if = "0.1.7";
|
|
||||||
foreign_types = "0.3.2";
|
|
||||||
lazy_static = "1.3.0";
|
|
||||||
libc = "0.2.51";
|
|
||||||
openssl_sys = "0.9.43";
|
|
||||||
};
|
|
||||||
deps.openssl_probe."0.1.2" = {};
|
|
||||||
deps.openssl_src."111.2.1+1.1.1b" = {
|
|
||||||
cc = "1.0.35";
|
|
||||||
};
|
|
||||||
deps.openssl_sys."0.9.43" = {
|
|
||||||
libc = "0.2.51";
|
|
||||||
cc = "1.0.35";
|
|
||||||
openssl_src = "111.2.1+1.1.1b";
|
|
||||||
pkg_config = "0.3.14";
|
|
||||||
rustc_version = "0.2.3";
|
|
||||||
};
|
|
||||||
deps.parking_lot."0.7.1" = {
|
|
||||||
lock_api = "0.1.5";
|
|
||||||
parking_lot_core = "0.4.0";
|
|
||||||
};
|
|
||||||
deps.parking_lot_core."0.4.0" = {
|
|
||||||
rand = "0.6.5";
|
|
||||||
smallvec = "0.6.9";
|
|
||||||
rustc_version = "0.2.3";
|
|
||||||
libc = "0.2.51";
|
|
||||||
winapi = "0.3.7";
|
|
||||||
};
|
|
||||||
deps.percent_encoding."1.0.1" = {};
|
|
||||||
deps.pkg_config."0.3.14" = {};
|
|
||||||
deps.proc_macro2."0.4.27" = {
|
|
||||||
unicode_xid = "0.1.0";
|
|
||||||
};
|
|
||||||
deps.quick_error."1.2.2" = {};
|
|
||||||
deps.quote."0.6.12" = {
|
|
||||||
proc_macro2 = "0.4.27";
|
|
||||||
};
|
|
||||||
deps.rand."0.6.5" = {
|
|
||||||
rand_chacha = "0.1.1";
|
|
||||||
rand_core = "0.4.0";
|
|
||||||
rand_hc = "0.1.0";
|
|
||||||
rand_isaac = "0.1.1";
|
|
||||||
rand_jitter = "0.1.3";
|
|
||||||
rand_os = "0.1.3";
|
|
||||||
rand_pcg = "0.1.2";
|
|
||||||
rand_xorshift = "0.1.1";
|
|
||||||
autocfg = "0.1.2";
|
|
||||||
libc = "0.2.51";
|
|
||||||
winapi = "0.3.7";
|
|
||||||
};
|
|
||||||
deps.rand_chacha."0.1.1" = {
|
|
||||||
rand_core = "0.3.1";
|
|
||||||
autocfg = "0.1.2";
|
|
||||||
};
|
|
||||||
deps.rand_core."0.3.1" = {
|
|
||||||
rand_core = "0.4.0";
|
|
||||||
};
|
|
||||||
deps.rand_core."0.4.0" = {};
|
|
||||||
deps.rand_hc."0.1.0" = {
|
|
||||||
rand_core = "0.3.1";
|
|
||||||
};
|
|
||||||
deps.rand_isaac."0.1.1" = {
|
|
||||||
rand_core = "0.3.1";
|
|
||||||
};
|
|
||||||
deps.rand_jitter."0.1.3" = {
|
|
||||||
rand_core = "0.4.0";
|
|
||||||
libc = "0.2.51";
|
|
||||||
winapi = "0.3.7";
|
|
||||||
};
|
|
||||||
deps.rand_os."0.1.3" = {
|
|
||||||
rand_core = "0.4.0";
|
|
||||||
rdrand = "0.4.0";
|
|
||||||
cloudabi = "0.0.3";
|
|
||||||
fuchsia_cprng = "0.1.1";
|
|
||||||
libc = "0.2.51";
|
|
||||||
winapi = "0.3.7";
|
|
||||||
};
|
|
||||||
deps.rand_pcg."0.1.2" = {
|
|
||||||
rand_core = "0.4.0";
|
|
||||||
autocfg = "0.1.2";
|
|
||||||
};
|
|
||||||
deps.rand_xorshift."0.1.1" = {
|
|
||||||
rand_core = "0.3.1";
|
|
||||||
};
|
|
||||||
deps.rawpointer."0.1.0" = {};
|
|
||||||
deps.rdrand."0.4.0" = {
|
|
||||||
rand_core = "0.3.1";
|
|
||||||
};
|
|
||||||
deps.redox_syscall."0.1.54" = {};
|
|
||||||
deps.redox_termios."0.1.1" = {
|
|
||||||
redox_syscall = "0.1.54";
|
|
||||||
};
|
|
||||||
deps.regex."1.1.6" = {
|
|
||||||
aho_corasick = "0.7.3";
|
|
||||||
memchr = "2.2.0";
|
|
||||||
regex_syntax = "0.6.6";
|
|
||||||
thread_local = "0.3.6";
|
|
||||||
utf8_ranges = "1.0.2";
|
|
||||||
};
|
|
||||||
deps.regex_syntax."0.6.6" = {
|
|
||||||
ucd_util = "0.1.3";
|
|
||||||
};
|
|
||||||
deps.remove_dir_all."0.5.1" = {
|
|
||||||
winapi = "0.3.7";
|
|
||||||
};
|
|
||||||
deps.rustc_demangle."0.1.14" = {};
|
|
||||||
deps.rustc_workspace_hack."1.0.0" = {};
|
|
||||||
deps.rustc_version."0.2.3" = {
|
|
||||||
semver = "0.9.0";
|
|
||||||
};
|
|
||||||
deps.rustfix."0.4.5" = {
|
|
||||||
failure = "0.1.5";
|
|
||||||
log = "0.4.6";
|
|
||||||
serde = "1.0.90";
|
|
||||||
serde_derive = "1.0.90";
|
|
||||||
serde_json = "1.0.39";
|
|
||||||
};
|
|
||||||
deps.ryu."0.2.7" = {};
|
|
||||||
deps.same_file."1.0.4" = {
|
|
||||||
winapi_util = "0.1.2";
|
|
||||||
};
|
|
||||||
deps.schannel."0.1.15" = {
|
|
||||||
lazy_static = "1.3.0";
|
|
||||||
winapi = "0.3.7";
|
|
||||||
};
|
|
||||||
deps.scopeguard."0.3.3" = {};
|
|
||||||
deps.semver."0.9.0" = {
|
|
||||||
semver_parser = "0.7.0";
|
|
||||||
serde = "1.0.90";
|
|
||||||
};
|
|
||||||
deps.semver_parser."0.7.0" = {};
|
|
||||||
deps.serde."1.0.90" = {
|
|
||||||
serde_derive = "1.0.90";
|
|
||||||
};
|
|
||||||
deps.serde_derive."1.0.90" = {
|
|
||||||
proc_macro2 = "0.4.27";
|
|
||||||
quote = "0.6.12";
|
|
||||||
syn = "0.15.32";
|
|
||||||
};
|
|
||||||
deps.serde_ignored."0.0.4" = {
|
|
||||||
serde = "1.0.90";
|
|
||||||
};
|
|
||||||
deps.serde_json."1.0.39" = {
|
|
||||||
itoa = "0.4.3";
|
|
||||||
ryu = "0.2.7";
|
|
||||||
serde = "1.0.90";
|
|
||||||
};
|
|
||||||
deps.shell_escape."0.1.4" = {};
|
|
||||||
deps.sized_chunks."0.1.3" = {
|
|
||||||
typenum = "1.10.0";
|
|
||||||
};
|
|
||||||
deps.smallvec."0.6.9" = {};
|
|
||||||
deps.socket2."0.3.8" = {
|
|
||||||
cfg_if = "0.1.7";
|
|
||||||
libc = "0.2.51";
|
|
||||||
redox_syscall = "0.1.54";
|
|
||||||
winapi = "0.3.7";
|
|
||||||
};
|
|
||||||
deps.strsim."0.8.0" = {};
|
|
||||||
deps.strsim."0.9.1" = {
|
|
||||||
hashbrown = "0.1.8";
|
|
||||||
ndarray = "0.12.1";
|
|
||||||
};
|
|
||||||
deps.syn."0.15.32" = {
|
|
||||||
proc_macro2 = "0.4.27";
|
|
||||||
quote = "0.6.12";
|
|
||||||
unicode_xid = "0.1.0";
|
|
||||||
};
|
|
||||||
deps.synstructure."0.10.1" = {
|
|
||||||
proc_macro2 = "0.4.27";
|
|
||||||
quote = "0.6.12";
|
|
||||||
syn = "0.15.32";
|
|
||||||
unicode_xid = "0.1.0";
|
|
||||||
};
|
|
||||||
deps.tar."0.4.22" = {
|
|
||||||
filetime = "0.2.4";
|
|
||||||
redox_syscall = "0.1.54";
|
|
||||||
libc = "0.2.51";
|
|
||||||
};
|
|
||||||
deps.tempfile."3.0.7" = {
|
|
||||||
cfg_if = "0.1.7";
|
|
||||||
rand = "0.6.5";
|
|
||||||
remove_dir_all = "0.5.1";
|
|
||||||
redox_syscall = "0.1.54";
|
|
||||||
libc = "0.2.51";
|
|
||||||
winapi = "0.3.7";
|
|
||||||
};
|
|
||||||
deps.termcolor."1.0.4" = {
|
|
||||||
wincolor = "1.0.1";
|
|
||||||
};
|
|
||||||
deps.termion."1.5.1" = {
|
|
||||||
libc = "0.2.51";
|
|
||||||
redox_syscall = "0.1.54";
|
|
||||||
redox_termios = "0.1.1";
|
|
||||||
};
|
|
||||||
deps.textwrap."0.11.0" = {
|
|
||||||
unicode_width = "0.1.5";
|
|
||||||
};
|
|
||||||
deps.thread_local."0.3.6" = {
|
|
||||||
lazy_static = "1.3.0";
|
|
||||||
};
|
|
||||||
deps.toml."0.4.10" = {
|
|
||||||
serde = "1.0.90";
|
|
||||||
};
|
|
||||||
deps.toml."0.5.0" = {
|
|
||||||
serde = "1.0.90";
|
|
||||||
};
|
|
||||||
deps.typenum."1.10.0" = {};
|
|
||||||
deps.ucd_util."0.1.3" = {};
|
|
||||||
deps.unicode_bidi."0.3.4" = {
|
|
||||||
matches = "0.1.8";
|
|
||||||
};
|
|
||||||
deps.unicode_normalization."0.1.8" = {
|
|
||||||
smallvec = "0.6.9";
|
|
||||||
};
|
|
||||||
deps.unicode_width."0.1.5" = {};
|
|
||||||
deps.unicode_xid."0.1.0" = {};
|
|
||||||
deps.url."1.7.2" = {
|
|
||||||
idna = "0.1.5";
|
|
||||||
matches = "0.1.8";
|
|
||||||
percent_encoding = "1.0.1";
|
|
||||||
};
|
|
||||||
deps.url_serde."0.2.0" = {
|
|
||||||
serde = "1.0.90";
|
|
||||||
url = "1.7.2";
|
|
||||||
};
|
|
||||||
deps.utf8_ranges."1.0.2" = {};
|
|
||||||
deps.vcpkg."0.2.6" = {};
|
|
||||||
deps.vec_map."0.8.1" = {};
|
|
||||||
deps.walkdir."2.2.7" = {
|
|
||||||
same_file = "1.0.4";
|
|
||||||
winapi = "0.3.7";
|
|
||||||
winapi_util = "0.1.2";
|
|
||||||
};
|
|
||||||
deps.winapi."0.2.8" = {};
|
|
||||||
deps.winapi."0.3.7" = {
|
|
||||||
winapi_i686_pc_windows_gnu = "0.4.0";
|
|
||||||
winapi_x86_64_pc_windows_gnu = "0.4.0";
|
|
||||||
};
|
|
||||||
deps.winapi_build."0.1.1" = {};
|
|
||||||
deps.winapi_i686_pc_windows_gnu."0.4.0" = {};
|
|
||||||
deps.winapi_util."0.1.2" = {
|
|
||||||
winapi = "0.3.7";
|
|
||||||
};
|
|
||||||
deps.winapi_x86_64_pc_windows_gnu."0.4.0" = {};
|
|
||||||
deps.wincolor."1.0.1" = {
|
|
||||||
winapi = "0.3.7";
|
|
||||||
winapi_util = "0.1.2";
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
{ callPackage, fetchFromGitHub }:
|
|
||||||
|
|
||||||
((callPackage ./cargo-vendor-carnix.nix {}).cargo_vendor {}).overrideAttrs (attrs: {
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "alexcrichton";
|
|
||||||
repo = "cargo-vendor";
|
|
||||||
rev = "9355661303ce2870d68a69d99953fce22581e31e";
|
|
||||||
sha256 = "0d4j3r09am3ynwhczimzv39264f5xz37jxa9js123y46w5by3wd2";
|
|
||||||
};
|
|
||||||
})
|
|
@ -1,62 +0,0 @@
|
|||||||
{ stdenv, lib, file, curl, pkgconfig, python, openssl, cmake, zlib
|
|
||||||
, makeWrapper, libiconv, cacert, rustPlatform, rustc, libgit2
|
|
||||||
, fetchurl
|
|
||||||
}:
|
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
|
||||||
# Note: we can't build cargo 1.28.0 because rustc tightened the borrow checker rules and broke
|
|
||||||
# backward compatibility, which affects old cargo versions.
|
|
||||||
# There are also issues with asm/llvm_asm with recent rustc and cargo versions prior to 1.39.
|
|
||||||
pname = "cargo";
|
|
||||||
version = "1.39.0";
|
|
||||||
src = fetchurl {
|
|
||||||
url = "https://static.rust-lang.org/dist/rustc-1.39.0-src.tar.gz";
|
|
||||||
sha256 = "0mwkc1bnil2cfyf6nglpvbn2y0zfbv44zfhsd5qg4c9rm6vgd8dl";
|
|
||||||
};
|
|
||||||
|
|
||||||
# the rust source tarball already has all the dependencies vendored, no need to fetch them again
|
|
||||||
cargoVendorDir = "vendor";
|
|
||||||
preBuild = "pushd src/tools/cargo";
|
|
||||||
postBuild = "popd";
|
|
||||||
|
|
||||||
passthru.rustc = rustc;
|
|
||||||
|
|
||||||
# changes hash of vendor directory otherwise
|
|
||||||
dontUpdateAutotoolsGnuConfigScripts = true;
|
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig cmake makeWrapper ];
|
|
||||||
buildInputs = [ cacert file curl python openssl zlib libgit2 ];
|
|
||||||
|
|
||||||
LIBGIT2_SYS_USE_PKG_CONFIG = 1;
|
|
||||||
|
|
||||||
# fixes: the cargo feature `edition` requires a nightly version of Cargo, but this is the `stable` channel
|
|
||||||
RUSTC_BOOTSTRAP = 1;
|
|
||||||
|
|
||||||
postInstall = ''
|
|
||||||
# NOTE: We override the `http.cainfo` option usually specified in
|
|
||||||
# `.cargo/config`. This is an issue when users want to specify
|
|
||||||
# their own certificate chain as environment variables take
|
|
||||||
# precedence
|
|
||||||
wrapProgram "$out/bin/cargo" \
|
|
||||||
--suffix PATH : "${rustc}/bin" \
|
|
||||||
--set CARGO_HTTP_CAINFO "${cacert}/etc/ssl/certs/ca-bundle.crt" \
|
|
||||||
--set SSL_CERT_FILE "${cacert}/etc/ssl/certs/ca-bundle.crt"
|
|
||||||
'';
|
|
||||||
|
|
||||||
checkPhase = ''
|
|
||||||
# Disable cross compilation tests
|
|
||||||
export CFG_DISABLE_CROSS_TESTS=1
|
|
||||||
cargo test
|
|
||||||
'';
|
|
||||||
|
|
||||||
# Disable check phase as there are failures (4 tests fail)
|
|
||||||
doCheck = false;
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
homepage = https://crates.io;
|
|
||||||
description = "Downloads your Rust project's dependencies and builds your project";
|
|
||||||
maintainers = with maintainers; [ wizeman retrry ];
|
|
||||||
license = [ licenses.mit licenses.asl20 ];
|
|
||||||
platforms = platforms.unix;
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,20 +0,0 @@
|
|||||||
{ pkgs ? import <nixpkgs> {}}:
|
|
||||||
|
|
||||||
let
|
|
||||||
artiqpkgs = import ./default.nix { inherit pkgs; };
|
|
||||||
vivado = import ./vivado.nix { inherit pkgs; };
|
|
||||||
in
|
|
||||||
pkgs.mkShell {
|
|
||||||
buildInputs = [
|
|
||||||
vivado
|
|
||||||
pkgs.gnumake
|
|
||||||
(pkgs.python3.withPackages(ps: (with ps; [ jinja2 jsonschema numpy paramiko ]) ++ (with artiqpkgs; [ migen microscope misoc jesd204b migen-axi artiq ])))
|
|
||||||
artiqpkgs.cargo
|
|
||||||
artiqpkgs.rustc
|
|
||||||
artiqpkgs.binutils-or1k
|
|
||||||
artiqpkgs.binutils-arm
|
|
||||||
artiqpkgs.llvm-or1k
|
|
||||||
artiqpkgs.openocd
|
|
||||||
];
|
|
||||||
TARGET_AR="or1k-linux-ar";
|
|
||||||
}
|
|
@ -1,24 +0,0 @@
|
|||||||
# Install Vivado in /opt and add to /etc/nixos/configuration.nix:
|
|
||||||
# nix.sandboxPaths = ["/opt"];
|
|
||||||
|
|
||||||
{ pkgs, vivadoPath ? "/opt/Xilinx/Vivado/2020.1" }:
|
|
||||||
|
|
||||||
pkgs.buildFHSUserEnv {
|
|
||||||
name = "vivado";
|
|
||||||
targetPkgs = pkgs: (
|
|
||||||
with pkgs; [
|
|
||||||
ncurses5
|
|
||||||
zlib
|
|
||||||
libuuid
|
|
||||||
xorg.libSM
|
|
||||||
xorg.libICE
|
|
||||||
xorg.libXrender
|
|
||||||
xorg.libX11
|
|
||||||
xorg.libXext
|
|
||||||
xorg.libXtst
|
|
||||||
xorg.libXi
|
|
||||||
]
|
|
||||||
);
|
|
||||||
profile = "source ${vivadoPath}/settings64.sh";
|
|
||||||
runScript = "vivado";
|
|
||||||
}
|
|
@ -1,16 +0,0 @@
|
|||||||
{ pkgs }:
|
|
||||||
|
|
||||||
let
|
|
||||||
# Pin nixpkgs to avoid frequent resource-intensive Windows reinstallations on Hydra.
|
|
||||||
wfvm-pkgs = pkgs.fetchFromGitHub {
|
|
||||||
owner = "NixOS";
|
|
||||||
repo = "nixpkgs";
|
|
||||||
rev = "f8248ab6d9e69ea9c07950d73d48807ec595e923";
|
|
||||||
sha256 = "009i9j6mbq6i481088jllblgdnci105b2q4mscprdawg3knlyahk";
|
|
||||||
};
|
|
||||||
wfvm = pkgs.fetchgit {
|
|
||||||
url = "https://git.m-labs.hk/M-Labs/wfvm.git";
|
|
||||||
rev = "4b497938ffd9fcddf84a3dbe2f01524395292adb";
|
|
||||||
sha256 = "0m3kdbbcskqc1lf8b5f7ccbll9b7vkl4r00kbyx3yjb2rs6cqvil";
|
|
||||||
};
|
|
||||||
in import "${wfvm}/wfvm" { pkgs = (import wfvm-pkgs {}); }
|
|
@ -1,17 +0,0 @@
|
|||||||
{ pkgs } : [
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://conda.anaconda.org/conda-forge/noarch/prettytable-0.7.2-py_3.tar.bz2";
|
|
||||||
sha256 = "0b7s4xm6bbkcg37sf1i3mxrbac0vxhryq22m3qx4x9kh6k2c5g5q";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/noarch/pycparser-2.20-py_0.tar.bz2";
|
|
||||||
sha256 = "1qwcb07q8cjz0qpj6pfxb0qb68kddmx9bv9wr5pghwz78q8073z9";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/noarch/six-1.15.0-py_0.tar.bz2";
|
|
||||||
sha256 = "08rsfp9bd2mz8r120s8w5vgncy0gn732xa0lfgbmx833548cfqmb";
|
|
||||||
})
|
|
||||||
]
|
|
@ -1,27 +0,0 @@
|
|||||||
{ pkgs } : [
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://conda.anaconda.org/conda-forge/noarch/prettytable-0.7.2-py_3.tar.bz2";
|
|
||||||
sha256 = "0b7s4xm6bbkcg37sf1i3mxrbac0vxhryq22m3qx4x9kh6k2c5g5q";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/noarch/six-1.15.0-py_0.tar.bz2";
|
|
||||||
sha256 = "08rsfp9bd2mz8r120s8w5vgncy0gn732xa0lfgbmx833548cfqmb";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/noarch/python-dateutil-2.8.1-py_0.tar.bz2";
|
|
||||||
sha256 = "0cbcd0jq6683ibj8ncsmmrbhbjvwww8i22lb68bx4xfzsmb9z8cb";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/noarch/cached-property-1.5.1-py_1.tar.bz2";
|
|
||||||
sha256 = "1yl6h3wb6hxgw79i7rpgpq260l5vqfcj5dv5kyxn8z99xdkp52q5";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/noarch/pycparser-2.20-py_0.tar.bz2";
|
|
||||||
sha256 = "1qwcb07q8cjz0qpj6pfxb0qb68kddmx9bv9wr5pghwz78q8073z9";
|
|
||||||
})
|
|
||||||
]
|
|
@ -1,167 +0,0 @@
|
|||||||
{ pkgs } : [
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/pyqt-5.9.2-py35h6538335_2.tar.bz2";
|
|
||||||
sha256 = "1anwq53nic50cijngxaylpn6232j9wdc2wz2rykqpgzvs1ms108s";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/zlib-1.2.11-h62dcd97_4.tar.bz2";
|
|
||||||
sha256 = "1jxd7sg0c278hqv09q6hridpdnyhkd34gbs92wkravj3gwsr1adk";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/openssl-1.1.1g-he774522_0.tar.bz2";
|
|
||||||
sha256 = "1gwfj33qb8inikdhmgcm30iz1ag8x71lzicsxbdr7ni4153df5gb";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/mkl_random-1.0.1-py35h77b88f5_1.tar.bz2";
|
|
||||||
sha256 = "0899qg9ih8srpw9q5mxd85hg4gpawb7lmz25x9xi401cfwhgwq7l";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/hdf5-1.10.2-hac2f561_1.tar.bz2";
|
|
||||||
sha256 = "0l1i5bpxl0bn9hf738ywygjwc32d4cq5fjkgzij3x27cxi8nvd21";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/tbb4py-2018.0.5-py35he980bc4_0.tar.bz2";
|
|
||||||
sha256 = "0gypjcmciw3rnd2cq0sqmvspgzaas13fghv633dqj8g3bvl4lfif";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/wheel-0.31.1-py35_0.tar.bz2";
|
|
||||||
sha256 = "07zmbg57lpvqd9nmahiff1mhzxmzchx1v128dcrj4iamymjcdlzf";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/vs2015_runtime-14.16.27012-hf0eaf9b_2.tar.bz2";
|
|
||||||
sha256 = "1gbm6i6nkp8linmak5mm42hj1nzqd5ppak8kv1n3wfn52p21ngvs";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://conda.anaconda.org/conda-forge/win-64/pygit2-0.27.1-py35hfa6e2cd_0.tar.bz2";
|
|
||||||
sha256 = "1jypm8vxs4j4yr37ai4ki9qsslv3wz6slklmisnvjraz1a4vzaf8";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/pip-10.0.1-py35_0.tar.bz2";
|
|
||||||
sha256 = "0zwlkfgnag1s64wbwdcg44zqj2dpfcq1g4b6dsk82q24j7fw40i3";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/h5py-2.8.0-py35h3bdd7fb_2.tar.bz2";
|
|
||||||
sha256 = "0743wrf51b2vs8ybasjpn7ricbh740r7drxcimkhbxp8r6vd66vp";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/numpy-1.15.2-py35ha559c80_0.tar.bz2";
|
|
||||||
sha256 = "1igf4gm726s4kg7km24flxdxr73fafaz3z18y3ndcb5f6r9zwa44";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/mkl-2018.0.3-1.tar.bz2";
|
|
||||||
sha256 = "01pq0f2787q58avg5ylfrbpf4jlg2b6rbajvf3swjpm1cmzxkm81";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/libssh2-1.9.0-h7a1dbc1_1.tar.bz2";
|
|
||||||
sha256 = "0sz405ab3n7991hxy8l9affs1slivsimgadxsdr6wvpgx3j4aqgx";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/tk-8.6.10-he774522_0.tar.bz2";
|
|
||||||
sha256 = "15bfncacdxmcbn4xixmfz2m7a09k7hcpwxvwn1lki84bx0fmzsis";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/sqlite-3.32.2-h2a8f88b_0.tar.bz2";
|
|
||||||
sha256 = "086jjnxfchypkr8cp1q8nsis0jfvl293bv4bcg7ikv7aia3vda8p";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/wincertstore-0.2-py35hfebbdb8_0.tar.bz2";
|
|
||||||
sha256 = "1624bzqlbiq4jlz46l65574smw739p7l38ydzxmayq3jmwx6zaar";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/certifi-2018.8.24-py35_1.tar.bz2";
|
|
||||||
sha256 = "06ygpkx3f71rwmq9lgc29r6jj4g1zi8rvrmn4mrrsb9b5sf0rzgf";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/icu-58.2-ha925a31_3.tar.bz2";
|
|
||||||
sha256 = "0vcl0j3v9ab022s2g3a9iv1pn7sflh670yyf5m08hdyf049m3jz7";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/regex-2018.08.29-py35hfa6e2cd_0.tar.bz2";
|
|
||||||
sha256 = "16cjgwpaqnfy8bg35iz12bb9whpws4abiz4cq4shpnh6gnwpwzj3";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/cffi-1.11.5-py35h74b6da3_1.tar.bz2";
|
|
||||||
sha256 = "0nc3ps4xl8rqpwiqaqqr5lrqzk8lx1a4hh3fpm7i7rlppqn5pm6a";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/libcurl-7.69.1-h2a8f88b_0.tar.bz2";
|
|
||||||
sha256 = "182zrmgl2142gfgnbgjsk0gbj85vw75xzxvhn9lzm485ghxsasvg";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/mkl_fft-1.0.6-py35hdbbee80_0.tar.bz2";
|
|
||||||
sha256 = "0xb02rx28rjlp5clavg19jb129ihcarrkz46pncaar91qxckbbxz";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/pyqtgraph-0.10.0-py35h28b3542_3.tar.bz2";
|
|
||||||
sha256 = "0ywzw3i4kf5ccck9whmg1j7s22x6i5fpywndy8rkr9va38g4nazq";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/sip-4.19.8-py35h6538335_0.tar.bz2";
|
|
||||||
sha256 = "1y761zpm6bi0pb61x1y26ap56hylh6mjg1xq9zl08bmcl2dlkwfy";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/setuptools-40.2.0-py35_0.tar.bz2";
|
|
||||||
sha256 = "146piyifnip1flqph19nxilnhfbzzsxlhfyx0i61wv7krr6ln9yy";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://conda.anaconda.org/conda-forge/win-64/python-levenshtein-0.12.0-py35_0.tar.bz2";
|
|
||||||
sha256 = "1rdpzv1y535swf17nm88chkp1m8w3wd3nwdy7jk1xfcnx1da5ss6";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://conda.anaconda.org/conda-forge/win-64/libgit2-0.27.8-hfac1375_0.tar.bz2";
|
|
||||||
sha256 = "05pjzwmm5vyxwcgi6vv3i961x3dgdd9c4b1ihagq9kyxgqfy21kd";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/scipy-1.1.0-py35h4f6bf74_1.tar.bz2";
|
|
||||||
sha256 = "0sdyj5nlycv4krz7f8rzhi0kxv302gpx65x1zwhj8dn6b2c50li0";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/curl-7.69.1-h2a8f88b_0.tar.bz2";
|
|
||||||
sha256 = "0hw5dh7gzx8fap4c3vkc2xc2q9by3f5ndbigr6pm6w5v29qaydn4";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/intel-openmp-2019.4-245.tar.bz2";
|
|
||||||
sha256 = "13qid5aagyxsfy5ng4bbwb7hs9jj29jvqbpvvkjiy6bgv36m8kr8";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/numpy-base-1.15.2-py35h8128ebf_0.tar.bz2";
|
|
||||||
sha256 = "166w4wkp9dwl505hc00hny1mq2mlvb169n7c9nws7dz8j36pqfrx";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/python-3.5.6-he025d50_0.tar.bz2";
|
|
||||||
sha256 = "0ygvmbyvhc2jisb5bzb0r5709qmn8392gr7rv6c8vrdiylfiqr73";
|
|
||||||
})
|
|
||||||
]
|
|
@ -1,132 +0,0 @@
|
|||||||
{ pkgs } : [
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/regex-2020.5.14-py37he774522_0.tar.bz2";
|
|
||||||
sha256 = "125l0ywc17h5hlpidjbr7dxyz9c24xmfjllj19dmvbx8hdlmvp99";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://conda.anaconda.org/conda-forge/win-64/python_abi-3.7-1_cp37m.tar.bz2";
|
|
||||||
sha256 = "04dllvrvczky7p7d82iqj7czmy5mm8w7h2gg0zpjzx0s09gkq09l";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/icu-58.2-ha925a31_3.tar.bz2";
|
|
||||||
sha256 = "0vcl0j3v9ab022s2g3a9iv1pn7sflh670yyf5m08hdyf049m3jz7";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/pip-20.1.1-py37_1.tar.bz2";
|
|
||||||
sha256 = "0wx0sdjq2kkdid4m0iss1bxjhpdk1lnrqsl3w7bqc0papz3gbx0a";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/mkl_fft-1.1.0-py37h45dec08_0.tar.bz2";
|
|
||||||
sha256 = "1v73rd107x1r77gv77cn2bv50hr15c0rwspzf7pdp93i5ydk7fm0";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/tk-8.6.10-he774522_0.tar.bz2";
|
|
||||||
sha256 = "15bfncacdxmcbn4xixmfz2m7a09k7hcpwxvwn1lki84bx0fmzsis";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://conda.anaconda.org/conda-forge/win-64/pygit2-1.2.1-py37h4ab8f01_0.tar.bz2";
|
|
||||||
sha256 = "1rj6bmf56g3imcrhfd67nqfzd5jjpnmbck714p6aqljxjw5x1zja";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/certifi-2020.6.20-py37_0.tar.bz2";
|
|
||||||
sha256 = "0601dwm5grhwnq7kvhz9sr49pw72ji8xbc28jc6z3pzihin243fy";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/libssh2-1.9.0-h7a1dbc1_1.tar.bz2";
|
|
||||||
sha256 = "0sz405ab3n7991hxy8l9affs1slivsimgadxsdr6wvpgx3j4aqgx";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/vs2015_runtime-14.16.27012-hf0eaf9b_2.tar.bz2";
|
|
||||||
sha256 = "1gbm6i6nkp8linmak5mm42hj1nzqd5ppak8kv1n3wfn52p21ngvs";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/intel-openmp-2020.1-216.tar.bz2";
|
|
||||||
sha256 = "097kkdpd27gc5v5fwsanbrpvmkqricbkd2igglz0yym0x2rldgb8";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/zlib-1.2.11-h62dcd97_4.tar.bz2";
|
|
||||||
sha256 = "1jxd7sg0c278hqv09q6hridpdnyhkd34gbs92wkravj3gwsr1adk";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/pyqtgraph-0.10.0-py37h28b3542_3.tar.bz2";
|
|
||||||
sha256 = "1vfxym7lpiv624ll82yp07v2906chdzvczjj9xbvfvk2sk0w1nk7";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/python-levenshtein-0.12.0-py37he774522_1001.tar.bz2";
|
|
||||||
sha256 = "0wgk6wi4hcc1msv6467y8rhd3zpxrlb6dc0a4fg5wrvzww9wh4dx";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://conda.anaconda.org/conda-forge/win-64/libgit2-1.0.0-h79a9ecc_0.tar.bz2";
|
|
||||||
sha256 = "1pi4hd4kah49wzy00iml5wpbscc0lx6ljk6lwnx92gas5z8856jd";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/setuptools-47.3.1-py37_0.tar.bz2";
|
|
||||||
sha256 = "1lljknly57bh73h30hn6vv826dx4vls736psa9jvf0d6l2kqrzrq";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/libcurl-7.69.1-h2a8f88b_0.tar.bz2";
|
|
||||||
sha256 = "182zrmgl2142gfgnbgjsk0gbj85vw75xzxvhn9lzm485ghxsasvg";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/mkl_random-1.1.1-py37h47e9c7a_0.tar.bz2";
|
|
||||||
sha256 = "1f85bd7rrzdprgmk83v1klana32j016128fkxk8kpk7idfd36zqv";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/python-3.7.7-h81c818b_4.tar.bz2";
|
|
||||||
sha256 = "092bv939n68yjkcm7q626nd6s5kqqvdrgjfqn1nadnqig612w2p9";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/curl-7.69.1-h2a8f88b_0.tar.bz2";
|
|
||||||
sha256 = "0hw5dh7gzx8fap4c3vkc2xc2q9by3f5ndbigr6pm6w5v29qaydn4";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/openssl-1.1.1g-he774522_0.tar.bz2";
|
|
||||||
sha256 = "1gwfj33qb8inikdhmgcm30iz1ag8x71lzicsxbdr7ni4153df5gb";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/scipy-1.5.0-py37h9439919_0.tar.bz2";
|
|
||||||
sha256 = "01pj0a82y9qd9z5fn5gv4argcc5g5s8kqj0lwjy9hj50qf6qwj76";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/numpy-1.18.5-py37h6530119_0.tar.bz2";
|
|
||||||
sha256 = "1knb5na7ij7ik76blsgwhdsy3i9r2l0154z5g5dkb2ds3sk878np";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/sqlite-3.32.3-h2a8f88b_0.tar.bz2";
|
|
||||||
sha256 = "1ddzwj0f6jikj6hsasg3vlwamsqhf5lc8k1la7gqbd77s11b8isc";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/numpy-base-1.18.5-py37hc3f5095_0.tar.bz2";
|
|
||||||
sha256 = "1dyxk2v7rm87najv3f8i04q44wxicfx9qrap9dy2vpqlrz3bj82j";
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/mkl-2020.1-216.tar.bz2";
|
|
||||||
sha256 = "1klj0sjlj5x1anjbkf017f16ssc65dkpg1rrn06njirbhwsc9w5m";
|
|
||||||
})
|
|
||||||
]
|
|
@ -1,79 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Run manually to build the list of conda dependencies to install in the
|
|
||||||
# test environments.
|
|
||||||
|
|
||||||
# NOTE: This procedure encounters failing HTTPS handshakes. To circumvent just
|
|
||||||
# for testing, insert `call conda config --set ssl_verify no` into
|
|
||||||
# getcondapackages.bat. To securely update the sources lists update the RTC
|
|
||||||
# hack to the proper date instead.
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
nix-build -E "
|
|
||||||
let
|
|
||||||
pkgs = import <nixpkgs> {};
|
|
||||||
wfvm = import ../wfvm.nix { inherit pkgs; };
|
|
||||||
in
|
|
||||||
wfvm.utils.wfvm-run {
|
|
||||||
name = \"get-conda-packages\";
|
|
||||||
image = wfvm.makeWindowsImage { installCommands = [ wfvm.layers.anaconda3 ]; };
|
|
||||||
# TODO: fix wfvm login expiry and also remove 'date' workarounds below
|
|
||||||
#fakeRtc = false;
|
|
||||||
isolateNetwork = false;
|
|
||||||
script = ''
|
|
||||||
cat > getcondapackages.bat << EOF
|
|
||||||
date 06-22-20
|
|
||||||
call conda config --prepend channels https://conda.m-labs.hk/artiq-beta
|
|
||||||
call conda config --append channels conda-forge
|
|
||||||
call conda create -n artiq -y
|
|
||||||
call conda install --dry-run --json -n artiq artiq > packages.json
|
|
||||||
date 04-20-20
|
|
||||||
EOF
|
|
||||||
\${wfvm.utils.win-put}/bin/win-put getcondapackages.bat
|
|
||||||
\${wfvm.utils.win-exec}/bin/win-exec '.\Anaconda3\Scripts\activate && getcondapackages'
|
|
||||||
\${wfvm.utils.win-get}/bin/win-get packages.json
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
"
|
|
||||||
|
|
||||||
./result/bin/wfvm-run-get-conda-packages
|
|
||||||
|
|
||||||
python -c "
|
|
||||||
import json
|
|
||||||
|
|
||||||
with open('packages.json') as json_file:
|
|
||||||
packages = json.load(json_file)
|
|
||||||
|
|
||||||
with open('packages_noarch.txt', 'w') as list_noarch:
|
|
||||||
with open('packages_win-64.txt', 'w') as list_win64:
|
|
||||||
for fetch in packages['actions']['FETCH']:
|
|
||||||
if 'm-labs' not in fetch['channel']:
|
|
||||||
if fetch['subdir'] == 'noarch':
|
|
||||||
list = list_noarch
|
|
||||||
elif fetch['subdir'] == 'win-64':
|
|
||||||
list = list_win64
|
|
||||||
else:
|
|
||||||
raise ValueError
|
|
||||||
url = fetch['url']
|
|
||||||
if url.endswith('.conda'):
|
|
||||||
url = url[:-6] + '.tar.bz2'
|
|
||||||
print(url, file=list)
|
|
||||||
"
|
|
||||||
|
|
||||||
for type in "noarch" "win-64"; do
|
|
||||||
echo Downloading $type packages
|
|
||||||
out=conda_$type\_packages.nix
|
|
||||||
echo "{ pkgs } : [" > $out
|
|
||||||
while read package; do
|
|
||||||
hash=$(nix-prefetch-url $package)
|
|
||||||
echo "
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = \"$package\";
|
|
||||||
sha256 = \"$hash\";
|
|
||||||
})" >> $out
|
|
||||||
done < packages_$type.txt
|
|
||||||
echo "]" >> $out
|
|
||||||
done
|
|
||||||
|
|
||||||
rm result getcondapackages.bat packages.json packages_noarch.txt packages_win-64.txt
|
|
@ -1,10 +0,0 @@
|
|||||||
{ pkgs ? import <nixpkgs> {} }:
|
|
||||||
|
|
||||||
let
|
|
||||||
artiqpkgs = import ../. { inherit pkgs; };
|
|
||||||
run-test = import ./run-test.nix {
|
|
||||||
inherit pkgs artiqpkgs;
|
|
||||||
testCommand = "set ARTIQ_ROOT=%cd%\\Anaconda3\\envs\\artiq-env\\Lib\\site-packages\\artiq\\examples\\kc705_nist_clock&& python -m unittest discover -v sipyco.test && python -m unittest discover -v artiq.test";
|
|
||||||
};
|
|
||||||
in
|
|
||||||
run-test
|
|
@ -1,60 +0,0 @@
|
|||||||
{ pkgs, artiqpkgs, testCommand, testTimeout ? 600 }:
|
|
||||||
|
|
||||||
let
|
|
||||||
condaEnv = "artiq-env";
|
|
||||||
tcpPorts = [ 1380 1381 1382 1383 ];
|
|
||||||
forwardedPorts =
|
|
||||||
map (port: {
|
|
||||||
listenAddr = "192.168.1.50";
|
|
||||||
targetAddr = "192.168.1.50";
|
|
||||||
inherit port;
|
|
||||||
}) tcpPorts;
|
|
||||||
|
|
||||||
wfvm = import ../wfvm.nix { inherit pkgs; };
|
|
||||||
conda-deps = {
|
|
||||||
name = "conda-deps";
|
|
||||||
script = let
|
|
||||||
artiq6 = pkgs.lib.strings.versionAtLeast artiqpkgs.artiq.version "6.0";
|
|
||||||
qt-asyncio-package = if artiq6 then artiqpkgs.conda-qasync else artiqpkgs.conda-quamash;
|
|
||||||
conda-deps-noarch = import (if artiq6 then ./conda_noarch_packages.nix else ./conda_noarch_packages-legacy.nix) { inherit pkgs; };
|
|
||||||
conda-deps-win-64 = import (if artiq6 then ./conda_win-64_packages.nix else ./conda_win-64_packages-legacy.nix) { inherit pkgs; };
|
|
||||||
conda-packages-put = pkgs.lib.strings.concatStringsSep "\n"
|
|
||||||
( (map (package: ''win-put ${package} 'fake-channel/noarch' '') conda-deps-noarch)
|
|
||||||
++ (map (package: ''win-put ${package} 'fake-channel/win-64' '') conda-deps-win-64) );
|
|
||||||
in
|
|
||||||
''
|
|
||||||
win-exec 'mkdir fake-channel && mkdir fake-channel\noarch && mkdir fake-channel\win-64'
|
|
||||||
|
|
||||||
${conda-packages-put}
|
|
||||||
|
|
||||||
win-put ${artiqpkgs.conda-windows-binutils-or1k}/win-64/*.tar.bz2 'fake-channel/win-64'
|
|
||||||
win-put ${artiqpkgs.conda-windows-llvm-or1k}/win-64/*.tar.bz2 'fake-channel/win-64'
|
|
||||||
win-put ${artiqpkgs.conda-windows-llvmlite-artiq}/win-64/*.tar.bz2 'fake-channel/win-64'
|
|
||||||
|
|
||||||
win-put ${artiqpkgs.conda-pythonparser}/noarch/*.tar.bz2 'fake-channel/noarch'
|
|
||||||
win-put ${artiqpkgs.conda-sipyco}/noarch/*.tar.bz2 'fake-channel/noarch'
|
|
||||||
win-put ${qt-asyncio-package}/noarch/*.tar.bz2 'fake-channel/noarch'
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
in
|
|
||||||
wfvm.utils.wfvm-run {
|
|
||||||
name = "windows-tests";
|
|
||||||
image = wfvm.makeWindowsImage { installCommands = [ wfvm.layers.anaconda3 conda-deps ]; };
|
|
||||||
inherit forwardedPorts;
|
|
||||||
script =
|
|
||||||
''
|
|
||||||
${wfvm.utils.win-put}/bin/win-put ${artiqpkgs.conda-artiq}/noarch/*.tar.bz2 'fake-channel/noarch'
|
|
||||||
|
|
||||||
${wfvm.utils.win-exec}/bin/win-exec ".\Anaconda3\scripts\activate && conda index fake-channel"
|
|
||||||
${wfvm.utils.win-exec}/bin/win-exec ".\Anaconda3\scripts\activate && conda create -n ${condaEnv} --offline"
|
|
||||||
${wfvm.utils.win-exec}/bin/win-exec ".\Anaconda3\scripts\activate ${condaEnv} && conda install -y -c file:///C:/users/wfvm/fake-channel --offline artiq"\
|
|
||||||
|
|
||||||
# Schedule a timed shutdown against hanging test runs
|
|
||||||
${wfvm.utils.win-exec}/bin/win-exec "shutdown -s -t ${toString testTimeout}"
|
|
||||||
|
|
||||||
${wfvm.utils.win-exec}/bin/win-exec ".\Anaconda3\scripts\activate ${condaEnv} && ${testCommand}"
|
|
||||||
|
|
||||||
# Abort timeouted shutdown
|
|
||||||
${wfvm.utils.win-exec}/bin/win-exec "shutdown -a"
|
|
||||||
'';
|
|
||||||
}
|
|
248
artiq-full.nix
248
artiq-full.nix
@ -1,248 +0,0 @@
|
|||||||
{ a6p ? <a6p>
|
|
||||||
, artiq-fast ? (
|
|
||||||
if a6p
|
|
||||||
then <artiq-board-generated/fast>
|
|
||||||
else <artiq-fast>
|
|
||||||
)
|
|
||||||
, pkgs ? import (artiq-fast + "/pkgs/nixpkgs.nix") { inherit (import <nixpkgs> {}) fetchgit; } {}
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
|
||||||
sinaraSystemsRev = builtins.readFile <artiq-board-generated/sinara-rev.txt>;
|
|
||||||
sinaraSystemsHash = builtins.readFile <artiq-board-generated/sinara-hash.txt>;
|
|
||||||
sinaraSystemsSrc =
|
|
||||||
if a6p
|
|
||||||
then pkgs.fetchgit {
|
|
||||||
url = "https://git.m-labs.hk/M-Labs/sinara-systems.git";
|
|
||||||
rev = sinaraSystemsRev;
|
|
||||||
sha256 = sinaraSystemsHash;
|
|
||||||
}
|
|
||||||
else <sinaraSystemsSrc>;
|
|
||||||
artiqVersion = import (artiq-fast + "/pkgs/artiq-version.nix") {
|
|
||||||
inherit (pkgs) stdenv git fetchgit;
|
|
||||||
};
|
|
||||||
targets = import ./artiq-full/artiq-targets.nix {
|
|
||||||
inherit pkgs artiqVersion sinaraSystemsSrc;
|
|
||||||
};
|
|
||||||
kasliVariants = map ({ variant, ... }: variant) (
|
|
||||||
builtins.filter ({ target, ... }: target == "kasli") (
|
|
||||||
builtins.attrValues targets
|
|
||||||
)
|
|
||||||
);
|
|
||||||
standaloneVariants = map ({ variant, ... }: variant) (
|
|
||||||
builtins.filter ({ target, standalone ? false, ... }: target == "kasli" && standalone) (
|
|
||||||
builtins.attrValues targets
|
|
||||||
)
|
|
||||||
);
|
|
||||||
serializedTargets = pkgs.lib.generators.toPretty {} (
|
|
||||||
map (conf:
|
|
||||||
if conf ? buildCommand
|
|
||||||
then conf // {
|
|
||||||
buildCommand = builtins.replaceStrings ["$"] ["\\\\\\$"] conf.buildCommand;
|
|
||||||
}
|
|
||||||
else conf
|
|
||||||
) (builtins.attrValues targets)
|
|
||||||
);
|
|
||||||
|
|
||||||
generatedNix = pkgs.runCommand "generated-nix" { buildInputs = [ pkgs.nix pkgs.git ]; }
|
|
||||||
''
|
|
||||||
mkdir $out
|
|
||||||
|
|
||||||
${if a6p
|
|
||||||
then ''
|
|
||||||
cp -a ${<artiq-board-generated>} $out/board-generated
|
|
||||||
ln -s board-generated/fast $out/fast
|
|
||||||
''
|
|
||||||
else "cp -a ${<artiq-fast>} $out/fast"}
|
|
||||||
cp ${./artiq-full}/artiq-board-vivado.nix $out
|
|
||||||
cp ${./artiq-full}/generate-identifier.py $out
|
|
||||||
cp ${./artiq-full}/conda-artiq-board.nix $out
|
|
||||||
cp ${./artiq-full}/extras.nix $out
|
|
||||||
cp ${./artiq-full}/*.patch $out
|
|
||||||
|
|
||||||
${if a6p
|
|
||||||
then ''
|
|
||||||
REV=${sinaraSystemsRev}
|
|
||||||
HASH=${sinaraSystemsHash}
|
|
||||||
''
|
|
||||||
else ''
|
|
||||||
REV=`git --git-dir ${sinaraSystemsSrc}/.git rev-parse HEAD`
|
|
||||||
SINARA_SRC_CLEAN=`mktemp -d`
|
|
||||||
cp -a ${sinaraSystemsSrc}/. $SINARA_SRC_CLEAN
|
|
||||||
chmod -R 755 $SINARA_SRC_CLEAN/.git
|
|
||||||
chmod 755 $SINARA_SRC_CLEAN
|
|
||||||
rm -rf $SINARA_SRC_CLEAN/.git
|
|
||||||
HASH=`nix-hash --type sha256 --base32 $SINARA_SRC_CLEAN`
|
|
||||||
''}
|
|
||||||
cat > $out/default.nix << EOF
|
|
||||||
{ pkgs ? import ./fast/pkgs/nixpkgs.nix { inherit (import <nixpkgs> {}) fetchgit; } {} }:
|
|
||||||
|
|
||||||
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
|
|
||||||
)}];
|
|
||||||
standaloneVariants = [${builtins.concatStringsSep " " (
|
|
||||||
builtins.map (variant: "\"${variant}\"") standaloneVariants
|
|
||||||
)}];
|
|
||||||
|
|
||||||
vivado = import ${if a6p then "./board-generated" else "."}/fast/vivado.nix {
|
|
||||||
inherit pkgs;
|
|
||||||
};
|
|
||||||
artiq-board =
|
|
||||||
${if a6p
|
|
||||||
then ''
|
|
||||||
import ./artiq-board-vivado.nix {
|
|
||||||
inherit pkgs vivado;
|
|
||||||
version = artiq-fast.artiq.version;
|
|
||||||
board-generated = import ./board-generated {
|
|
||||||
inherit pkgs;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
''
|
|
||||||
else ''
|
|
||||||
import ./fast/artiq-board.nix {
|
|
||||||
inherit pkgs vivado;
|
|
||||||
}
|
|
||||||
''};
|
|
||||||
conda-artiq-board = import ./conda-artiq-board.nix { inherit pkgs; };
|
|
||||||
src = pkgs.fetchgit {
|
|
||||||
url = "https://git.m-labs.hk/M-Labs/sinara-systems.git";
|
|
||||||
rev = "$REV";
|
|
||||||
sha256 = "$HASH";
|
|
||||||
};
|
|
||||||
artiq-targets = pkgs.lib.lists.foldr (conf: start:
|
|
||||||
let
|
|
||||||
inherit (conf) target variant;
|
|
||||||
json = src + "/\''${variant}.json";
|
|
||||||
boardBinaries = artiq-board (conf // {
|
|
||||||
src = json;
|
|
||||||
});
|
|
||||||
in
|
|
||||||
start // {
|
|
||||||
"artiq-board-\''${target}-\''${variant}" = boardBinaries;
|
|
||||||
"conda-artiq-board-\''${target}-\''${variant}" = conda-artiq-board {
|
|
||||||
boardBinaries = boardBinaries;
|
|
||||||
inherit target variant;
|
|
||||||
};
|
|
||||||
} // (pkgs.lib.optionalAttrs (
|
|
||||||
target == "kasli" &&
|
|
||||||
builtins.elem variant standaloneVariants
|
|
||||||
) {
|
|
||||||
"device-db-\''${target}-\''${variant}" = pkgs.stdenv.mkDerivation {
|
|
||||||
name = "device-db-\''${target}-\''${variant}";
|
|
||||||
buildInputs = ddbDeps;
|
|
||||||
phases = [ "buildPhase" ];
|
|
||||||
buildPhase = "
|
|
||||||
mkdir \$out
|
|
||||||
artiq_ddb_template \''${json} -o \$out/device_db.py
|
|
||||||
mkdir \$out/nix-support
|
|
||||||
echo file device_db_template \$out/device_db.py >> \$out/nix-support/hydra-build-products
|
|
||||||
";
|
|
||||||
};
|
|
||||||
})
|
|
||||||
) {} ${serializedTargets};
|
|
||||||
drtio-systems = {
|
|
||||||
${pkgs.lib.optionalString a6p ''
|
|
||||||
berkeley3 = {
|
|
||||||
master = "berkeley3master";
|
|
||||||
satellites = {
|
|
||||||
"1" = "berkeley3satellite";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
bonn1 = {
|
|
||||||
master = "bonn1master";
|
|
||||||
satellites = {
|
|
||||||
"1" = "bonn1satellite";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
hw2 = {
|
|
||||||
master = "hw2master";
|
|
||||||
satellites = {
|
|
||||||
"1" = "hw2satellite";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
ptb3 = {
|
|
||||||
master = "ptb3master";
|
|
||||||
satellites = {
|
|
||||||
"1" = "ptb3satellite";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
purdue = {
|
|
||||||
master = "purduemaster";
|
|
||||||
satellites = {
|
|
||||||
"1" = "purduesatellite";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
stfc = {
|
|
||||||
master = "stfcmaster";
|
|
||||||
satellites = {
|
|
||||||
"1" = "stfcsatellite";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
wipm7 = {
|
|
||||||
master = "wipm7master";
|
|
||||||
satellites = {
|
|
||||||
"1" = "wipm7satellite";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
''}
|
|
||||||
};
|
|
||||||
drtio-ddbs = pkgs.lib.attrsets.mapAttrs'
|
|
||||||
(system: crates: pkgs.lib.attrsets.nameValuePair ("device-db-" + system)
|
|
||||||
(pkgs.stdenv.mkDerivation {
|
|
||||||
name = "device-db-\''${system}";
|
|
||||||
buildInputs = ddbDeps;
|
|
||||||
phases = [ "buildPhase" ];
|
|
||||||
buildPhase = "
|
|
||||||
mkdir \$out
|
|
||||||
artiq_ddb_template \
|
|
||||||
\''${pkgs.lib.strings.concatStringsSep " " (pkgs.lib.attrsets.mapAttrsToList (dest: desc: "-s " + dest + " " + (src + "/\''${desc}.json")) crates.satellites) } \
|
|
||||||
\''${src}/\''${crates.master}.json -o \$out/device_db.py
|
|
||||||
mkdir \$out/nix-support
|
|
||||||
echo file device_db_template \$out/device_db.py >> \$out/nix-support/hydra-build-products
|
|
||||||
";
|
|
||||||
})) drtio-systems;
|
|
||||||
extras = import ./extras.nix { inherit pkgs; inherit (artiq-fast) sipyco asyncserial artiq; };
|
|
||||||
in
|
|
||||||
artiq-fast // artiq-targets // drtio-ddbs // extras // rec {
|
|
||||||
conda-artiq-board-kasli-tester = conda-artiq-board {
|
|
||||||
target = "kasli";
|
|
||||||
variant = "tester";
|
|
||||||
boardBinaries = artiq-fast.artiq-board-kasli-tester;
|
|
||||||
};
|
|
||||||
conda-artiq-board-kc705-nist_clock = conda-artiq-board {
|
|
||||||
target = "kc705";
|
|
||||||
variant = "nist_clock";
|
|
||||||
boardBinaries = artiq-fast.artiq-board-kc705-nist_clock;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
'';
|
|
||||||
pythonDeps = import ./artiq-full/python-deps.nix { inherit pkgs; };
|
|
||||||
sipycoManualPackages = import ./artiq-full/sipyco-manual.nix {
|
|
||||||
inherit (pkgs) stdenv lib python3Packages texlive texinfo;
|
|
||||||
inherit (import artiq-fast { inherit pkgs; }) sipyco;
|
|
||||||
};
|
|
||||||
artiqManualPackages = import ./artiq-full/artiq-manual.nix {
|
|
||||||
inherit (pkgs) stdenv lib fetchgit git python3Packages texlive texinfo;
|
|
||||||
inherit (pythonDeps) sphinxcontrib-wavedrom;
|
|
||||||
inherit artiq-fast;
|
|
||||||
};
|
|
||||||
artiq-full = import generatedNix { inherit pkgs; };
|
|
||||||
exampleUserEnv = import ./artiq-full/example-user-env.nix { inherit pkgs artiq-full; };
|
|
||||||
jobs = artiq-full // sipycoManualPackages // artiqManualPackages // exampleUserEnv;
|
|
||||||
in
|
|
||||||
builtins.mapAttrs (key: value: pkgs.lib.hydraJob value) jobs // {
|
|
||||||
artiq-full = pkgs.releaseTools.channel {
|
|
||||||
name = "artiq-full";
|
|
||||||
src = generatedNix;
|
|
||||||
constituents = [];
|
|
||||||
};
|
|
||||||
conda-channel = import ./artiq-full/conda-channel.nix { inherit pkgs artiq-fast; } { inherit jobs; };
|
|
||||||
}
|
|
@ -1,125 +0,0 @@
|
|||||||
# Install Vivado in /opt and add to /etc/nixos/configuration.nix:
|
|
||||||
# nix.sandboxPaths = ["/opt"];
|
|
||||||
|
|
||||||
{ pkgs
|
|
||||||
, vivado ? import ./fast/vivado.nix { inherit pkgs; }
|
|
||||||
, board-generated
|
|
||||||
, version
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
|
||||||
# Funnelling the source code through a Nix string allows dropping
|
|
||||||
# all dependencies via `unsafeDiscardStringContext`.
|
|
||||||
discardContextFromPath = { name, src }:
|
|
||||||
let
|
|
||||||
packed = pkgs.stdenv.mkDerivation {
|
|
||||||
name = "${name}.nar.base64";
|
|
||||||
buildInputs = [ pkgs.nix ];
|
|
||||||
phases = [ "installPhase" ];
|
|
||||||
installPhase = "nix-store --dump ${src} | base64 -w0 > $out";
|
|
||||||
};
|
|
||||||
unpacked = archive:
|
|
||||||
pkgs.stdenvNoCC.mkDerivation {
|
|
||||||
name = builtins.unsafeDiscardStringContext name;
|
|
||||||
|
|
||||||
phases = [ "installPhase" ];
|
|
||||||
buildInputs = [ pkgs.nix ];
|
|
||||||
installPhase = "base64 -d < ${archive} | nix-store --restore $out";
|
|
||||||
};
|
|
||||||
in
|
|
||||||
unpacked (
|
|
||||||
builtins.toFile "${builtins.unsafeDiscardStringContext name}.nar.base64" (
|
|
||||||
builtins.unsafeDiscardStringContext (
|
|
||||||
builtins.readFile packed
|
|
||||||
))) ;
|
|
||||||
in
|
|
||||||
{ target
|
|
||||||
, variant
|
|
||||||
, extraInstallCommands ? ""
|
|
||||||
, ... }:
|
|
||||||
let
|
|
||||||
name = "artiq-board-${target}-${variant}-${version}";
|
|
||||||
installPath = builtins.unsafeDiscardStringContext "${pkgs.python3Packages.python.sitePackages}/artiq/board-support/${target}-${variant}";
|
|
||||||
|
|
||||||
generated = board-generated."artiq-board-${target}-${variant}";
|
|
||||||
|
|
||||||
identifierStr = "${version};${variant}";
|
|
||||||
identifiers = import (
|
|
||||||
pkgs.runCommandLocal "${name}-identifiers.nix" {
|
|
||||||
buildInputs = [ pkgs.python3 ];
|
|
||||||
} ''python ${./generate-identifier.py} "${identifierStr}" > $out''
|
|
||||||
);
|
|
||||||
|
|
||||||
# Depends on just Vivado and the generated Bitstream source
|
|
||||||
vivadoCheckpoint = pkgs.stdenvNoCC.mkDerivation {
|
|
||||||
name = builtins.unsafeDiscardStringContext "${name}-vivado-checkpoint";
|
|
||||||
|
|
||||||
src = discardContextFromPath {
|
|
||||||
name = "${name}-gateware";
|
|
||||||
src = "${generated}/gateware";
|
|
||||||
};
|
|
||||||
buildInputs = [ vivado pkgs.nix ];
|
|
||||||
buildPhase = ''
|
|
||||||
vivado -mode batch -source top_route.tcl
|
|
||||||
'';
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out
|
|
||||||
|
|
||||||
chmod a+r top_route.dcp
|
|
||||||
cp top_route.dcp $out
|
|
||||||
cp top_bitstream.tcl $out
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
vivadoOutput = pkgs.stdenvNoCC.mkDerivation {
|
|
||||||
name = builtins.unsafeDiscardStringContext "${name}-vivado-output";
|
|
||||||
src = vivadoCheckpoint;
|
|
||||||
buildInputs = [ vivado ];
|
|
||||||
buildPhase =
|
|
||||||
''
|
|
||||||
cat >top.tcl <<EOF
|
|
||||||
open_checkpoint top_route.dcp
|
|
||||||
'' +
|
|
||||||
(pkgs.lib.concatMapStrings ({ cell, init }:
|
|
||||||
''
|
|
||||||
set_property INIT ${init} [get_cell ${cell}]
|
|
||||||
''
|
|
||||||
) identifiers) +
|
|
||||||
''
|
|
||||||
source "top_bitstream.tcl"
|
|
||||||
EOF
|
|
||||||
vivado -mode batch -source top.tcl
|
|
||||||
'';
|
|
||||||
installPhase = ''
|
|
||||||
TARGET_DIR=$out/${installPath}
|
|
||||||
mkdir -p $TARGET_DIR
|
|
||||||
chmod a+r top.bit
|
|
||||||
cp top.bit $TARGET_DIR/
|
|
||||||
'';
|
|
||||||
|
|
||||||
# temporarily disabled because there is currently always at least one Kasli bitstream
|
|
||||||
# that fails timing and blocks the conda channel.
|
|
||||||
doCheck = false;
|
|
||||||
checkPhase = ''
|
|
||||||
# Search for PCREs in the Vivado output to check for errors
|
|
||||||
check_log() {
|
|
||||||
set +e
|
|
||||||
grep -Pe "$1" vivado.log
|
|
||||||
FOUND=$?
|
|
||||||
set -e
|
|
||||||
if [ $FOUND != 1 ]; then
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
check_log "\d+ constraint not met\."
|
|
||||||
check_log "Timing constraints are not met\."
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
in
|
|
||||||
pkgs.python3Packages.toPythonModule (
|
|
||||||
pkgs.buildEnv rec {
|
|
||||||
inherit name;
|
|
||||||
paths = [ generated vivadoOutput ];
|
|
||||||
pathsToLink = [ "/${installPath}" ];
|
|
||||||
})
|
|
@ -1,65 +0,0 @@
|
|||||||
{ pkgs
|
|
||||||
, artiqVersion
|
|
||||||
, sinaraSystemsSrc
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
|
||||||
jsons =
|
|
||||||
map (jsonFile: builtins.fromJSON (
|
|
||||||
builtins.readFile (sinaraSystemsSrc + "/${jsonFile}")
|
|
||||||
)) (
|
|
||||||
builtins.attrNames (
|
|
||||||
pkgs.lib.filterAttrs (name: type:
|
|
||||||
type != "directory" &&
|
|
||||||
builtins.match ".+\\.json" name != null
|
|
||||||
) (builtins.readDir sinaraSystemsSrc)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
kasli = builtins.listToAttrs (
|
|
||||||
builtins.map ({ variant, base, ... }: {
|
|
||||||
name = "artiq-board-kasli-${variant}";
|
|
||||||
value = {
|
|
||||||
target = "kasli";
|
|
||||||
inherit variant;
|
|
||||||
src = sinaraSystemsSrc + "/${variant}.json";
|
|
||||||
buildCommand = "python -m artiq.gateware.targets.kasli_generic $src";
|
|
||||||
standalone = base == "standalone";
|
|
||||||
};
|
|
||||||
}) (
|
|
||||||
builtins.filter (json:
|
|
||||||
pkgs.lib.strings.versionAtLeast artiqVersion (
|
|
||||||
if json ? min_artiq_version
|
|
||||||
then json.min_artiq_version
|
|
||||||
else "0"
|
|
||||||
)
|
|
||||||
) jsons
|
|
||||||
)
|
|
||||||
);
|
|
||||||
in
|
|
||||||
kasli // {
|
|
||||||
artiq-board-sayma-rtm = {
|
|
||||||
target = "sayma";
|
|
||||||
variant = "rtm";
|
|
||||||
buildCommand = "python -m artiq.gateware.targets.sayma_rtm";
|
|
||||||
};
|
|
||||||
artiq-board-sayma-satellite = {
|
|
||||||
target = "sayma";
|
|
||||||
variant = "satellite";
|
|
||||||
buildCommand = "python -m artiq.gateware.targets.sayma_amc";
|
|
||||||
};
|
|
||||||
artiq-board-metlino-master = {
|
|
||||||
target = "metlino";
|
|
||||||
variant = "master";
|
|
||||||
buildCommand = "python -m artiq.gateware.targets.metlino";
|
|
||||||
};
|
|
||||||
artiq-board-kc705-nist_qc2 = {
|
|
||||||
target = "kc705";
|
|
||||||
variant = "nist_qc2";
|
|
||||||
};
|
|
||||||
} // (pkgs.lib.optionalAttrs (pkgs.lib.strings.versionAtLeast artiqVersion "6.0") {
|
|
||||||
artiq-board-sayma-satellite-st = {
|
|
||||||
target = "sayma";
|
|
||||||
variant = "satellite";
|
|
||||||
buildCommand = "python -m artiq.gateware.targets.sayma_amc --jdcg-type syncdds";
|
|
||||||
};
|
|
||||||
})
|
|
@ -1,25 +0,0 @@
|
|||||||
{ pkgs, artiq-fast }:
|
|
||||||
{ jobs }:
|
|
||||||
|
|
||||||
let
|
|
||||||
condaBuilderEnv = import (artiq-fast + "/conda/builder-env.nix") { inherit pkgs; };
|
|
||||||
in
|
|
||||||
pkgs.runCommand "conda-channel" { }
|
|
||||||
''
|
|
||||||
mkdir -p $out/noarch $out/linux-64 $out/win-64
|
|
||||||
for storepath in ${pkgs.lib.concatMapStringsSep " " builtins.toString (builtins.attrValues jobs)}; do
|
|
||||||
hydra_build_products=$storepath/nix-support/hydra-build-products
|
|
||||||
if [ -f $hydra_build_products ]; then
|
|
||||||
while IFS= read -r line; do
|
|
||||||
type=`echo $line | cut -f2 -d " "`
|
|
||||||
if [ $type == "conda" ]; then
|
|
||||||
path=`echo $line | cut -f3 -d " "`
|
|
||||||
arch=`echo $path | cut -f5 -d "/"`
|
|
||||||
ln -s $path $out/$arch
|
|
||||||
fi
|
|
||||||
done < $hydra_build_products
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
cd $out
|
|
||||||
${condaBuilderEnv}/bin/conda-builder-env -c "conda index"
|
|
||||||
''
|
|
@ -1,38 +0,0 @@
|
|||||||
{ pkgs, artiq-full }:
|
|
||||||
let
|
|
||||||
matplotlib-qt = (pkgs.python3Packages.matplotlib.override { enableQt = true; });
|
|
||||||
in
|
|
||||||
{
|
|
||||||
artiq-example-user-env = pkgs.runCommand "artiq-example-user-env" {
|
|
||||||
buildInputs = [
|
|
||||||
(pkgs.python3.withPackages(ps: [
|
|
||||||
artiq-full.artiq
|
|
||||||
artiq-full.artiq-comtools
|
|
||||||
artiq-full.wand
|
|
||||||
artiq-full.flake8-artiq
|
|
||||||
artiq-full.lda
|
|
||||||
artiq-full.korad_ka3005p
|
|
||||||
artiq-full.novatech409b
|
|
||||||
artiq-full.thorlabs_tcube
|
|
||||||
artiq-full.artiq-board-kc705-nist_clock
|
|
||||||
artiq-full.artiq-board-kasli-oregon
|
|
||||||
ps.paramiko
|
|
||||||
ps.pandas
|
|
||||||
ps.numpy
|
|
||||||
ps.scipy
|
|
||||||
ps.numba
|
|
||||||
ps.bokeh
|
|
||||||
matplotlib-qt
|
|
||||||
# cirq is broken and doesn't build (as of 20.09.3281.06b11191834)
|
|
||||||
#(ps.cirq.override { matplotlib = matplotlib-qt; })
|
|
||||||
# qiskit does not work with matplotlib-qt
|
|
||||||
#ps.qiskit
|
|
||||||
]))
|
|
||||||
|
|
||||||
artiq-full.openocd
|
|
||||||
pkgs.gtkwave
|
|
||||||
#pkgs.spyder # broken on 20.03
|
|
||||||
pkgs.R
|
|
||||||
];
|
|
||||||
} "touch $out";
|
|
||||||
}
|
|
@ -1,248 +0,0 @@
|
|||||||
{ pkgs, sipyco, asyncserial, artiq }:
|
|
||||||
let
|
|
||||||
condaBuild = import ./fast/conda/build.nix { inherit pkgs; };
|
|
||||||
condaFakeSource = import ./fast/conda/fake-source.nix { inherit pkgs; };
|
|
||||||
dualPackage = (
|
|
||||||
{ name, version, src, pythonOptions ? {}, condaOptions ? {}, withManual ? true}:
|
|
||||||
{
|
|
||||||
"${name}" = pkgs.python3Packages.buildPythonPackage ({
|
|
||||||
inherit version;
|
|
||||||
name = "${name}-${version}";
|
|
||||||
inherit src;
|
|
||||||
} // pythonOptions);
|
|
||||||
"conda-${name}" = condaBuild {
|
|
||||||
name = "conda-${name}";
|
|
||||||
src = condaFakeSource ({
|
|
||||||
inherit name version src;
|
|
||||||
} // condaOptions);
|
|
||||||
};
|
|
||||||
} // (pkgs.lib.optionalAttrs withManual {
|
|
||||||
"${name}-manual-html" = pkgs.stdenv.mkDerivation {
|
|
||||||
name = "${name}-manual-html-${version}";
|
|
||||||
inherit version src;
|
|
||||||
buildInputs = (with pkgs.python3Packages; [ sphinx sphinx_rtd_theme sphinx-argparse ]) ++ [ artiq ];
|
|
||||||
preBuild = ''
|
|
||||||
export SOURCE_DATE_EPOCH=${import ./fast/pkgs/artiq-timestamp.nix { inherit (pkgs) stdenv fetchgit git; }}
|
|
||||||
cd doc
|
|
||||||
'';
|
|
||||||
makeFlags = [ "html" ];
|
|
||||||
installPhase =
|
|
||||||
let
|
|
||||||
dest = "$out/share/doc/${name}-manual";
|
|
||||||
in
|
|
||||||
''
|
|
||||||
mkdir -p ${dest}
|
|
||||||
cp -r _build/html ${dest}/
|
|
||||||
|
|
||||||
mkdir -p $out/nix-support/
|
|
||||||
echo doc manual ${dest}/html index.html >> $out/nix-support/hydra-build-products
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
})
|
|
||||||
);
|
|
||||||
# https://github.com/m-labs/artiq/issues/23
|
|
||||||
hidapi = pkgs.hidapi.overrideAttrs (oa: {
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "signal11";
|
|
||||||
repo = "hidapi";
|
|
||||||
rev = "a6a622ffb680c55da0de787ff93b80280498330f";
|
|
||||||
sha256 = "17n7c4v3jjrnzqwxpflggxjn6vkzscb32k4kmxqjbfvjqnx7qp7j";
|
|
||||||
};
|
|
||||||
});
|
|
||||||
in
|
|
||||||
(dualPackage {
|
|
||||||
name = "korad_ka3005p";
|
|
||||||
version = "1.1";
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "m-labs";
|
|
||||||
repo = "korad_ka3005p";
|
|
||||||
rev = "a1898409cb188b388ed1cf84e76ca69e9c8a74eb";
|
|
||||||
sha256 = "0h20qss70nssqiagc2fx75mravq1pji7rizhag3nq8xrcz2w20nc";
|
|
||||||
};
|
|
||||||
pythonOptions = { propagatedBuildInputs = [ sipyco asyncserial ]; };
|
|
||||||
condaOptions = { dependencies = [ "sipyco" "asyncserial" ]; };
|
|
||||||
}) // (dualPackage {
|
|
||||||
name = "novatech409b";
|
|
||||||
version = "1.1";
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "m-labs";
|
|
||||||
repo = "novatech409b";
|
|
||||||
rev = "3bd559753972f07d881df66b7c6819afc5436053";
|
|
||||||
sha256 = "1g9qv6fn5h7d393mb1v7w8sg6fimqg34blqdj22qnayb4agw1wyg";
|
|
||||||
};
|
|
||||||
pythonOptions = { propagatedBuildInputs = [ sipyco asyncserial ]; };
|
|
||||||
condaOptions = { dependencies = [ "sipyco" "asyncserial" ]; };
|
|
||||||
}) // (dualPackage {
|
|
||||||
name = "lda";
|
|
||||||
version = "1.1";
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "m-labs";
|
|
||||||
repo = "lda";
|
|
||||||
rev = "e6bf828b6dfd7fbf59b61b691712736c98c95970";
|
|
||||||
sha256 = "1w4ykzsl3386bz4ggpd6i60b6a3k7rnc6qjw59xm3hk0vs3w2vyn";
|
|
||||||
};
|
|
||||||
pythonOptions = {
|
|
||||||
propagatedBuildInputs = [ sipyco ];
|
|
||||||
postPatch = ''
|
|
||||||
substituteInPlace lda/hidapi.py \
|
|
||||||
--replace "hidapi_lib_path = None"\
|
|
||||||
"hidapi_lib_path = '${hidapi}/lib/libhidapi-libusb.so.0'"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
condaOptions = { dependencies = [ "sipyco" ]; };
|
|
||||||
}) // (dualPackage {
|
|
||||||
name = "thorlabs_tcube";
|
|
||||||
version = "1.1";
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "m-labs";
|
|
||||||
repo = "thorlabs_tcube";
|
|
||||||
rev = "0cb0c15fc7e660a150e193245f5338d48f8b97db";
|
|
||||||
sha256 = "1n4zmjcj2kpd97217y602pq6x8s80w39fgyi6qjmal92aicqdg07";
|
|
||||||
};
|
|
||||||
pythonOptions = { propagatedBuildInputs = [ sipyco asyncserial ]; };
|
|
||||||
condaOptions = { dependencies = [ "sipyco" "asyncserial" ]; };
|
|
||||||
}) // (dualPackage {
|
|
||||||
name = "newfocus8742";
|
|
||||||
version = "0.2";
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "quartiq";
|
|
||||||
repo = "newfocus8742";
|
|
||||||
rev = "9f6092b724b33b934aa4d3a1d6a20c295cd1d02d";
|
|
||||||
sha256 = "0qf05ghylnqf3l5vjx5dc748wi84xn6p6lb6f9r8p6f1z7z67fb8";
|
|
||||||
};
|
|
||||||
pythonOptions = {
|
|
||||||
propagatedBuildInputs = [ sipyco pkgs.python3Packages.pyusb ];
|
|
||||||
# no unit tests so do a simple smoke test
|
|
||||||
checkPhase = "python -m newfocus8742.aqctl_newfocus8742 -h";
|
|
||||||
};
|
|
||||||
condaOptions = { dependencies = [ "sipyco" ]; };
|
|
||||||
}) // (dualPackage {
|
|
||||||
name = "hut2";
|
|
||||||
version = "0.2";
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "quartiq";
|
|
||||||
repo = "hut2";
|
|
||||||
rev = "68369d5d63d233827840a9a752d90454a4e03baa";
|
|
||||||
sha256 = "0r832c0icz8v3w27ci13024bqfslj1gx6dwhjv11ksw229xdcghd";
|
|
||||||
};
|
|
||||||
pythonOptions = {
|
|
||||||
propagatedBuildInputs = [ sipyco ];
|
|
||||||
# no unit tests without hardware so do a simple smoke test
|
|
||||||
checkPhase = "python -m hut2.aqctl_hut2 -h";
|
|
||||||
};
|
|
||||||
condaOptions = { dependencies = [ "sipyco" ]; };
|
|
||||||
}) // rec {
|
|
||||||
toptica-lasersdk = pkgs.python3Packages.buildPythonPackage rec {
|
|
||||||
version = "2.0.0";
|
|
||||||
name = "toptica-lasersdk-${version}";
|
|
||||||
format = "wheel";
|
|
||||||
src = pkgs.fetchurl {
|
|
||||||
url = "https://files.pythonhosted.org/packages/6b/e2/5c98407215884c2570453a78bc0d6f0bbe619f06593847ccd6a2f1d3fe59/toptica_lasersdk-2.0.0-py3-none-any.whl";
|
|
||||||
sha256 = "1k5d9ah8qzp75hh63nh9l5dk808v9ybpmzlhrdc3sxmas3ajv8s7";
|
|
||||||
};
|
|
||||||
propagatedBuildInputs = [ pkgs.python3Packages.pyserial ];
|
|
||||||
};
|
|
||||||
toptica-lasersdk-artiq = pkgs.python3Packages.buildPythonPackage rec {
|
|
||||||
version = "0.2";
|
|
||||||
name = "toptica-lasersdk-artiq-${version}";
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "quartiq";
|
|
||||||
repo = "lasersdk-artiq";
|
|
||||||
rev = "901dec13a1bf9429ce7ab49be34b03d1c49b8a9f";
|
|
||||||
sha256 = "0lqxvgvpgrpw1kzhg5axnfb40ils2vdk75r43hqmk2lfz4sydwb2";
|
|
||||||
};
|
|
||||||
postPatch = ''
|
|
||||||
substituteInPlace lasersdk_artiq/aqctl_laser.py \
|
|
||||||
--replace "toptica.lasersdk.async.client" \
|
|
||||||
"toptica.lasersdk.asyncio.client"
|
|
||||||
substituteInPlace lasersdk_artiq/test.py \
|
|
||||||
--replace "toptica.lasersdk.async.client" \
|
|
||||||
"toptica.lasersdk.asyncio.client"
|
|
||||||
'';
|
|
||||||
propagatedBuildInputs = [ sipyco toptica-lasersdk ];
|
|
||||||
};
|
|
||||||
conda-toptica-lasersdk-artiq = condaBuild {
|
|
||||||
name = "conda-toptica-lasersdk-artiq";
|
|
||||||
src = condaFakeSource {
|
|
||||||
name = "toptica-lasersdk-artiq";
|
|
||||||
inherit (toptica-lasersdk-artiq) version src;
|
|
||||||
dependencies = [ "sipyco" "lasersdk =1.3.1" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
} // (dualPackage {
|
|
||||||
name = "highfinesse-net";
|
|
||||||
version = "0.2";
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "quartiq";
|
|
||||||
repo = "highfinesse-net";
|
|
||||||
rev = "a9cc049c9846845d2b2d8662266ec11fe770abee";
|
|
||||||
sha256 = "01mk4gf6rk3jqpz4y7m35vawjybvyp26bizz5a4ygkb8dq5l51g4";
|
|
||||||
};
|
|
||||||
pythonOptions = {
|
|
||||||
propagatedBuildInputs = [ sipyco ];
|
|
||||||
# no unit tests without hardware so do a simple smoke test
|
|
||||||
checkPhase = "python -m highfinesse_net.aqctl_highfinesse_net -h";
|
|
||||||
};
|
|
||||||
condaOptions = { dependencies = [ "sipyco" ]; };
|
|
||||||
}) // rec {
|
|
||||||
artiq-comtools = pkgs.python3Packages.buildPythonPackage rec {
|
|
||||||
name = "artiq-comtools-${version}";
|
|
||||||
version = "1.1";
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "m-labs";
|
|
||||||
repo = "artiq-comtools";
|
|
||||||
rev = "v${version}";
|
|
||||||
sha256 = "165j12k9nnrkf2pv0idcv6xhnp1hnsllna4rps2dssnqgjfaw1ss";
|
|
||||||
};
|
|
||||||
propagatedBuildInputs = [ sipyco pkgs.python3Packages.numpy pkgs.python3Packages.aiohttp ];
|
|
||||||
# Modifies PATH to pass the wrapped python environment (i.e. python3.withPackages(...) to subprocesses.
|
|
||||||
# Allows subprocesses using python to find all packages you have installed
|
|
||||||
makeWrapperArgs = [ ''--run 'if [ ! -z "$NIX_PYTHONPREFIX" ]; then export PATH=$NIX_PYTHONPREFIX/bin:$PATH;fi' '' ];
|
|
||||||
};
|
|
||||||
conda-artiq-comtools = condaBuild {
|
|
||||||
name = "conda-artiq-comtools";
|
|
||||||
src = condaFakeSource {
|
|
||||||
name = "artiq-comtools";
|
|
||||||
inherit (artiq-comtools) version src;
|
|
||||||
dependencies = [ "sipyco" "numpy" "aiohttp >=3" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
} // {
|
|
||||||
wand = pkgs.python3Packages.buildPythonApplication rec {
|
|
||||||
name = "wand";
|
|
||||||
version = "0.4.dev";
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "OxfordIonTrapGroup";
|
|
||||||
repo = "wand";
|
|
||||||
rev = "0bf1cfef4aa37e5761c20ac8702abec125b45e23";
|
|
||||||
sha256 = "0jfw6w6id7qkx2f6rklrmp13b2hsnvii1qbls60ampx399lcb43g";
|
|
||||||
};
|
|
||||||
patches = [ ./wand-fix-config-dir.patch ];
|
|
||||||
nativeBuildInputs = [ pkgs.qt5.wrapQtAppsHook ];
|
|
||||||
dontWrapQtApps = true;
|
|
||||||
postFixup = ''
|
|
||||||
wrapQtApp "$out/bin/wand_gui"
|
|
||||||
'';
|
|
||||||
propagatedBuildInputs = with pkgs.python3Packages; [ artiq quamash numpy scipy influxdb setuptools ];
|
|
||||||
};
|
|
||||||
} // (dualPackage {
|
|
||||||
name = "flake8-artiq";
|
|
||||||
version = "0.1.0";
|
|
||||||
withManual = false;
|
|
||||||
src = pkgs.fetchgit {
|
|
||||||
url = "https://gitlab.com/duke-artiq/flake8-artiq.git";
|
|
||||||
rev = "3d011bdadc41bb5d4b7e536fbfdb3744d9d9a6de";
|
|
||||||
sha256 = "1i6vk2j97fr1fnm6lzi5n33l6ldvcyfjgfxgr59pcpbz6xhbbgp2";
|
|
||||||
};
|
|
||||||
pythonOptions = {
|
|
||||||
propagatedBuildInputs = [ pkgs.python3Packages.flake8 ];
|
|
||||||
checkInputs = [ pkgs.python3Packages.pytest pkgs.python3Packages.mypy pkgs.python3Packages.flake8 ];
|
|
||||||
checkPhase =
|
|
||||||
''
|
|
||||||
pytest
|
|
||||||
mypy
|
|
||||||
flake8
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
condaOptions = { dependencies = [ "flake8" ]; };
|
|
||||||
})
|
|
@ -1,24 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
#
|
|
||||||
# Encodes data like ARTIQ build_soc.py ReprogrammableIdentifier
|
|
||||||
|
|
||||||
import sys
|
|
||||||
|
|
||||||
if len(sys.argv) != 2:
|
|
||||||
raise ValueError('argument missing')
|
|
||||||
|
|
||||||
identifier_str = sys.argv[1]
|
|
||||||
contents = list(identifier_str.encode())
|
|
||||||
l = len(contents)
|
|
||||||
if l > 255:
|
|
||||||
raise ValueError("Identifier string must be 255 characters or less")
|
|
||||||
contents.insert(0, l)
|
|
||||||
|
|
||||||
f = sys.stdout
|
|
||||||
f.write("[\n");
|
|
||||||
for i in range(7):
|
|
||||||
init = sum(1 << j if c & (1 << i) else 0 for j, c in enumerate(contents))
|
|
||||||
f.write(
|
|
||||||
' {{ cell = "identifier_str{}"; init = "256\'h{:X}"; }}\n'.format(i, init)
|
|
||||||
)
|
|
||||||
f.write("]\n");
|
|
@ -1,43 +0,0 @@
|
|||||||
{ pkgs }:
|
|
||||||
|
|
||||||
rec {
|
|
||||||
wavedrom = pkgs.python3Packages.buildPythonPackage rec {
|
|
||||||
pname = "wavedrom";
|
|
||||||
version = "2.0.3.post2";
|
|
||||||
|
|
||||||
src = pkgs.python3Packages.fetchPypi {
|
|
||||||
inherit pname version;
|
|
||||||
sha256 = "13a4086417nv836s2wbj3f4r31gwapbyw5smgl00jsqizwsk96r3";
|
|
||||||
};
|
|
||||||
|
|
||||||
buildInputs = [ pkgs.python3Packages.setuptools_scm ];
|
|
||||||
propagatedBuildInputs = with pkgs.python3Packages; [ svgwrite attrdict ];
|
|
||||||
doCheck = false;
|
|
||||||
|
|
||||||
meta = with pkgs.lib; {
|
|
||||||
description = "WaveDrom compatible Python module and command line";
|
|
||||||
homepage = "https://pypi.org/project/wavedrom/";
|
|
||||||
license = licenses.mit;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
sphinxcontrib-wavedrom = pkgs.python3Packages.buildPythonPackage rec {
|
|
||||||
pname = "sphinxcontrib-wavedrom";
|
|
||||||
version = "2.1.1";
|
|
||||||
|
|
||||||
src = pkgs.python3Packages.fetchPypi {
|
|
||||||
inherit pname version;
|
|
||||||
sha256 = "09xq4csdcil2x8mm38yd5k6lfbkazicvm278xnzwbfc9vghkqqs2";
|
|
||||||
};
|
|
||||||
|
|
||||||
buildInputs = [ pkgs.python3Packages.setuptools_scm ];
|
|
||||||
propagatedBuildInputs = [ wavedrom ] ++ (with pkgs.python3Packages; [ sphinx xcffib cairosvg ]);
|
|
||||||
doCheck = false;
|
|
||||||
|
|
||||||
meta = with pkgs.lib; {
|
|
||||||
description = "A Sphinx extension that allows including WaveDrom diagrams";
|
|
||||||
homepage = "https://pypi.org/project/sphinxcontrib-wavedrom/";
|
|
||||||
license = licenses.mit;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,56 +0,0 @@
|
|||||||
{ stdenv, lib, python3Packages, texlive, texinfo, sipyco }:
|
|
||||||
|
|
||||||
let
|
|
||||||
version = sipyco.version;
|
|
||||||
|
|
||||||
isLatexPdfTarget = target: builtins.match "latexpdf.*" target != null;
|
|
||||||
|
|
||||||
latex = texlive.combine {
|
|
||||||
inherit (texlive)
|
|
||||||
scheme-basic latexmk cmap collection-fontsrecommended fncychap
|
|
||||||
titlesec tabulary varwidth framed fancyvrb float wrapfig parskip
|
|
||||||
upquote capt-of needspace etoolbox;
|
|
||||||
};
|
|
||||||
|
|
||||||
sipyco-manual = target: stdenv.mkDerivation rec {
|
|
||||||
name = "sipyco-manual-${target}-${version}";
|
|
||||||
inherit version;
|
|
||||||
|
|
||||||
src = sipyco.src;
|
|
||||||
buildInputs = [
|
|
||||||
python3Packages.sphinx python3Packages.sphinx_rtd_theme
|
|
||||||
python3Packages.sphinx-argparse sipyco
|
|
||||||
] ++
|
|
||||||
lib.optional (isLatexPdfTarget target) latex ++
|
|
||||||
lib.optional (target == "texinfo") texinfo;
|
|
||||||
|
|
||||||
preBuild = ''
|
|
||||||
export SOURCE_DATE_EPOCH=`cat TIMESTAMP`
|
|
||||||
cd doc
|
|
||||||
'';
|
|
||||||
makeFlags = [ target ];
|
|
||||||
|
|
||||||
installPhase =
|
|
||||||
let
|
|
||||||
dest = "$out/share/doc/sipyco-manual";
|
|
||||||
in
|
|
||||||
if isLatexPdfTarget target
|
|
||||||
then ''
|
|
||||||
mkdir -p ${dest}
|
|
||||||
cp _build/latex/SiPyCo.pdf ${dest}/
|
|
||||||
|
|
||||||
mkdir -p $out/nix-support/
|
|
||||||
echo doc-pdf manual ${dest} SiPyCo.pdf >> $out/nix-support/hydra-build-products
|
|
||||||
''
|
|
||||||
else ''
|
|
||||||
mkdir -p ${dest}
|
|
||||||
cp -r _build/${target} ${dest}/
|
|
||||||
|
|
||||||
mkdir -p $out/nix-support/
|
|
||||||
echo doc manual ${dest}/${target} index.html >> $out/nix-support/hydra-build-products
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
targets = [ "html" "latexpdf" ];
|
|
||||||
in
|
|
||||||
builtins.listToAttrs (map (target: { name = "sipyco-manual-${target}"; value = sipyco-manual target; }) targets)
|
|
@ -1,30 +0,0 @@
|
|||||||
diff --git a/wand/tools.py b/wand/tools.py
|
|
||||||
index a51dabd..4d5a9d1 100644
|
|
||||||
--- a/wand/tools.py
|
|
||||||
+++ b/wand/tools.py
|
|
||||||
@@ -6,6 +6,7 @@ import shutil
|
|
||||||
import logging
|
|
||||||
|
|
||||||
from sipyco import pyon
|
|
||||||
+from artiq.appdirs import user_config_dir
|
|
||||||
import wand
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
|
||||||
@@ -26,10 +27,15 @@ class LockException(Exception):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
+def get_user_config_dir():
|
|
||||||
+ dir = user_config_dir("wand", "oitg", "1")
|
|
||||||
+ os.makedirs(dir, exist_ok=True)
|
|
||||||
+ return dir
|
|
||||||
+
|
|
||||||
+
|
|
||||||
def get_config_path(args, name_suffix=""):
|
|
||||||
config_file = "{}{}_config.pyon".format(args.name, name_suffix)
|
|
||||||
- wand_dir = os.path.dirname(wand.__file__)
|
|
||||||
- config_path = os.path.join(wand_dir, config_file)
|
|
||||||
+ config_path = os.path.join(get_user_config_dir(), config_file)
|
|
||||||
|
|
||||||
if args.backup_dir == "":
|
|
||||||
backup_path = ""
|
|
@ -1,21 +1,21 @@
|
|||||||
# Install Vivado in /opt and add to /etc/nixos/configuration.nix:
|
# Install Vivado in /opt and add to /etc/nixos/configuration.nix:
|
||||||
# nix.sandboxPaths = ["/opt"];
|
# nix.sandboxPaths = ["/opt"];
|
||||||
|
|
||||||
{ pkgs
|
{ pkgs }:
|
||||||
, vivado ? import ./vivado.nix { inherit pkgs; }
|
{ target
|
||||||
}:
|
, variant
|
||||||
|
, buildCommand ? "python -m artiq.gateware.targets.${target} -V ${variant}"
|
||||||
|
, extraInstallCommands ? ""}:
|
||||||
|
|
||||||
let
|
let
|
||||||
artiqSrc = import ./pkgs/artiq-src.nix { fetchgit = pkgs.fetchgit; };
|
|
||||||
artiqpkgs = import ./default.nix { inherit pkgs; };
|
|
||||||
fetchcargo = import ./fetchcargo.nix {
|
fetchcargo = import ./fetchcargo.nix {
|
||||||
inherit (pkgs) stdenv lib cacert git;
|
inherit (pkgs) stdenv cacert git cargo cargo-vendor;
|
||||||
inherit (artiqpkgs) cargo cargo-vendor;
|
|
||||||
};
|
};
|
||||||
|
artiqSrc = import ./pkgs/artiq-src.nix { fetchgit = pkgs.fetchgit; };
|
||||||
cargoDeps = fetchcargo rec {
|
cargoDeps = fetchcargo rec {
|
||||||
name = "artiq-firmware-cargo-deps";
|
name = "artiq-firmware-cargo-deps";
|
||||||
src = "${artiqSrc}/artiq/firmware";
|
src = "${artiqSrc}/artiq/firmware";
|
||||||
sha256 = (import "${artiqSrc}/artiq/firmware/cargosha256.nix");
|
sha256 = "1xzjn9i4rkd9124v2gbdplsgsvp1hlx7czdgc58n316vsnrkbr86";
|
||||||
};
|
};
|
||||||
|
|
||||||
cargoVendored = pkgs.stdenv.mkDerivation {
|
cargoVendored = pkgs.stdenv.mkDerivation {
|
||||||
@ -42,43 +42,26 @@ let
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
in
|
buildenv = import ./artiq-dev.nix { inherit pkgs; };
|
||||||
{ target
|
|
||||||
, variant
|
|
||||||
, src ? null
|
|
||||||
, buildCommand ? "python -m artiq.gateware.targets.${target} -V ${variant}"
|
|
||||||
, extraInstallCommands ? ""
|
|
||||||
, ... }:
|
|
||||||
|
|
||||||
# Board packages are Python modules so that they get added to the ARTIQ Python
|
in pkgs.python3Packages.buildPythonPackage rec {
|
||||||
# environment, and artiq_flash finds them.
|
|
||||||
pkgs.python3Packages.toPythonModule (pkgs.stdenv.mkDerivation rec {
|
|
||||||
name = "artiq-board-${target}-${variant}-${version}";
|
name = "artiq-board-${target}-${variant}-${version}";
|
||||||
version = import ./pkgs/artiq-version.nix (with pkgs; { inherit stdenv fetchgit git; });
|
version = import ./pkgs/artiq-version.nix (with pkgs; { inherit stdenv fetchgit git; });
|
||||||
inherit src;
|
phases = [ "buildPhase" "installCheckPhase" "installPhase" ];
|
||||||
phases = [ "buildPhase" "installCheckPhase" "installPhase" "checkPhase" ];
|
|
||||||
nativeBuildInputs = [
|
|
||||||
vivado
|
|
||||||
pkgs.gnumake
|
|
||||||
artiqpkgs.cargo
|
|
||||||
artiqpkgs.rustc
|
|
||||||
artiqpkgs.binutils-or1k
|
|
||||||
artiqpkgs.llvm-or1k
|
|
||||||
];
|
|
||||||
buildInputs = [ (pkgs.python3.withPackages(ps: with ps; [ jinja2 numpy artiqpkgs.migen artiqpkgs.microscope artiqpkgs.misoc artiqpkgs.jesd204b artiqpkgs.artiq ])) ];
|
|
||||||
buildPhase =
|
buildPhase =
|
||||||
''
|
''
|
||||||
export CARGO_HOME=${cargoVendored}
|
${buildenv}/bin/artiq-dev -c "export CARGO_HOME=${cargoVendored}; ${buildCommand}"
|
||||||
export TARGET_AR=or1k-linux-ar
|
|
||||||
${buildCommand}
|
|
||||||
'';
|
'';
|
||||||
# temporarily disabled because there is currently always at least one Kasli bitstream
|
|
||||||
# that fails timing and blocks the conda channel.
|
|
||||||
doCheck = false;
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
# Search for PCREs in the Vivado output to check for errors
|
# Search for PCREs in the Vivado output to check for errors
|
||||||
check_log() {
|
check_log() {
|
||||||
grep -Pe "$1" artiq_${target}/${variant}/gateware/vivado.log && exit 1 || true
|
set +e
|
||||||
|
grep -Pe "$1" artiq_${target}/${variant}/gateware/vivado.log
|
||||||
|
FOUND=$?
|
||||||
|
set -e
|
||||||
|
if [ $FOUND != 1 ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
check_log "\d+ constraint not met\."
|
check_log "\d+ constraint not met\."
|
||||||
check_log "Timing constraints are not met\."
|
check_log "Timing constraints are not met\."
|
||||||
@ -88,15 +71,11 @@ pkgs.python3Packages.toPythonModule (pkgs.stdenv.mkDerivation rec {
|
|||||||
TARGET_DIR=$out/${pkgs.python3Packages.python.sitePackages}/artiq/board-support/${target}-${variant}
|
TARGET_DIR=$out/${pkgs.python3Packages.python.sitePackages}/artiq/board-support/${target}-${variant}
|
||||||
mkdir -p $TARGET_DIR
|
mkdir -p $TARGET_DIR
|
||||||
cp artiq_${target}/${variant}/gateware/top.bit $TARGET_DIR
|
cp artiq_${target}/${variant}/gateware/top.bit $TARGET_DIR
|
||||||
if [ -e artiq_${target}/${variant}/software/bootloader/bootloader.bin ]
|
cp artiq_${target}/${variant}/software/bootloader/bootloader.bin $TARGET_DIR
|
||||||
then cp artiq_${target}/${variant}/software/bootloader/bootloader.bin $TARGET_DIR
|
|
||||||
fi
|
|
||||||
if [ -e artiq_${target}/${variant}/software/runtime ]
|
if [ -e artiq_${target}/${variant}/software/runtime ]
|
||||||
then cp artiq_${target}/${variant}/software/runtime/runtime.{elf,fbi} $TARGET_DIR
|
then cp artiq_${target}/${variant}/software/runtime/runtime.{elf,fbi} $TARGET_DIR
|
||||||
else cp artiq_${target}/${variant}/software/satman/satman.{elf,fbi} $TARGET_DIR
|
else cp artiq_${target}/${variant}/software/satman/satman.{elf,fbi} $TARGET_DIR
|
||||||
fi
|
fi
|
||||||
${extraInstallCommands}
|
${extraInstallCommands}
|
||||||
'';
|
'';
|
||||||
# don't mangle ELF files as they are not for NixOS
|
}
|
||||||
dontFixup = true;
|
|
||||||
})
|
|
35
artiq/artiq-dev.nix
Normal file
35
artiq/artiq-dev.nix
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
{ pkgs }:
|
||||||
|
|
||||||
|
let
|
||||||
|
artiqpkgs = import ./default.nix { inherit pkgs; };
|
||||||
|
in
|
||||||
|
pkgs.buildFHSUserEnv {
|
||||||
|
name = "artiq-dev";
|
||||||
|
targetPkgs = pkgs: (
|
||||||
|
with pkgs; [
|
||||||
|
ncurses5
|
||||||
|
gnumake
|
||||||
|
zlib
|
||||||
|
libuuid
|
||||||
|
xorg.libSM
|
||||||
|
xorg.libICE
|
||||||
|
xorg.libXrender
|
||||||
|
xorg.libX11
|
||||||
|
xorg.libXext
|
||||||
|
xorg.libXtst
|
||||||
|
xorg.libXi
|
||||||
|
(python3.withPackages(ps: with ps; [ jinja2 numpy paramiko artiqpkgs.migen artiqpkgs.microscope artiqpkgs.misoc artiqpkgs.jesd204b artiqpkgs.artiq ]))
|
||||||
|
git
|
||||||
|
cargo
|
||||||
|
] ++
|
||||||
|
(with artiqpkgs; [
|
||||||
|
rustc
|
||||||
|
binutils-or1k
|
||||||
|
llvm-or1k
|
||||||
|
openocd
|
||||||
|
])
|
||||||
|
);
|
||||||
|
profile = ''
|
||||||
|
export TARGET_AR=${artiqpkgs.binutils-or1k}/bin/or1k-linux-ar
|
||||||
|
'';
|
||||||
|
}
|
172
artiq/artiq-extras.nix
Normal file
172
artiq/artiq-extras.nix
Normal file
@ -0,0 +1,172 @@
|
|||||||
|
{ pkgs, asyncserial, artiq }:
|
||||||
|
let
|
||||||
|
dualPackage = (
|
||||||
|
{ name, version, src, pythonOptions ? {}, condaOptions ? {}}:
|
||||||
|
{
|
||||||
|
"${name}" = pkgs.python3Packages.buildPythonPackage ({
|
||||||
|
inherit version;
|
||||||
|
name = "${name}-${version}";
|
||||||
|
inherit src;
|
||||||
|
} // pythonOptions);
|
||||||
|
"${name}-manual-html" = pkgs.stdenv.mkDerivation {
|
||||||
|
name = "${name}-manual-html-${version}";
|
||||||
|
inherit version src;
|
||||||
|
buildInputs = (with pkgs.python3Packages; [ sphinx sphinx_rtd_theme sphinx-argparse ]) ++ [ artiq ];
|
||||||
|
preBuild = ''
|
||||||
|
export SOURCE_DATE_EPOCH=${with pkgs; import ./pkgs/artiq-timestamp.nix { inherit stdenv fetchgit git; }}
|
||||||
|
cd doc
|
||||||
|
'';
|
||||||
|
makeFlags = [ "html" ];
|
||||||
|
installPhase =
|
||||||
|
let
|
||||||
|
dest = "$out/share/doc/${name}-manual";
|
||||||
|
in
|
||||||
|
''
|
||||||
|
mkdir -p ${dest}
|
||||||
|
cp -r _build/html ${dest}/
|
||||||
|
|
||||||
|
mkdir -p $out/nix-support/
|
||||||
|
echo doc manual ${dest}/html index.html >> $out/nix-support/hydra-build-products
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
"conda-${name}" = import ./conda-build.nix { inherit pkgs; } {
|
||||||
|
name = "conda-${name}";
|
||||||
|
src = import ./conda-fake-source.nix { inherit pkgs; } ({
|
||||||
|
inherit name version src;
|
||||||
|
} // condaOptions);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
# https://github.com/m-labs/artiq/issues/23
|
||||||
|
hidapi = pkgs.hidapi.overrideAttrs (oa: {
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "signal11";
|
||||||
|
repo = "hidapi";
|
||||||
|
rev = "a6a622ffb680c55da0de787ff93b80280498330f";
|
||||||
|
sha256 = "17n7c4v3jjrnzqwxpflggxjn6vkzscb32k4kmxqjbfvjqnx7qp7j";
|
||||||
|
};
|
||||||
|
});
|
||||||
|
in
|
||||||
|
(dualPackage {
|
||||||
|
name = "korad_ka3005p";
|
||||||
|
version = "1.0";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "m-labs";
|
||||||
|
repo = "korad_ka3005p";
|
||||||
|
rev = "e8c02ade175b842972f76a27919a4aaf8190de90";
|
||||||
|
sha256 = "1svgnx52amvy9xl0b2wkz0ii4ycjvjv96ac0g07zkxabdqm5ff65";
|
||||||
|
};
|
||||||
|
pythonOptions = { propagatedBuildInputs = [ asyncserial artiq ]; };
|
||||||
|
condaOptions = { dependencies = [ "asyncserial" ]; };
|
||||||
|
}) // (dualPackage {
|
||||||
|
name = "novatech409b";
|
||||||
|
version = "1.0";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "m-labs";
|
||||||
|
repo = "novatech409b";
|
||||||
|
rev = "442e82e2234c0bf951da2084a77861f8977755c8";
|
||||||
|
sha256 = "032qgg48dy2k31vj0q8bfni0iy2kcyscd32bq60h701wvass6jv7";
|
||||||
|
};
|
||||||
|
pythonOptions = { propagatedBuildInputs = [ asyncserial artiq ]; };
|
||||||
|
condaOptions = { dependencies = [ "asyncserial" ]; };
|
||||||
|
}) // (dualPackage {
|
||||||
|
name = "lda";
|
||||||
|
version = "1.0";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "m-labs";
|
||||||
|
repo = "lda";
|
||||||
|
rev = "4329da1497f496839ce20beebce0d79ed453941f";
|
||||||
|
sha256 = "00c15a03xy9vbca0j2zfy89l3ghbdmmv5wqfksm6pdwy4z036cwa";
|
||||||
|
};
|
||||||
|
pythonOptions = {
|
||||||
|
propagatedBuildInputs = [ artiq ];
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace lda/hidapi.py \
|
||||||
|
--replace "hidapi_lib_path = None"\
|
||||||
|
"hidapi_lib_path = '${hidapi}/lib/libhidapi-libusb.so.0'"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}) // (dualPackage {
|
||||||
|
name = "thorlabs_tcube";
|
||||||
|
version = "1.0";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "m-labs";
|
||||||
|
repo = "thorlabs_tcube";
|
||||||
|
rev = "b72e7ba7de8355bd93dd20d53b6f15386dff229d";
|
||||||
|
sha256 = "1lqwqflwbfdykmhf6g0pwgiq7i2vf67ybj4l8n3jn16vny21b41s";
|
||||||
|
};
|
||||||
|
pythonOptions = { propagatedBuildInputs = [ asyncserial artiq ]; };
|
||||||
|
condaOptions = { dependencies = [ "asyncserial" ]; };
|
||||||
|
}) // (dualPackage {
|
||||||
|
name = "newfocus8742";
|
||||||
|
version = "0.1";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "quartiq";
|
||||||
|
repo = "newfocus8742";
|
||||||
|
rev = "31a92595d1cb77d9256b891ec17eed0fbeceb1bc";
|
||||||
|
sha256 = "1dww0y83d4i6nma1q5hnaagih94c32bxlla5p6a5a8zkc4x2pky9";
|
||||||
|
};
|
||||||
|
pythonOptions = {
|
||||||
|
propagatedBuildInputs = [ pkgs.python3Packages.pyusb artiq ];
|
||||||
|
# no unit tests so do a simple smoke test
|
||||||
|
checkPhase = "python -m newfocus8742.aqctl_newfocus8742 --version";
|
||||||
|
};
|
||||||
|
}) // (dualPackage {
|
||||||
|
name = "hut2";
|
||||||
|
version = "0.1";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "quartiq";
|
||||||
|
repo = "hut2";
|
||||||
|
rev = "acfd62dcd60d37250e2d1b691344c6e65b6e83eb";
|
||||||
|
sha256 = "0dpx3c5aclj7gki6iaybjbx9rqrxnwccpxcvjwp594ccbcswvclr";
|
||||||
|
};
|
||||||
|
pythonOptions = {
|
||||||
|
propagatedBuildInputs = [ artiq ];
|
||||||
|
# no unit tests without hardware so do a simple smoke test
|
||||||
|
checkPhase = "python -m hut2.aqctl_hut2 --version";
|
||||||
|
};
|
||||||
|
}) // rec {
|
||||||
|
toptica-lasersdk = pkgs.python3Packages.buildPythonPackage rec {
|
||||||
|
version = "2.0.0";
|
||||||
|
name = "toptica-lasersdk-${version}";
|
||||||
|
format = "wheel";
|
||||||
|
src = pkgs.fetchurl {
|
||||||
|
url = "https://files.pythonhosted.org/packages/6b/e2/5c98407215884c2570453a78bc0d6f0bbe619f06593847ccd6a2f1d3fe59/toptica_lasersdk-2.0.0-py3-none-any.whl";
|
||||||
|
sha256 = "1k5d9ah8qzp75hh63nh9l5dk808v9ybpmzlhrdc3sxmas3ajv8s7";
|
||||||
|
};
|
||||||
|
propagatedBuildInputs = [ pkgs.python3Packages.pyserial ];
|
||||||
|
};
|
||||||
|
toptica-lasersdk-artiq = pkgs.python3Packages.buildPythonPackage rec {
|
||||||
|
version = "0.1";
|
||||||
|
name = "toptica-lasersdk-artiq-${version}";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "quartiq";
|
||||||
|
repo = "lasersdk-artiq";
|
||||||
|
rev = "d38bb985e7ddffc9ac9d94fe136cac10947bfd72";
|
||||||
|
sha256 = "03a09lc81l2l787yjm0xjpnjvs5x77ndmks3xxh25yyxdhsdf1fl";
|
||||||
|
};
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace lasersdk_artiq/aqctl_laser.py \
|
||||||
|
--replace "toptica.lasersdk.async.client" \
|
||||||
|
"toptica.lasersdk.asyncio.client"
|
||||||
|
substituteInPlace lasersdk_artiq/test.py \
|
||||||
|
--replace "toptica.lasersdk.async.client" \
|
||||||
|
"toptica.lasersdk.asyncio.client"
|
||||||
|
'';
|
||||||
|
propagatedBuildInputs = [ toptica-lasersdk artiq ];
|
||||||
|
};
|
||||||
|
} // (dualPackage {
|
||||||
|
name = "highfinesse-net";
|
||||||
|
version = "0.1";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "quartiq";
|
||||||
|
repo = "highfinesse-net";
|
||||||
|
rev = "6864ae5da5cbc67953b968010115db951e52a272";
|
||||||
|
sha256 = "1k8xacgam5xghxvljvdzpsdhhq86fra13hkvdy7y301s9nyp30s4";
|
||||||
|
};
|
||||||
|
pythonOptions = {
|
||||||
|
propagatedBuildInputs = [ artiq ];
|
||||||
|
# no unit tests without hardware so do a simple smoke test
|
||||||
|
checkPhase = "python -m highfinesse_net.aqctl_highfinesse_net --version";
|
||||||
|
};
|
||||||
|
})
|
@ -4,7 +4,7 @@
|
|||||||
with pkgs;
|
with pkgs;
|
||||||
|
|
||||||
let
|
let
|
||||||
version = import ./fast/pkgs/artiq-version.nix (with pkgs; { inherit stdenv fetchgit git; });
|
version = import ./pkgs/artiq-version.nix (with pkgs; { inherit stdenv fetchgit git; });
|
||||||
fakeCondaSource = runCommand "fake-condasrc-artiq-board-${target}-${variant}" { }
|
fakeCondaSource = runCommand "fake-condasrc-artiq-board-${target}-${variant}" { }
|
||||||
''
|
''
|
||||||
mkdir -p $out/fake-conda;
|
mkdir -p $out/fake-conda;
|
||||||
@ -28,7 +28,7 @@ let
|
|||||||
about:
|
about:
|
||||||
home: https://m-labs.hk/artiq
|
home: https://m-labs.hk/artiq
|
||||||
license: LGPL
|
license: LGPL
|
||||||
summary: 'Bitstream, bootloader and firmware for the ${target}-${variant} board variant'
|
summary: 'Bitstream, BIOS and firmware for the ${target}-${variant} board variant'
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat << EOF > $out/fake-conda/build.sh
|
cat << EOF > $out/fake-conda/build.sh
|
||||||
@ -40,7 +40,7 @@ let
|
|||||||
EOF
|
EOF
|
||||||
chmod 755 $out/fake-conda/build.sh
|
chmod 755 $out/fake-conda/build.sh
|
||||||
'';
|
'';
|
||||||
conda-artiq-board = import ./fast/conda/build.nix { inherit pkgs; } {
|
conda-artiq-board = import ./conda-build.nix { inherit pkgs; } {
|
||||||
name = "conda-artiq-board-${target}-${variant}";
|
name = "conda-artiq-board-${target}-${variant}";
|
||||||
src = fakeCondaSource;
|
src = fakeCondaSource;
|
||||||
};
|
};
|
18
artiq/conda-artiq-deps.nix
Normal file
18
artiq/conda-artiq-deps.nix
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
[
|
||||||
|
"python >=3.5.3,<3.6"
|
||||||
|
"llvmlite-artiq 0.23.0.dev py35_5"
|
||||||
|
"binutils-or1k-linux >=2.27"
|
||||||
|
"pythonparser >=1.1"
|
||||||
|
"openocd 0.10.0 6"
|
||||||
|
"scipy"
|
||||||
|
"numpy"
|
||||||
|
"prettytable"
|
||||||
|
"h5py 2.8"
|
||||||
|
"python-dateutil"
|
||||||
|
"pyqt >=5.5"
|
||||||
|
"quamash"
|
||||||
|
"pyqtgraph 0.10.0"
|
||||||
|
"pygit2"
|
||||||
|
"aiohttp >=3"
|
||||||
|
"levenshtein"
|
||||||
|
]
|
16
artiq/conda-artiq.nix
Normal file
16
artiq/conda-artiq.nix
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{ pkgs }:
|
||||||
|
|
||||||
|
let
|
||||||
|
version = import ./pkgs/artiq-version.nix (with pkgs; { inherit stdenv fetchgit git; });
|
||||||
|
fakeCondaSource = import ./conda-fake-source.nix { inherit pkgs; } {
|
||||||
|
name = "artiq";
|
||||||
|
inherit version;
|
||||||
|
src = import ./pkgs/artiq-src.nix { fetchgit = pkgs.fetchgit; };
|
||||||
|
dependencies = import ./conda-artiq-deps.nix;
|
||||||
|
};
|
||||||
|
conda-artiq = import ./conda-build.nix { inherit pkgs; } {
|
||||||
|
name = "conda-artiq";
|
||||||
|
src = fakeCondaSource;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
conda-artiq
|
44
artiq/conda-build.nix
Normal file
44
artiq/conda-build.nix
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
# We need to pass the whole source to conda for the git variables to work.
|
||||||
|
# recipe must be a string pointing to a path within the source.
|
||||||
|
|
||||||
|
{ pkgs }:
|
||||||
|
{ name, src, recipe ? "fake-conda"}:
|
||||||
|
|
||||||
|
with pkgs;
|
||||||
|
|
||||||
|
let
|
||||||
|
condaDeps = [ stdenv.cc xorg.libSM xorg.libICE xorg.libXrender libselinux ];
|
||||||
|
# Use the full Anaconda distribution, which already contains conda-build and its many dependencies,
|
||||||
|
# so we don't have to manually deal with them.
|
||||||
|
condaInstaller = fetchurl {
|
||||||
|
url = "https://repo.anaconda.com/archive/Anaconda3-2018.12-Linux-x86_64.sh";
|
||||||
|
sha256 = "006fgyz75ihd00qzbr1cny97xf1mwnzibbqyhskghraqgs2x068h";
|
||||||
|
};
|
||||||
|
condaSrcChmod = runCommand "conda-src-chmod" { } "mkdir $out; cp ${condaInstaller} $out/conda-installer.sh; chmod +x $out/conda-installer.sh";
|
||||||
|
condaInstallerEnv = buildFHSUserEnv {
|
||||||
|
name = "conda-installer-env";
|
||||||
|
targetPkgs = pkgs: ([ condaSrcChmod ] ++ condaDeps);
|
||||||
|
};
|
||||||
|
|
||||||
|
condaInstalled = runCommand "conda-installed" { }
|
||||||
|
''
|
||||||
|
${condaInstallerEnv}/bin/conda-installer-env -c "${condaSrcChmod}/conda-installer.sh -p $out -b"
|
||||||
|
'';
|
||||||
|
condaBuilderEnv = buildFHSUserEnv {
|
||||||
|
name = "conda-builder-env";
|
||||||
|
targetPkgs = pkgs: [ condaInstalled ] ++ condaDeps;
|
||||||
|
};
|
||||||
|
|
||||||
|
in stdenv.mkDerivation {
|
||||||
|
inherit name src;
|
||||||
|
buildInputs = [ condaBuilderEnv ];
|
||||||
|
buildCommand =
|
||||||
|
''
|
||||||
|
HOME=`pwd`
|
||||||
|
mkdir $out
|
||||||
|
${condaBuilderEnv}/bin/conda-builder-env -c "PYTHON=python conda build --no-anaconda-upload --no-test --output-folder $out $src/${recipe}"
|
||||||
|
|
||||||
|
mkdir -p $out/nix-support
|
||||||
|
echo file conda $out/noarch/*.tar.bz2 >> $out/nix-support/hydra-build-products
|
||||||
|
'';
|
||||||
|
}
|
@ -1,5 +1,5 @@
|
|||||||
{ pkgs }:
|
{ pkgs }:
|
||||||
{ name, version, src, extraSrcCommands ? "", dependencies ? [], extraYaml ? ""}:
|
{ name, version, src, dependencies ? []}:
|
||||||
pkgs.runCommand "conda-fake-source-${name}" { }
|
pkgs.runCommand "conda-fake-source-${name}" { }
|
||||||
''
|
''
|
||||||
mkdir -p $out/fake-conda;
|
mkdir -p $out/fake-conda;
|
||||||
@ -7,7 +7,6 @@ pkgs.runCommand "conda-fake-source-${name}" { }
|
|||||||
# work around yet more idiotic conda behavior - build breaks if write permissions aren't set on source files.
|
# work around yet more idiotic conda behavior - build breaks if write permissions aren't set on source files.
|
||||||
cp --no-preserve=mode,ownership -R ${src} workaround-conda
|
cp --no-preserve=mode,ownership -R ${src} workaround-conda
|
||||||
pushd workaround-conda
|
pushd workaround-conda
|
||||||
${extraSrcCommands}
|
|
||||||
tar cf $out/src.tar .
|
tar cf $out/src.tar .
|
||||||
popd
|
popd
|
||||||
rm -rf workaround-conda
|
rm -rf workaround-conda
|
||||||
@ -36,8 +35,6 @@ pkgs.runCommand "conda-fake-source-${name}" { }
|
|||||||
requirements:
|
requirements:
|
||||||
run:
|
run:
|
||||||
${pkgs.lib.concatStringsSep "\n" (map (s: " - ${s}") dependencies)}
|
${pkgs.lib.concatStringsSep "\n" (map (s: " - ${s}") dependencies)}
|
||||||
|
|
||||||
${extraYaml}
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat << EOF > $out/fake-conda/build.sh
|
cat << EOF > $out/fake-conda/build.sh
|
||||||
@ -45,7 +42,6 @@ pkgs.runCommand "conda-fake-source-${name}" { }
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
export VERSIONEER_OVERRIDE=${version}
|
export VERSIONEER_OVERRIDE=${version}
|
||||||
export LD_LIBRARY_PATH=/lib
|
|
||||||
python setup.py install \
|
python setup.py install \
|
||||||
--prefix=\$PREFIX \
|
--prefix=\$PREFIX \
|
||||||
--single-version-externally-managed \
|
--single-version-externally-managed \
|
47
artiq/default.nix
Normal file
47
artiq/default.nix
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
{ pkgs ? import <nixpkgs> {}}:
|
||||||
|
with pkgs;
|
||||||
|
let
|
||||||
|
pythonDeps = callPackage ./pkgs/python-deps.nix {};
|
||||||
|
|
||||||
|
boards = [
|
||||||
|
{ target = "kasli"; variant = "tester"; }
|
||||||
|
{ target = "kc705"; variant = "nist_clock"; }
|
||||||
|
];
|
||||||
|
boardPackages = pkgs.lib.lists.foldr (board: start:
|
||||||
|
let
|
||||||
|
boardBinaries = import ./artiq-board.nix { inherit pkgs; } {
|
||||||
|
target = board.target;
|
||||||
|
variant = board.variant;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
start // {
|
||||||
|
"artiq-board-${board.target}-${board.variant}" = boardBinaries;
|
||||||
|
"conda-artiq-board-${board.target}-${board.variant}" = import ./conda-artiq-board.nix { inherit pkgs; } {
|
||||||
|
target = board.target;
|
||||||
|
variant = board.variant;
|
||||||
|
boardBinaries = boardBinaries;
|
||||||
|
};
|
||||||
|
}) {} boards;
|
||||||
|
manualPackages = import ./pkgs/artiq-manual.nix {
|
||||||
|
inherit stdenv lib fetchgit git python3Packages texlive texinfo;
|
||||||
|
inherit (pythonDeps) sphinxcontrib-wavedrom;
|
||||||
|
};
|
||||||
|
mainPackages = rec {
|
||||||
|
inherit (pythonDeps) asyncserial levenshtein pythonparser quamash pyqtgraph-qt5 misoc migen microscope jesd204b lit outputcheck wavedrom sphinxcontrib-wavedrom;
|
||||||
|
binutils-or1k = callPackage ./pkgs/binutils-or1k.nix {};
|
||||||
|
llvm-or1k = callPackage ./pkgs/llvm-or1k.nix {};
|
||||||
|
rustc = callPackage ./pkgs/rust
|
||||||
|
((stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) {
|
||||||
|
stdenv = overrideCC stdenv gcc6; # with gcc-7: undefined reference to `__divmoddi4'
|
||||||
|
}) //
|
||||||
|
{ inherit llvm-or1k; });
|
||||||
|
llvmlite-artiq = callPackage ./pkgs/llvmlite-artiq.nix { inherit llvm-or1k; };
|
||||||
|
libartiq-support = callPackage ./pkgs/libartiq-support.nix { inherit rustc; };
|
||||||
|
artiq = callPackage ./pkgs/artiq.nix { inherit binutils-or1k llvm-or1k llvmlite-artiq libartiq-support lit outputcheck; };
|
||||||
|
artiq-env = (pkgs.python3.withPackages(ps: [ artiq ])).overrideAttrs (oldAttrs: { name = "${pkgs.python3.name}-artiq-env-${artiq.version}"; });
|
||||||
|
openocd = callPackage ./pkgs/openocd.nix {};
|
||||||
|
conda-artiq = import ./conda-artiq.nix { inherit pkgs; };
|
||||||
|
} // boardPackages // manualPackages;
|
||||||
|
extraPackages = import ./artiq-extras.nix { inherit pkgs; inherit (mainPackages) asyncserial artiq; };
|
||||||
|
in
|
||||||
|
mainPackages // extraPackages
|
@ -1,8 +1,7 @@
|
|||||||
{ stdenv, lib, cacert, git, cargo, cargo-vendor }:
|
{ stdenv, cacert, git, cargo, cargo-vendor }:
|
||||||
{ name, src, sha256 }:
|
{ name, src, sha256 }:
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "${name}-vendor";
|
name = "${name}-vendor";
|
||||||
strictDeps = true;
|
|
||||||
nativeBuildInputs = [ cacert git cargo cargo-vendor ];
|
nativeBuildInputs = [ cacert git cargo cargo-vendor ];
|
||||||
inherit src;
|
inherit src;
|
||||||
|
|
||||||
@ -31,6 +30,6 @@ stdenv.mkDerivation {
|
|||||||
outputHashMode = "recursive";
|
outputHashMode = "recursive";
|
||||||
outputHash = sha256;
|
outputHash = sha256;
|
||||||
|
|
||||||
impureEnvVars = lib.fetchers.proxyImpureEnvVars;
|
impureEnvVars = stdenv.lib.fetchers.proxyImpureEnvVars;
|
||||||
preferLocalBuild = true;
|
preferLocalBuild = true;
|
||||||
}
|
}
|
@ -1,7 +1,7 @@
|
|||||||
{ stdenv, lib, fetchgit, git, python3Packages, texlive, texinfo, sphinxcontrib-wavedrom, artiq-fast }:
|
{ stdenv, lib, fetchgit, git, python3Packages, texlive, texinfo, sphinxcontrib-wavedrom }:
|
||||||
|
|
||||||
let
|
let
|
||||||
artiqVersion = import (artiq-fast + "/pkgs/artiq-version.nix") { inherit stdenv fetchgit git; };
|
artiqVersion = import ./artiq-version.nix { inherit stdenv fetchgit git; };
|
||||||
|
|
||||||
isLatexPdfTarget = target: builtins.match "latexpdf.*" target != null;
|
isLatexPdfTarget = target: builtins.match "latexpdf.*" target != null;
|
||||||
|
|
||||||
@ -16,7 +16,7 @@ let
|
|||||||
name = "artiq-manual-${target}-${version}";
|
name = "artiq-manual-${target}-${version}";
|
||||||
version = artiqVersion;
|
version = artiqVersion;
|
||||||
|
|
||||||
src = import (artiq-fast + "/pkgs/artiq-src.nix") { inherit fetchgit; };
|
src = import ./artiq-src.nix { inherit fetchgit; };
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
python3Packages.sphinx python3Packages.sphinx_rtd_theme
|
python3Packages.sphinx python3Packages.sphinx_rtd_theme
|
||||||
python3Packages.sphinx-argparse sphinxcontrib-wavedrom
|
python3Packages.sphinx-argparse sphinxcontrib-wavedrom
|
||||||
@ -26,7 +26,7 @@ let
|
|||||||
|
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
export VERSIONEER_OVERRIDE=${artiqVersion}
|
export VERSIONEER_OVERRIDE=${artiqVersion}
|
||||||
export SOURCE_DATE_EPOCH=${import (artiq-fast + "/pkgs/artiq-timestamp.nix") { inherit stdenv fetchgit git; }}
|
export SOURCE_DATE_EPOCH=${import ./artiq-timestamp.nix { inherit stdenv fetchgit git; }}
|
||||||
cd doc/manual
|
cd doc/manual
|
||||||
'';
|
'';
|
||||||
makeFlags = [ target ];
|
makeFlags = [ target ];
|
15
artiq/pkgs/artiq-version.nix
Normal file
15
artiq/pkgs/artiq-version.nix
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{ stdenv, git, fetchgit }:
|
||||||
|
let
|
||||||
|
artiq-version = stdenv.mkDerivation {
|
||||||
|
name = "artiq-version";
|
||||||
|
src = import ./artiq-src.nix { inherit fetchgit; };
|
||||||
|
buildPhase = ''
|
||||||
|
REV=`${git}/bin/git rev-parse HEAD`
|
||||||
|
COMMITCOUNT=`${git}/bin/git rev-list --count HEAD`
|
||||||
|
'';
|
||||||
|
installPhase = ''
|
||||||
|
echo -n 5.$COMMITCOUNT.`cut -c1-8 <<< $REV`.beta > $out
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in
|
||||||
|
builtins.readFile artiq-version
|
29
artiq/pkgs/artiq.nix
Normal file
29
artiq/pkgs/artiq.nix
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
{ stdenv, callPackage, fetchgit, git, python3Packages, qt5Full, binutils-or1k, llvm-or1k, llvmlite-artiq, libartiq-support, lit, outputcheck }:
|
||||||
|
|
||||||
|
let
|
||||||
|
pythonDeps = callPackage ./python-deps.nix {};
|
||||||
|
in
|
||||||
|
python3Packages.buildPythonPackage rec {
|
||||||
|
name = "artiq-${version}";
|
||||||
|
version = import ./artiq-version.nix { inherit stdenv fetchgit git; };
|
||||||
|
src = import ./artiq-src.nix { inherit fetchgit; };
|
||||||
|
preBuild = "export VERSIONEER_OVERRIDE=${version}";
|
||||||
|
propagatedBuildInputs = [ binutils-or1k llvm-or1k llvmlite-artiq qt5Full ]
|
||||||
|
++ (with pythonDeps; [ levenshtein pyqtgraph-qt5 quamash pythonparser ])
|
||||||
|
++ (with python3Packages; [ aiohttp pygit2 numpy dateutil scipy prettytable pyserial h5py pyqt5 ]);
|
||||||
|
checkInputs = [ binutils-or1k outputcheck ];
|
||||||
|
checkPhase =
|
||||||
|
''
|
||||||
|
python -m unittest discover -v artiq.test
|
||||||
|
|
||||||
|
TESTDIR=`mktemp -d`
|
||||||
|
cp --no-preserve=mode,ownership -R ${src}/artiq/test/lit $TESTDIR
|
||||||
|
LIBARTIQ_SUPPORT=${libartiq-support}/libartiq_support.so ${lit}/bin/lit -v $TESTDIR/lit
|
||||||
|
'';
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
description = "A leading-edge control system for quantum information experiments";
|
||||||
|
homepage = https://m-labs/artiq;
|
||||||
|
license = licenses.lgpl3;
|
||||||
|
maintainers = [ maintainers.sb0 ];
|
||||||
|
};
|
||||||
|
}
|
@ -1,19 +1,18 @@
|
|||||||
{ stdenv, lib, buildPackages
|
{ stdenv, buildPackages
|
||||||
, fetchurl, zlib
|
, fetchurl, zlib
|
||||||
, platform, target
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
basename = "binutils";
|
basename = "binutils";
|
||||||
inherit platform;
|
platform = "or1k";
|
||||||
version = "2.30";
|
version = "2.30";
|
||||||
name = "${basename}-${platform}-${version}";
|
name = "${basename}_${platform}-${version}";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://ftp.gnu.org/gnu/binutils/binutils-${version}.tar.bz2";
|
url = "https://ftp.gnu.org/gnu/binutils/binutils-${version}.tar.bz2";
|
||||||
sha256 = "028cklfqaab24glva1ks2aqa1zxa6w6xmc8q34zs1sb7h22dxspg";
|
sha256 = "028cklfqaab24glva1ks2aqa1zxa6w6xmc8q34zs1sb7h22dxspg";
|
||||||
};
|
};
|
||||||
configureFlags =
|
configureFlags =
|
||||||
[ "--enable-shared" "--enable-deterministic-archives" "--target=${target}"];
|
[ "--enable-shared" "--enable-deterministic-archives" "--target=or1k-linux"];
|
||||||
outputs = [ "out" "info" "man" ];
|
outputs = [ "out" "info" "man" ];
|
||||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||||
buildInputs = [ zlib ];
|
buildInputs = [ zlib ];
|
||||||
@ -27,7 +26,7 @@ stdenv.mkDerivation rec {
|
|||||||
`gprof', `nm', `strip', etc.
|
`gprof', `nm', `strip', etc.
|
||||||
'';
|
'';
|
||||||
homepage = http://www.gnu.org/software/binutils/;
|
homepage = http://www.gnu.org/software/binutils/;
|
||||||
license = lib.licenses.gpl3Plus;
|
license = stdenv.lib.licenses.gpl3Plus;
|
||||||
/* Give binutils a lower priority than gcc-wrapper to prevent a
|
/* Give binutils a lower priority than gcc-wrapper to prevent a
|
||||||
collision due to the ld/as wrappers/symlinks in the latter. */
|
collision due to the ld/as wrappers/symlinks in the latter. */
|
||||||
priority = "10";
|
priority = "10";
|
@ -1,15 +1,13 @@
|
|||||||
{ stdenv, fetchgit, git, rustc }:
|
{ stdenv, fetchgit, git, rustc }:
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "libartiq-support";
|
name = "libartiq-support-${version}";
|
||||||
version = import ./artiq-version.nix { inherit stdenv fetchgit git; };
|
version = import ./artiq-version.nix { inherit stdenv fetchgit git; };
|
||||||
|
|
||||||
src = import ./artiq-src.nix { inherit fetchgit; };
|
src = import ./artiq-src.nix { inherit fetchgit; };
|
||||||
|
|
||||||
buildInputs = [ rustc ];
|
|
||||||
phases = [ "buildPhase" ];
|
phases = [ "buildPhase" ];
|
||||||
|
# keep in sync with artiq/test/lit/lit.cfg or remove build from the latter once we don't use buildbot/conda anymore
|
||||||
buildPhase =
|
buildPhase =
|
||||||
''
|
''
|
||||||
mkdir $out
|
mkdir $out
|
||||||
rustc ${src}/artiq/test/libartiq_support/lib.rs --out-dir $out -Cpanic=unwind -g
|
${rustc}/bin/rustc ${src}/artiq/test/libartiq_support/lib.rs --out-dir $out -Cpanic=unwind -g
|
||||||
'';
|
'';
|
||||||
}
|
}
|
@ -1,14 +1,14 @@
|
|||||||
{ stdenv, lib
|
{ stdenv
|
||||||
, fetchFromGitHub, runCommand
|
, fetchFromGitHub, runCommand
|
||||||
, perl, groff, cmake, libxml2, python, libffi, valgrind
|
, perl, groff, cmake, libxml2, python, libffi, valgrind
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
llvm-src = fetchFromGitHub {
|
llvm-src = fetchFromGitHub {
|
||||||
rev = "7746fe85489e92e1caffda18b9d7b2ae9e5da1a8";
|
rev = "527aa86b578da5dfb9cf4510b71f0f46a11249f7";
|
||||||
owner = "m-labs";
|
owner = "m-labs";
|
||||||
repo = "llvm-or1k";
|
repo = "llvm-or1k";
|
||||||
sha256 = "0jqbb3k9r91swsyrdak8fzvs1qi451zy8dqmpqriaxk5g83ny5b7";
|
sha256 = "0lmcg9xj66pf4mb6racipw67vm8kwm84dl861hyqnywd61kvhrwa";
|
||||||
};
|
};
|
||||||
clang-src = fetchFromGitHub {
|
clang-src = fetchFromGitHub {
|
||||||
rev = "9e996136d52ed506ed8f57ef8b13b0f0f735e6a3";
|
rev = "9e996136d52ed506ed8f57ef8b13b0f0f735e6a3";
|
||||||
@ -25,12 +25,10 @@ let
|
|||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "llvm-or1k";
|
name = "llvm-or1k";
|
||||||
version = "6.0.0";
|
|
||||||
passthru.llvm-src = llvm-src;
|
|
||||||
src = llvm-clang-src;
|
src = llvm-clang-src;
|
||||||
|
|
||||||
buildInputs = [ perl groff cmake libxml2 python libffi ] ++ lib.optional stdenv.isLinux valgrind;
|
buildInputs = [ perl groff cmake libxml2 python libffi ] ++ stdenv.lib.optional stdenv.isLinux valgrind;
|
||||||
|
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
NIX_BUILD_CORES=4
|
NIX_BUILD_CORES=4
|
||||||
@ -42,7 +40,7 @@ in
|
|||||||
"-DCMAKE_BUILD_TYPE=Release"
|
"-DCMAKE_BUILD_TYPE=Release"
|
||||||
"-DLLVM_BUILD_LLVM_DYLIB=ON"
|
"-DLLVM_BUILD_LLVM_DYLIB=ON"
|
||||||
"-DLLVM_LINK_LLVM_DYLIB=ON"
|
"-DLLVM_LINK_LLVM_DYLIB=ON"
|
||||||
"-DLLVM_TARGETS_TO_BUILD=X86;ARM"
|
"-DLLVM_TARGETS_TO_BUILD=X86"
|
||||||
"-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=OR1K"
|
"-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=OR1K"
|
||||||
"-DLLVM_ENABLE_ASSERTIONS=OFF"
|
"-DLLVM_ENABLE_ASSERTIONS=OFF"
|
||||||
"-DLLVM_INSTALL_UTILS=ON"
|
"-DLLVM_INSTALL_UTILS=ON"
|
||||||
@ -59,8 +57,8 @@ in
|
|||||||
meta = {
|
meta = {
|
||||||
description = "Collection of modular and reusable compiler and toolchain technologies";
|
description = "Collection of modular and reusable compiler and toolchain technologies";
|
||||||
homepage = http://llvm.org/;
|
homepage = http://llvm.org/;
|
||||||
license = lib.licenses.bsd3;
|
license = stdenv.lib.licenses.bsd3;
|
||||||
maintainers = with lib.maintainers; [ sb0 ];
|
maintainers = with stdenv.lib.maintainers; [ sb0 ];
|
||||||
platforms = lib.platforms.all;
|
platforms = stdenv.lib.platforms.all;
|
||||||
};
|
};
|
||||||
}
|
}
|
@ -1,7 +1,6 @@
|
|||||||
{ stdenv, lib, fetchFromGitHub, llvm-or1k, makeWrapper, python3, ncurses, zlib, python3Packages }:
|
{ stdenv, fetchFromGitHub, llvm-or1k, makeWrapper, python3, ncurses, zlib, python3Packages }:
|
||||||
python3Packages.buildPythonPackage rec {
|
python3Packages.buildPythonPackage rec {
|
||||||
pname = "llvmlite-artiq";
|
name = "llvmlite-artiq";
|
||||||
version = "0.23.0.dev";
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
rev = "158f9d3a898dbf055ca513d69505df288c681fea";
|
rev = "158f9d3a898dbf055ca513d69505df288c681fea";
|
||||||
owner = "m-labs";
|
owner = "m-labs";
|
||||||
@ -13,7 +12,7 @@ python3Packages.buildPythonPackage rec {
|
|||||||
|
|
||||||
preBuild = "export LLVM_CONFIG=${llvm-or1k}/bin/llvm-config";
|
preBuild = "export LLVM_CONFIG=${llvm-or1k}/bin/llvm-config";
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "A lightweight LLVM python binding for writing JIT compilers";
|
description = "A lightweight LLVM python binding for writing JIT compilers";
|
||||||
homepage = "http://llvmlite.pydata.org/";
|
homepage = "http://llvmlite.pydata.org/";
|
||||||
maintainers = with maintainers; [ sb0 ];
|
maintainers = with maintainers; [ sb0 ];
|
@ -1,7 +1,7 @@
|
|||||||
{ stdenv, lib, fetchFromGitHub, autoreconfHook, libftdi, libusb1, pkgconfig, hidapi }:
|
{ stdenv, fetchFromGitHub, autoreconfHook, libftdi, libusb1, pkgconfig, hidapi }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "openocd-mlabs";
|
name = "openocd-mlabs-${version}";
|
||||||
version = "0.10.0";
|
version = "0.10.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
@ -14,8 +14,8 @@ stdenv.mkDerivation rec {
|
|||||||
bscan_spi_bitstreams = fetchFromGitHub {
|
bscan_spi_bitstreams = fetchFromGitHub {
|
||||||
owner = "quartiq";
|
owner = "quartiq";
|
||||||
repo = "bscan_spi_bitstreams";
|
repo = "bscan_spi_bitstreams";
|
||||||
rev = "01d8f819f15baf9a8cc5d96945a51e4d267ff564";
|
rev = "a628956da7dc794e6e3c95b31ff9ce3af58bc763";
|
||||||
sha256 = "1zqv47kzgvbn4c8cr019a6wcja7gn5h1z4kvw5bhpc72fyhagal9";
|
sha256 = "1cydbym3wv9jwxh6lw9im1mjzr7w8rzzx95bxkjschmzjq4h13vk";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ pkgconfig ];
|
||||||
@ -32,14 +32,12 @@ stdenv.mkDerivation rec {
|
|||||||
"--enable-buspirate"
|
"--enable-buspirate"
|
||||||
"--enable-sysfsgpio"
|
"--enable-sysfsgpio"
|
||||||
"--enable-remote-bitbang"
|
"--enable-remote-bitbang"
|
||||||
"--disable-werror"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE = [
|
NIX_CFLAGS_COMPILE = [
|
||||||
"-Wno-implicit-fallthrough"
|
"-Wno-implicit-fallthrough"
|
||||||
"-Wno-format-truncation"
|
"-Wno-format-truncation"
|
||||||
"-Wno-format-overflow"
|
"-Wno-format-overflow"
|
||||||
"-Wno-error=tautological-compare"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
@ -55,7 +53,7 @@ stdenv.mkDerivation rec {
|
|||||||
cp ${bscan_spi_bitstreams}/*.bit "$out/share/bscan-spi-bitstreams"
|
cp ${bscan_spi_bitstreams}/*.bit "$out/share/bscan-spi-bitstreams"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Free and Open On-Chip Debugging, In-System Programming and Boundary-Scan Testing";
|
description = "Free and Open On-Chip Debugging, In-System Programming and Boundary-Scan Testing";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
OpenOCD provides on-chip programming and debugging support with a layered
|
OpenOCD provides on-chip programming and debugging support with a layered
|
244
artiq/pkgs/python-deps.nix
Normal file
244
artiq/pkgs/python-deps.nix
Normal file
@ -0,0 +1,244 @@
|
|||||||
|
{ stdenv, fetchFromGitHub, python, python3Packages }:
|
||||||
|
|
||||||
|
rec {
|
||||||
|
# User dependencies
|
||||||
|
asyncserial = python3Packages.buildPythonPackage rec {
|
||||||
|
name = "asyncserial";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "m-labs";
|
||||||
|
repo = "asyncserial";
|
||||||
|
rev = "d95bc1d6c791b0e9785935d2f62f628eb5cdf98d";
|
||||||
|
sha256 = "0yzkka9jk3612v8gx748x6ziwykq5lr7zmr9wzkcls0v2yilqx9k";
|
||||||
|
};
|
||||||
|
propagatedBuildInputs = with python3Packages; [ pyserial ];
|
||||||
|
doCheck = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
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";
|
||||||
|
};
|
||||||
|
patches = [ ./python37hack.patch ];
|
||||||
|
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 ];
|
||||||
|
};
|
||||||
|
|
||||||
|
# TODO: use python3Packages.pyftdi starting with NixOS 19.09 or later
|
||||||
|
# Upstream PR: https://github.com/NixOS/nixpkgs/pull/61256
|
||||||
|
pyftdi = python3Packages.buildPythonPackage rec {
|
||||||
|
name = "pyftdi";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "eblot";
|
||||||
|
repo = "pyftdi";
|
||||||
|
rev = "8e6f0bab6cff3eb60d2dbe578d0c5a2d1a9e135c";
|
||||||
|
sha256 = "0mw79fjnvswa0j3bzr0y906rz1vjbr8lwy0albgvsfr0ngwbajqy";
|
||||||
|
};
|
||||||
|
propagatedBuildInputs = with python3Packages; [ pyusb pyserial ];
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
# Development/firmware dependencies
|
||||||
|
misoc = python3Packages.buildPythonPackage rec {
|
||||||
|
name = "misoc";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "m-labs";
|
||||||
|
repo = "misoc";
|
||||||
|
rev = "6e9c1a894312a81b534482949cbfc5f47842edd9";
|
||||||
|
sha256 = "0y4jh60bmpzzh06k2gzxl3pqzbvvg8ipz029hvmi8d05hzf4kcf3";
|
||||||
|
fetchSubmodules = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# TODO: fix misoc bitrot and re-enable tests
|
||||||
|
doCheck = false;
|
||||||
|
|
||||||
|
propagatedBuildInputs = with python3Packages; [ pyserial jinja2 numpy asyncserial migen ];
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
description = "A high performance and small footprint system-on-chip based on Migen";
|
||||||
|
homepage = "https://m-labs.hk/migen";
|
||||||
|
license = licenses.bsd2;
|
||||||
|
platforms = platforms.unix;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
migen = python3Packages.buildPythonPackage rec {
|
||||||
|
name = "migen";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "m-labs";
|
||||||
|
repo = "migen";
|
||||||
|
rev = "bc903441a5a27cb36b6961c29529ff98cd94f1ec";
|
||||||
|
sha256 = "0rjjhbh6m2r5w71cvyzbh90wgykm1ygsxj1h5f5z87zka3dfvxwn";
|
||||||
|
};
|
||||||
|
|
||||||
|
propagatedBuildInputs = with python3Packages; [ colorama sphinx sphinx_rtd_theme ];
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
description = "A Python toolbox for building complex digital hardware";
|
||||||
|
homepage = "https://m-labs.hk/migen";
|
||||||
|
license = licenses.bsd2;
|
||||||
|
platforms = platforms.unix;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
microscope = python3Packages.buildPythonPackage rec {
|
||||||
|
name = "microscope";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "m-labs";
|
||||||
|
repo = "microscope";
|
||||||
|
rev = "bcbc5346c71ad8f7a1a0b7771a9d126b18fdf558";
|
||||||
|
sha256 = "1hslm2nn2z1bl84ya4fsab3pvcdmbziwn7zkai0cm3bv525fjxxd";
|
||||||
|
};
|
||||||
|
|
||||||
|
propagatedBuildInputs = with python3Packages; [ pyserial prettytable msgpack 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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
jesd204b = python3Packages.buildPythonPackage rec {
|
||||||
|
name = "jesd204b";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "m-labs";
|
||||||
|
repo = "jesd204b";
|
||||||
|
rev = "2fd6391c0a9197580d60f7d8a146191dc7337b03";
|
||||||
|
sha256 = "1lhw8f0dp42xx4g6d7hyhqhrnd6i5ll4a1wcg265rqz3600i4009";
|
||||||
|
};
|
||||||
|
|
||||||
|
propagatedBuildInputs = with python3Packages; [ migen misoc ];
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
description = "JESD204B core for Migen/MiSoC";
|
||||||
|
homepage = "https://m-labs.hk/migen";
|
||||||
|
license = licenses.bsd2;
|
||||||
|
platforms = platforms.unix;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# not using the nixpkgs version because it is Python 2 and an "application"
|
||||||
|
lit = python3Packages.buildPythonPackage rec {
|
||||||
|
pname = "lit";
|
||||||
|
version = "0.7.1";
|
||||||
|
|
||||||
|
src = python3Packages.fetchPypi {
|
||||||
|
inherit pname version;
|
||||||
|
sha256 = "ecef2833aef7f411cb923dac109c7c9dcc7dbe7cafce0650c1e8d19c243d955f";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Non-standard test suite. Needs custom checkPhase.
|
||||||
|
doCheck = false;
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
description = "Portable tool for executing LLVM and Clang style test suites";
|
||||||
|
homepage = http://llvm.org/docs/CommandGuide/lit.html;
|
||||||
|
license = licenses.ncsa;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
outputcheck = python3Packages.buildPythonApplication rec {
|
||||||
|
pname = "outputcheck";
|
||||||
|
version = "0.4.2";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "stp";
|
||||||
|
repo = "OutputCheck";
|
||||||
|
rev = "e0f533d3c5af2949349856c711bf4bca50022b48";
|
||||||
|
sha256 = "1y27vz6jq6sywas07kz3v01sqjd0sga9yv9w2cksqac3v7wmf2a0";
|
||||||
|
};
|
||||||
|
prePatch = "echo ${version} > RELEASE-VERSION";
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
description = "A tool for checking tool output inspired by LLVM's FileCheck";
|
||||||
|
homepage = "https://github.com/stp/OutputCheck";
|
||||||
|
license = licenses.bsd3;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
# Documentation building dependencies
|
||||||
|
wavedrom = python3Packages.buildPythonPackage rec {
|
||||||
|
pname = "wavedrom";
|
||||||
|
version = "0.1";
|
||||||
|
|
||||||
|
src = python3Packages.fetchPypi {
|
||||||
|
inherit pname version;
|
||||||
|
sha256 = "006w683zlmmwcw5xz1n5dwg34ims5jg3gl2700ql4wr0myjz6710";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [ python3Packages.setuptools_scm ];
|
||||||
|
propagatedBuildInputs = with python3Packages; [ svgwrite attrdict ];
|
||||||
|
doCheck = false;
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
description = "WaveDrom compatible Python module and command line";
|
||||||
|
homepage = "https://pypi.org/project/wavedrom/";
|
||||||
|
license = licenses.mit;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
sphinxcontrib-wavedrom = python3Packages.buildPythonPackage rec {
|
||||||
|
pname = "sphinxcontrib-wavedrom";
|
||||||
|
version = "2.0.0";
|
||||||
|
|
||||||
|
src = python3Packages.fetchPypi {
|
||||||
|
inherit pname version;
|
||||||
|
sha256 = "0nk36zqq5ipxqx9izz2iazb3iraasanv3nm05bjr21gw42zgkz22";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [ python3Packages.setuptools_scm ];
|
||||||
|
propagatedBuildInputs = [ wavedrom ] ++ (with python3Packages; [ sphinx xcffib cairosvg ]);
|
||||||
|
doCheck = false;
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
description = "A Sphinx extension that allows including WaveDrom diagrams";
|
||||||
|
homepage = "https://pypi.org/project/sphinxcontrib-wavedrom/";
|
||||||
|
license = licenses.mit;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -1,27 +1,25 @@
|
|||||||
diff --git a/pythonparser/lexer.py b/pythonparser/lexer.py
|
diff --git a/pythonparser/lexer.py b/pythonparser/lexer.py
|
||||||
index a62eaf1..c70e85a 100644
|
index a62eaf1..2c48d36 100644
|
||||||
--- a/pythonparser/lexer.py
|
--- a/pythonparser/lexer.py
|
||||||
+++ b/pythonparser/lexer.py
|
+++ b/pythonparser/lexer.py
|
||||||
@@ -79,6 +79,8 @@ class Lexer:
|
@@ -79,6 +79,7 @@ class Lexer:
|
||||||
(3, 4): _reserved_3_1,
|
(3, 4): _reserved_3_1,
|
||||||
(3, 5): _reserved_3_5,
|
(3, 5): _reserved_3_5,
|
||||||
(3, 6): _reserved_3_5,
|
(3, 6): _reserved_3_5,
|
||||||
+ (3, 7): _reserved_3_5,
|
+ (3, 7): _reserved_3_5,
|
||||||
+ (3, 8): _reserved_3_5,
|
|
||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
A map from a tuple (*major*, *minor*) corresponding to Python version to
|
A map from a tuple (*major*, *minor*) corresponding to Python version to
|
||||||
@@ -102,6 +104,8 @@ class Lexer:
|
@@ -102,6 +103,7 @@ class Lexer:
|
||||||
(3, 4): _string_prefixes_3_3,
|
(3, 4): _string_prefixes_3_3,
|
||||||
(3, 5): _string_prefixes_3_3,
|
(3, 5): _string_prefixes_3_3,
|
||||||
(3, 6): _string_prefixes_3_6,
|
(3, 6): _string_prefixes_3_6,
|
||||||
+ (3, 7): _string_prefixes_3_6,
|
+ (3, 7): _string_prefixes_3_6,
|
||||||
+ (3, 8): _string_prefixes_3_6,
|
|
||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
A map from a tuple (*major*, *minor*) corresponding to Python version to
|
A map from a tuple (*major*, *minor*) corresponding to Python version to
|
||||||
diff --git a/pythonparser/parser.py b/pythonparser/parser.py
|
diff --git a/pythonparser/parser.py b/pythonparser/parser.py
|
||||||
index 10c741d..62b93e1 100644
|
index 10c741d..f748695 100644
|
||||||
--- a/pythonparser/parser.py
|
--- a/pythonparser/parser.py
|
||||||
+++ b/pythonparser/parser.py
|
+++ b/pythonparser/parser.py
|
||||||
@@ -419,7 +419,7 @@ class Parser(object):
|
@@ -419,7 +419,7 @@ class Parser(object):
|
||||||
@ -29,7 +27,7 @@ index 10c741d..62b93e1 100644
|
|||||||
self.yield_expr = self.yield_expr__26
|
self.yield_expr = self.yield_expr__26
|
||||||
return
|
return
|
||||||
- elif version in ((3, 0), (3, 1), (3, 2), (3, 3), (3, 4), (3, 5), (3, 6)):
|
- elif version in ((3, 0), (3, 1), (3, 2), (3, 3), (3, 4), (3, 5), (3, 6)):
|
||||||
+ elif version in ((3, 0), (3, 1), (3, 2), (3, 3), (3, 4), (3, 5), (3, 6), (3, 7), (3, 8)):
|
+ elif version in ((3, 0), (3, 1), (3, 2), (3, 3), (3, 4), (3, 5), (3, 6), (3, 7)):
|
||||||
if version == (3, 0):
|
if version == (3, 0):
|
||||||
self.with_stmt = self.with_stmt__26 # lol
|
self.with_stmt = self.with_stmt__26 # lol
|
||||||
else:
|
else:
|
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, lib, makeWrapper, bash, buildRustPackage, curl, darwin
|
{ stdenv, makeWrapper, bash, buildRustPackage, curl, darwin
|
||||||
, version
|
, version
|
||||||
, src
|
, src
|
||||||
, platform
|
, platform
|
||||||
@ -6,7 +6,7 @@
|
|||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) optionalString;
|
inherit (stdenv.lib) optionalString;
|
||||||
inherit (darwin.apple_sdk.frameworks) Security;
|
inherit (darwin.apple_sdk.frameworks) Security;
|
||||||
|
|
||||||
bootstrapping = versionType == "bootstrap";
|
bootstrapping = versionType == "bootstrap";
|
||||||
@ -26,14 +26,14 @@ rec {
|
|||||||
inherit version;
|
inherit version;
|
||||||
inherit src;
|
inherit src;
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = http://www.rust-lang.org/;
|
homepage = http://www.rust-lang.org/;
|
||||||
description = "A safe, concurrent, practical language";
|
description = "A safe, concurrent, practical language";
|
||||||
maintainers = with maintainers; [ sb0 ];
|
maintainers = with maintainers; [ sb0 ];
|
||||||
license = [ licenses.mit licenses.asl20 ];
|
license = [ licenses.mit licenses.asl20 ];
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ bash ] ++ lib.optional stdenv.isDarwin Security;
|
buildInputs = [ bash ] ++ stdenv.lib.optional stdenv.isDarwin Security;
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
patchShebangs .
|
patchShebangs .
|
||||||
@ -60,7 +60,7 @@ rec {
|
|||||||
install_name_tool -change /usr/lib/libresolv.9.dylib '${darwin.libresolv}/lib/libresolv.9.dylib' "$out/bin/rustdoc"
|
install_name_tool -change /usr/lib/libresolv.9.dylib '${darwin.libresolv}/lib/libresolv.9.dylib' "$out/bin/rustdoc"
|
||||||
install_name_tool -change /usr/lib/libiconv.2.dylib '${darwin.libiconv}/lib/libiconv.2.dylib' "$out/bin/cargo"
|
install_name_tool -change /usr/lib/libiconv.2.dylib '${darwin.libiconv}/lib/libiconv.2.dylib' "$out/bin/cargo"
|
||||||
install_name_tool -change /usr/lib/libresolv.9.dylib '${darwin.libresolv}/lib/libresolv.9.dylib' "$out/bin/cargo"
|
install_name_tool -change /usr/lib/libresolv.9.dylib '${darwin.libresolv}/lib/libresolv.9.dylib' "$out/bin/cargo"
|
||||||
install_name_tool -change /usr/lib/libcurl.4.dylib '${lib.getLib curl}/lib/libcurl.4.dylib' "$out/bin/cargo"
|
install_name_tool -change /usr/lib/libcurl.4.dylib '${stdenv.lib.getLib curl}/lib/libcurl.4.dylib' "$out/bin/cargo"
|
||||||
for f in $out/lib/lib*.dylib; do
|
for f in $out/lib/lib*.dylib; do
|
||||||
install_name_tool -change /usr/lib/libresolv.9.dylib '${darwin.libresolv}/lib/libresolv.9.dylib' "$f"
|
install_name_tool -change /usr/lib/libresolv.9.dylib '${darwin.libresolv}/lib/libresolv.9.dylib' "$f"
|
||||||
done
|
done
|
||||||
@ -80,14 +80,14 @@ rec {
|
|||||||
inherit version;
|
inherit version;
|
||||||
inherit src;
|
inherit src;
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = http://www.rust-lang.org/;
|
homepage = http://www.rust-lang.org/;
|
||||||
description = "A safe, concurrent, practical language";
|
description = "A safe, concurrent, practical language";
|
||||||
maintainers = with maintainers; [ sb0 ];
|
maintainers = with maintainers; [ sb0 ];
|
||||||
license = [ licenses.mit licenses.asl20 ];
|
license = [ licenses.mit licenses.asl20 ];
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ makeWrapper bash ] ++ lib.optional stdenv.isDarwin Security;
|
buildInputs = [ makeWrapper bash ] ++ stdenv.lib.optional stdenv.isDarwin Security;
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
patchShebangs .
|
patchShebangs .
|
||||||
@ -107,7 +107,7 @@ rec {
|
|||||||
${optionalString (stdenv.isDarwin && bootstrapping) ''
|
${optionalString (stdenv.isDarwin && bootstrapping) ''
|
||||||
install_name_tool -change /usr/lib/libiconv.2.dylib '${darwin.libiconv}/lib/libiconv.2.dylib' "$out/bin/cargo"
|
install_name_tool -change /usr/lib/libiconv.2.dylib '${darwin.libiconv}/lib/libiconv.2.dylib' "$out/bin/cargo"
|
||||||
install_name_tool -change /usr/lib/libresolv.9.dylib '${darwin.libresolv}/lib/libresolv.9.dylib' "$out/bin/cargo"
|
install_name_tool -change /usr/lib/libresolv.9.dylib '${darwin.libresolv}/lib/libresolv.9.dylib' "$out/bin/cargo"
|
||||||
install_name_tool -change /usr/lib/libcurl.4.dylib '${lib.getLib curl}/lib/libcurl.4.dylib' "$out/bin/cargo"
|
install_name_tool -change /usr/lib/libcurl.4.dylib '${stdenv.lib.getLib curl}/lib/libcurl.4.dylib' "$out/bin/cargo"
|
||||||
''}
|
''}
|
||||||
|
|
||||||
wrapProgram "$out/bin/cargo" \
|
wrapProgram "$out/bin/cargo" \
|
@ -50,25 +50,6 @@ let
|
|||||||
destdir=$out
|
destdir=$out
|
||||||
rustc="${rustc_internal}/bin/rustc --out-dir ''${destdir} -L ''${destdir} --target or1k-unknown-none -g -C target-feature=+mul,+div,+ffl1,+cmov,+addc -C opt-level=s --crate-type rlib"
|
rustc="${rustc_internal}/bin/rustc --out-dir ''${destdir} -L ''${destdir} --target or1k-unknown-none -g -C target-feature=+mul,+div,+ffl1,+cmov,+addc -C opt-level=s --crate-type rlib"
|
||||||
|
|
||||||
mkdir -p ''${destdir}
|
|
||||||
''${rustc} --crate-name core src/libcore/lib.rs
|
|
||||||
''${rustc} --crate-name compiler_builtins src/libcompiler_builtins/src/lib.rs --cfg 'feature="compiler-builtins"' --cfg 'feature="mem"'
|
|
||||||
''${rustc} --crate-name std_unicode src/libstd_unicode/lib.rs
|
|
||||||
''${rustc} --crate-name alloc src/liballoc/lib.rs
|
|
||||||
''${rustc} --crate-name libc src/liblibc_mini/lib.rs
|
|
||||||
''${rustc} --crate-name unwind src/libunwind/lib.rs
|
|
||||||
''${rustc} -Cpanic=abort --crate-name panic_abort src/libpanic_abort/lib.rs
|
|
||||||
''${rustc} -Cpanic=unwind --crate-name panic_unwind src/libpanic_unwind/lib.rs --cfg llvm_libunwind
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
arm-crates = stdenv.mkDerivation {
|
|
||||||
name = "arm-crates";
|
|
||||||
inherit src;
|
|
||||||
phases = [ "unpackPhase" "buildPhase" ];
|
|
||||||
buildPhase = ''
|
|
||||||
destdir=$out
|
|
||||||
rustc="${rustc_internal}/bin/rustc --out-dir ''${destdir} -L ''${destdir} --target armv7-unknown-linux-gnueabihf -g -C target-feature=+dsp,+fp16,+neon,+vfp3 -C opt-level=s --crate-type rlib"
|
|
||||||
|
|
||||||
mkdir -p ''${destdir}
|
mkdir -p ''${destdir}
|
||||||
''${rustc} --crate-name core src/libcore/lib.rs
|
''${rustc} --crate-name core src/libcore/lib.rs
|
||||||
''${rustc} --crate-name compiler_builtins src/libcompiler_builtins/src/lib.rs --cfg 'feature="compiler-builtins"' --cfg 'feature="mem"'
|
''${rustc} --crate-name compiler_builtins src/libcompiler_builtins/src/lib.rs --cfg 'feature="compiler-builtins"' --cfg 'feature="mem"'
|
||||||
@ -81,15 +62,9 @@ let
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation {
|
runCommand "rustc" {}
|
||||||
name = "rustc";
|
''
|
||||||
inherit src version;
|
mkdir -p $out/lib/rustlib/or1k-unknown-none/lib/
|
||||||
buildCommand = ''
|
cp -r ${or1k-crates}/* $out/lib/rustlib/or1k-unknown-none/lib/
|
||||||
mkdir -p $out/lib/rustlib/or1k-unknown-none/lib/
|
cp -r ${rustc_internal}/* $out
|
||||||
cp -r ${or1k-crates}/* $out/lib/rustlib/or1k-unknown-none/lib/
|
''
|
||||||
mkdir -p $out/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/
|
|
||||||
cp -r ${arm-crates}/* $out/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/
|
|
||||||
cp -r ${rustc_internal}/* $out
|
|
||||||
'';
|
|
||||||
passAsFile = [ "buildCommand" ];
|
|
||||||
}
|
|
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, lib, targetPackages
|
{ stdenv, targetPackages
|
||||||
, fetchurl, file, python2, tzdata, ps
|
, fetchurl, file, python2, tzdata, ps
|
||||||
, llvm-or1k, ncurses, zlib, darwin, rustPlatform, git, cmake, curl
|
, llvm-or1k, ncurses, zlib, darwin, rustPlatform, git, cmake, curl
|
||||||
, which, libffi, gdb
|
, which, libffi, gdb
|
||||||
@ -14,7 +14,7 @@
|
|||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) optional optionalString;
|
inherit (stdenv.lib) optional optionalString;
|
||||||
inherit (darwin.apple_sdk.frameworks) Security;
|
inherit (darwin.apple_sdk.frameworks) Security;
|
||||||
|
|
||||||
target = builtins.replaceStrings [" "] [","] (builtins.toString targets);
|
target = builtins.replaceStrings [" "] [","] (builtins.toString targets);
|
||||||
@ -26,7 +26,7 @@ let
|
|||||||
in
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
pname = "rustc";
|
name = "rustc-${version}";
|
||||||
inherit version;
|
inherit version;
|
||||||
|
|
||||||
inherit src;
|
inherit src;
|
||||||
@ -171,7 +171,7 @@ stdenv.mkDerivation {
|
|||||||
# https://github.com/rust-lang/rust/issues/30181
|
# https://github.com/rust-lang/rust/issues/30181
|
||||||
# enableParallelBuilding = false;
|
# enableParallelBuilding = false;
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = https://www.rust-lang.org/;
|
homepage = https://www.rust-lang.org/;
|
||||||
description = "A safe, concurrent, practical language";
|
description = "A safe, concurrent, practical language";
|
||||||
maintainers = with maintainers; [ sb0 ];
|
maintainers = with maintainers; [ sb0 ];
|
6
artiq/shell-dev.nix
Normal file
6
artiq/shell-dev.nix
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{ pkgs ? import <nixpkgs> {}}:
|
||||||
|
|
||||||
|
let
|
||||||
|
artiq-dev = import ./artiq-dev.nix { inherit pkgs; };
|
||||||
|
in
|
||||||
|
artiq-dev.env
|
25
artiq/windows/README.md
Normal file
25
artiq/windows/README.md
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
# Preparation steps
|
||||||
|
|
||||||
|
## Install a Windows image
|
||||||
|
|
||||||
|
```shell
|
||||||
|
nix-build install.nix -I artiqSrc=…/artiq
|
||||||
|
result/bin/windows-installer.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
Follow the instructions.
|
||||||
|
|
||||||
|
## Install Anaconda to the image
|
||||||
|
|
||||||
|
```shell
|
||||||
|
result/bin/anaconda-installer.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
Move the image `c.img` to one of Nix' `extra-sandbox-paths` (`nix.sandboxPaths` on NixOS).
|
||||||
|
|
||||||
|
|
||||||
|
# Running the tests manually
|
||||||
|
|
||||||
|
```shell
|
||||||
|
nix-build --pure --arg diskImage "\"…/c.img\"" -I artiqSrc=…/artiq manual-test-run.nix
|
||||||
|
```
|
91
artiq/windows/install.nix
Normal file
91
artiq/windows/install.nix
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
{ pkgs ? import <nixpkgs> {},
|
||||||
|
diskImageSize ? "22G",
|
||||||
|
qemuMem ? "4G",
|
||||||
|
}:
|
||||||
|
|
||||||
|
with pkgs;
|
||||||
|
|
||||||
|
let
|
||||||
|
windowsIso = fetchurl {
|
||||||
|
url = "https://software-download.microsoft.com/download/sg/17763.107.101029-1455.rs5_release_svc_refresh_CLIENT_LTSC_EVAL_x64FRE_en-us.iso";
|
||||||
|
sha256 = "668fe1af70c2f7416328aee3a0bb066b12dc6bbd2576f40f812b95741e18bc3a";
|
||||||
|
};
|
||||||
|
anaconda = fetchurl {
|
||||||
|
url = "https://repo.anaconda.com/archive/Anaconda3-2019.03-Windows-x86_64.exe";
|
||||||
|
sha256 = "1f9icm5rwab6l1f23a70dw0qixzrl62wbglimip82h4zhxlh3jfj";
|
||||||
|
};
|
||||||
|
|
||||||
|
escape = builtins.replaceStrings [ "\\" ] [ "\\\\" ];
|
||||||
|
qemu = import ./qemu.nix {
|
||||||
|
inherit pkgs qemuMem;
|
||||||
|
diskImage = "c.img";
|
||||||
|
};
|
||||||
|
# Double-escape because we produce a script from a shell heredoc
|
||||||
|
ssh = cmd: qemu.ssh (escape cmd);
|
||||||
|
scp = qemu.scp;
|
||||||
|
|
||||||
|
sshCondaEnv = cmd: ssh "anaconda\\scripts\\activate && ${cmd}";
|
||||||
|
condaEnv = "artiq-env";
|
||||||
|
condaDepSpecs =
|
||||||
|
builtins.concatStringsSep " "
|
||||||
|
(map (s: "\"${s}\"")
|
||||||
|
(import ../conda-artiq-deps.nix));
|
||||||
|
|
||||||
|
instructions =
|
||||||
|
builtins.toFile "install.txt"
|
||||||
|
(builtins.readFile ./install.txt);
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
name = "windows-installer";
|
||||||
|
src = windowsIso;
|
||||||
|
setSourceRoot = "sourceRoot=`pwd`";
|
||||||
|
unpackCmd = ''
|
||||||
|
ln -s $curSrc windows.iso
|
||||||
|
'';
|
||||||
|
propagatedBuildInputs = qemu.inputs;
|
||||||
|
dontBuild = true;
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin $out/data
|
||||||
|
ln -s $(readlink windows.iso) $out/data/windows.iso
|
||||||
|
cat > $out/bin/windows-installer.sh << EOF
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -e -m
|
||||||
|
|
||||||
|
${qemu.qemu-img} create -f qcow2 c.img ${diskImageSize}
|
||||||
|
${qemu.runQemu false [] [
|
||||||
|
"-boot" "order=d"
|
||||||
|
"-drive" "file=c.img,index=0,media=disk,cache=unsafe"
|
||||||
|
"-drive" "file=$out/data/windows.iso,index=1,media=cdrom,cache=unsafe"
|
||||||
|
]} &
|
||||||
|
cat ${instructions}
|
||||||
|
wait
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cat > $out/bin/anaconda-installer.sh << EOF
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -e -m
|
||||||
|
|
||||||
|
${qemu.runQemu false [] [
|
||||||
|
"-boot" "order=c"
|
||||||
|
"-drive" "file=c.img,index=0,media=disk"
|
||||||
|
]} &
|
||||||
|
sleep 10
|
||||||
|
${ssh "ver"}
|
||||||
|
|
||||||
|
${scp anaconda "Anaconda.exe"}
|
||||||
|
${ssh "start /wait \"\" Anaconda.exe /S /D=%cd%\\anaconda"}
|
||||||
|
|
||||||
|
${sshCondaEnv "conda config --add channels conda-forge"}
|
||||||
|
${sshCondaEnv "conda config --add channels m-labs"}
|
||||||
|
( ${sshCondaEnv "conda update -y conda"} ) || true
|
||||||
|
${sshCondaEnv "conda update -y --all"}
|
||||||
|
${sshCondaEnv "conda create -y -n ${condaEnv}"}
|
||||||
|
${sshCondaEnv "conda install -y -n ${condaEnv} ${condaDepSpecs}"}
|
||||||
|
${ssh "shutdown /p /f"}
|
||||||
|
|
||||||
|
echo "Waiting for qemu exit"
|
||||||
|
wait
|
||||||
|
EOF
|
||||||
|
chmod a+x $out/bin/*.sh
|
||||||
|
'';
|
||||||
|
}
|
13
artiq/windows/install.txt
Normal file
13
artiq/windows/install.txt
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
Add user account with expected password [user/user].
|
||||||
|
Enable the OpenSSH server:
|
||||||
|
- "Add or remove programs"
|
||||||
|
- "Manage optional features"
|
||||||
|
- "Add a feature"
|
||||||
|
- "OpenSSH Server"
|
||||||
|
- "Install"
|
||||||
|
- Open "Services"
|
||||||
|
- Double-click the "OpenSSH SSH Server" service
|
||||||
|
- Set "Startup type" to "Automatic"
|
||||||
|
- "Start"
|
||||||
|
- "Ok"
|
||||||
|
Then press ENTER here to proceed with automatic installation
|
27
artiq/windows/manual-test-run.nix
Normal file
27
artiq/windows/manual-test-run.nix
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
# This runs `run-test.nix` with `nix-build`
|
||||||
|
|
||||||
|
{ pkgs ? import <nixpkgs> {},
|
||||||
|
diskImage ? "/opt/windows/c.img",
|
||||||
|
qemuMem ? "2G",
|
||||||
|
testTimeout ? 180,
|
||||||
|
}:
|
||||||
|
|
||||||
|
with pkgs;
|
||||||
|
|
||||||
|
let
|
||||||
|
windowsRunner = overrides:
|
||||||
|
import ./run-test.nix ({
|
||||||
|
inherit pkgs diskImage qemuMem testTimeout;
|
||||||
|
} // overrides);
|
||||||
|
in
|
||||||
|
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
name = "windows-test";
|
||||||
|
|
||||||
|
phases = [ "installPhase" "checkPhase" ];
|
||||||
|
installPhase = "touch $out";
|
||||||
|
doCheck = true;
|
||||||
|
checkPhase = ''
|
||||||
|
${windowsRunner { testCommand = "set ARTIQ_ROOT=%cd%\\anaconda\\envs\\artiq-env\\Lib\\site-packages\\artiq\\examples\\kc705_nist_clock&&python -m unittest discover -v artiq.test"; }}/bin/run.sh
|
||||||
|
'';
|
||||||
|
}
|
54
artiq/windows/qemu.nix
Normal file
54
artiq/windows/qemu.nix
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
{ pkgs,
|
||||||
|
diskImage,
|
||||||
|
qemuMem,
|
||||||
|
sshUser ? "user",
|
||||||
|
sshPassword ? "user",
|
||||||
|
}:
|
||||||
|
|
||||||
|
with pkgs;
|
||||||
|
|
||||||
|
let
|
||||||
|
qemu-img = "${qemu_kvm}/bin/qemu-img";
|
||||||
|
runQemu = isolateNetwork: forwardedPorts: extraArgs:
|
||||||
|
let
|
||||||
|
restrict =
|
||||||
|
if isolateNetwork
|
||||||
|
then "on"
|
||||||
|
else "off";
|
||||||
|
# use socat instead of `tcp:…` to allow multiple connections
|
||||||
|
guestfwds =
|
||||||
|
builtins.concatStringsSep ""
|
||||||
|
(map ({ listenAddr, targetAddr, port }:
|
||||||
|
",guestfwd=tcp:${listenAddr}:${toString port}-cmd:${socat}/bin/socat\\ -\\ tcp:${targetAddr}:${toString port}"
|
||||||
|
) forwardedPorts);
|
||||||
|
args = [
|
||||||
|
"-enable-kvm"
|
||||||
|
"-m" qemuMem
|
||||||
|
"-bios" "${OVMF.fd}/FV/OVMF.fd"
|
||||||
|
"-netdev" "user,id=n1,net=192.168.1.0/24,restrict=${restrict},hostfwd=tcp::2022-:22${guestfwds}"
|
||||||
|
"-device" "e1000,netdev=n1"
|
||||||
|
];
|
||||||
|
argStr = builtins.concatStringsSep " " (args ++ extraArgs);
|
||||||
|
in "${qemu_kvm}/bin/qemu-system-x86_64 ${argStr}";
|
||||||
|
|
||||||
|
# Pass empty config file to prevent ssh from failing to create ~/.ssh
|
||||||
|
sshOpts = "-F /dev/null -o StrictHostKeyChecking=accept-new -o UserKnownHostsFile=\$TMP/known_hosts";
|
||||||
|
ssh = cmd: ''
|
||||||
|
echo ssh windows '${cmd}'
|
||||||
|
${sshpass}/bin/sshpass -p${sshPassword} -- \
|
||||||
|
${openssh}/bin/ssh -np 2022 ${sshOpts} \
|
||||||
|
${sshUser}@localhost \
|
||||||
|
'${cmd}'
|
||||||
|
'';
|
||||||
|
scp = src: target: ''
|
||||||
|
echo "Copy ${src} to ${target}"
|
||||||
|
${sshpass}/bin/sshpass -p${sshPassword} -- \
|
||||||
|
${openssh}/bin/scp -P 2022 ${sshOpts} \
|
||||||
|
"${src}" "${sshUser}@localhost:${target}"
|
||||||
|
'';
|
||||||
|
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit qemu-img runQemu ssh scp;
|
||||||
|
inputs = [ qemu_kvm openssh sshpass ];
|
||||||
|
}
|
80
artiq/windows/run-test.nix
Normal file
80
artiq/windows/run-test.nix
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
{ pkgs,
|
||||||
|
diskImage ? "/opt/windows/c.img",
|
||||||
|
qemuMem ? "2G",
|
||||||
|
testTimeout ? 600,
|
||||||
|
artiqPkg ? import ../conda-artiq.nix { inherit pkgs; },
|
||||||
|
testCommand ? "python -m unittest discover -v artiq.test",
|
||||||
|
}:
|
||||||
|
|
||||||
|
with pkgs;
|
||||||
|
|
||||||
|
let
|
||||||
|
escape = builtins.replaceStrings [ "\\" ] [ "\\\\" ];
|
||||||
|
qemu = import ./qemu.nix {
|
||||||
|
inherit pkgs qemuMem;
|
||||||
|
diskImage = "c.img";
|
||||||
|
};
|
||||||
|
# Double-escape because we produce a script from a shell heredoc
|
||||||
|
ssh = cmd: qemu.ssh (escape cmd);
|
||||||
|
scp = qemu.scp;
|
||||||
|
condaEnv = "artiq-env";
|
||||||
|
tcpPorts = [ 1380 1381 1382 1383 ];
|
||||||
|
forwardedPorts =
|
||||||
|
map (port: {
|
||||||
|
listenAddr = "192.168.1.50";
|
||||||
|
targetAddr = "192.168.1.50";
|
||||||
|
inherit port;
|
||||||
|
}) tcpPorts;
|
||||||
|
in
|
||||||
|
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
name = "windows-test-runner";
|
||||||
|
src = ./.;
|
||||||
|
|
||||||
|
propagatedBuildInputs = qemu.inputs;
|
||||||
|
dontBuild = true;
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cat > $out/bin/run.sh << EOF
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -e -m
|
||||||
|
|
||||||
|
# +1 day from last modification of the disk image
|
||||||
|
CLOCK=$(date -Is -d @$(expr $(stat -c %Y ${diskImage}) + 86400))
|
||||||
|
${qemu.runQemu true forwardedPorts [
|
||||||
|
"-boot" "order=c"
|
||||||
|
"-snapshot"
|
||||||
|
"-drive" "file=${diskImage},index=0,media=disk,cache=unsafe"
|
||||||
|
"-rtc" "base=\\$CLOCK"
|
||||||
|
"-display" "none"
|
||||||
|
]} &
|
||||||
|
|
||||||
|
echo "Wait for Windows to boot"
|
||||||
|
sleep 10
|
||||||
|
${ssh "ver"}
|
||||||
|
for pkg in ${artiqPkg}/noarch/artiq*.tar.bz2 ; do
|
||||||
|
${scp "\\$pkg" "artiq.tar.bz2"}
|
||||||
|
${ssh "anaconda\\scripts\\activate ${condaEnv} && conda install artiq.tar.bz2"}
|
||||||
|
done
|
||||||
|
|
||||||
|
# Schedule a timed shutdown against hanging test runs
|
||||||
|
${ssh "shutdown -s -t ${toString testTimeout}"}
|
||||||
|
|
||||||
|
FAIL=n
|
||||||
|
( ${ssh "anaconda\\scripts\\activate ${condaEnv} && ${testCommand}"} ) || FAIL=y
|
||||||
|
|
||||||
|
# Abort timeouted shutdown
|
||||||
|
${ssh "shutdown -a"}
|
||||||
|
# Power off immediately
|
||||||
|
${ssh "shutdown -p -f"}
|
||||||
|
wait
|
||||||
|
|
||||||
|
if [ "\$FAIL" = "y" ]; then
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
EOF
|
||||||
|
chmod a+x $out/bin/run.sh
|
||||||
|
'';
|
||||||
|
}
|
@ -1,6 +0,0 @@
|
|||||||
{ pkgs ? import <nixpkgs> {} }:
|
|
||||||
|
|
||||||
let
|
|
||||||
jobs = import ./gluelogic/default.nix { inherit pkgs; };
|
|
||||||
in
|
|
||||||
builtins.mapAttrs (key: value: pkgs.lib.hydraJob value) jobs
|
|
@ -1,105 +0,0 @@
|
|||||||
{ pkgs ? import <nixpkgs> {} }:
|
|
||||||
let
|
|
||||||
artiqpkgs = import ../artiq-fast/pkgs/python-deps.nix { inherit (pkgs) stdenv fetchgit fetchFromGitHub python3Packages; misoc-new = true; };
|
|
||||||
ise = import ./ise.nix { inherit pkgs; };
|
|
||||||
vivado = import ../artiq-fast/vivado.nix { inherit pkgs; };
|
|
||||||
buildUrukulCpld = {version, src}: pkgs.stdenv.mkDerivation {
|
|
||||||
pname = "urukul-cpld";
|
|
||||||
inherit src version;
|
|
||||||
buildInputs = [(pkgs.python3.withPackages(ps: [artiqpkgs.migen]))] ++ (builtins.attrValues ise);
|
|
||||||
phases = ["buildPhase" "installPhase"];
|
|
||||||
buildPhase = "python $src/urukul_impl.py";
|
|
||||||
installPhase =
|
|
||||||
''
|
|
||||||
mkdir -p $out $out/nix-support
|
|
||||||
cp build/urukul.jed $out
|
|
||||||
echo file binary-dist $out/urukul.jed >> $out/nix-support/hydra-build-products
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
buildMirnyCpld = {version, src}: pkgs.stdenv.mkDerivation {
|
|
||||||
pname = "mirny-cpld";
|
|
||||||
inherit src version;
|
|
||||||
buildInputs = [(pkgs.python3.withPackages(ps: [artiqpkgs.migen]))] ++ (builtins.attrValues ise);
|
|
||||||
phases = ["buildPhase" "installPhase"];
|
|
||||||
buildPhase = "python $src/mirny_impl.py";
|
|
||||||
installPhase =
|
|
||||||
''
|
|
||||||
mkdir -p $out $out/nix-support
|
|
||||||
cp build/mirny.jed $out
|
|
||||||
echo file binary-dist $out/mirny.jed >> $out/nix-support/hydra-build-products
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
urukul-cpld-master = buildUrukulCpld {
|
|
||||||
version = "master";
|
|
||||||
src = <urukulSrc>;
|
|
||||||
};
|
|
||||||
urukul-cpld-release = buildUrukulCpld rec {
|
|
||||||
version = "1.4.0";
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "quartiq";
|
|
||||||
repo = "urukul";
|
|
||||||
rev = "v${version}";
|
|
||||||
sha256 = "1962jpzqzn22cwkcmfnvwqlj5i89pljhgfk64n6pk73clir9mp0w";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
urukul-cpld-legacy = buildUrukulCpld rec {
|
|
||||||
version = "1.3.1";
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "quartiq";
|
|
||||||
repo = "urukul";
|
|
||||||
rev = "v${version}";
|
|
||||||
sha256 = "1nvarspqbf9f7b27j34jkkh4mj6rwrlmccmfpz5nnzk3h2j6zbqc";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
mirny-cpld-master = buildMirnyCpld {
|
|
||||||
version = "master";
|
|
||||||
src = <mirnySrc>;
|
|
||||||
};
|
|
||||||
mirny-cpld-release = buildMirnyCpld rec {
|
|
||||||
version = "0.2.4";
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "quartiq";
|
|
||||||
repo = "mirny";
|
|
||||||
rev = "v${version}";
|
|
||||||
sha256 = "0fyz0g1h1s54zdivkfqhgyhpq7gjkl9kxkcfy3104p2f889l1vgw";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
fastino-fpga = pkgs.stdenv.mkDerivation {
|
|
||||||
name = "fastino-fpga";
|
|
||||||
src = <fastinoSrc>;
|
|
||||||
buildInputs = [(pkgs.python3.withPackages(ps: [artiqpkgs.migen artiqpkgs.misoc]))] ++ [pkgs.yosys pkgs.nextpnr pkgs.icestorm];
|
|
||||||
phases = ["buildPhase" "installPhase"];
|
|
||||||
buildPhase = "python $src/fastino_phy.py";
|
|
||||||
installPhase =
|
|
||||||
''
|
|
||||||
mkdir -p $out $out/nix-support
|
|
||||||
cp build/fastino.bin $out
|
|
||||||
echo file binary-dist $out/fastino.bin >> $out/nix-support/hydra-build-products
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
phaser-fpga = pkgs.stdenv.mkDerivation {
|
|
||||||
name = "phaser-fpga";
|
|
||||||
src = <phaserSrc>;
|
|
||||||
patchPhase = ''
|
|
||||||
substituteInPlace phaser.py \
|
|
||||||
--replace "source ../load.tcl" \
|
|
||||||
""
|
|
||||||
'';
|
|
||||||
|
|
||||||
buildInputs = [ (pkgs.python3.withPackages(ps: [ artiqpkgs.migen artiqpkgs.misoc ])) ] ++ [ vivado ];
|
|
||||||
buildPhase = "python phaser.py";
|
|
||||||
installPhase =
|
|
||||||
''
|
|
||||||
mkdir -p $out $out/nix-support
|
|
||||||
cp build/phaser.bit $out
|
|
||||||
echo file binary-dist $out/phaser.bit >> $out/nix-support/hydra-build-products
|
|
||||||
'';
|
|
||||||
dontFixup = true;
|
|
||||||
|
|
||||||
doCheck = true;
|
|
||||||
checkInputs = [ pkgs.python3Packages.pytest ];
|
|
||||||
checkPhase = "pytest";
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,31 +0,0 @@
|
|||||||
# Install ISE in /opt and add to /etc/nixos/configuration.nix:
|
|
||||||
# nix.sandboxPaths = ["/opt"];
|
|
||||||
|
|
||||||
{ pkgs, isePath ? "/opt/Xilinx/14.7/ISE_DS" }:
|
|
||||||
|
|
||||||
let
|
|
||||||
makeXilinxEnv = name: pkgs.buildFHSUserEnv {
|
|
||||||
inherit name;
|
|
||||||
targetPkgs = pkgs: (
|
|
||||||
with pkgs; [
|
|
||||||
ncurses5
|
|
||||||
zlib
|
|
||||||
libuuid
|
|
||||||
xorg.libSM
|
|
||||||
xorg.libICE
|
|
||||||
xorg.libXrender
|
|
||||||
xorg.libX11
|
|
||||||
xorg.libXext
|
|
||||||
xorg.libXtst
|
|
||||||
xorg.libXi
|
|
||||||
]
|
|
||||||
);
|
|
||||||
profile =
|
|
||||||
''
|
|
||||||
source ${isePath}/common/.settings64.sh ${isePath}/common
|
|
||||||
source ${isePath}/ISE/.settings64.sh ${isePath}/ISE
|
|
||||||
'';
|
|
||||||
runScript = name;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
pkgs.lib.attrsets.genAttrs ["xst" "ngdbuild" "cpldfit" "taengine" "hprep6"] makeXilinxEnv
|
|
197
hydra/artiq.json
197
hydra/artiq.json
@ -1,187 +1,16 @@
|
|||||||
{
|
{
|
||||||
"fast-beta": {
|
"enabled": 1,
|
||||||
"enabled": 1,
|
"hidden": true,
|
||||||
"hidden": false,
|
"description": "js",
|
||||||
"description": "Core ARTIQ packages to build fast for CI purposes (beta version)",
|
"nixexprinput": "nixScripts",
|
||||||
"nixexprinput": "nixScripts",
|
"nixexprpath": "hydra/artiq.nix",
|
||||||
"nixexprpath": "artiq-fast.nix",
|
"checkinterval": 300,
|
||||||
"checkinterval": 300,
|
"schedulingshares": 10,
|
||||||
"schedulingshares": 10,
|
"enableemail": false,
|
||||||
"enableemail": false,
|
"emailoverride": "",
|
||||||
"emailoverride": "",
|
"keepnr": 10,
|
||||||
"keepnr": 1,
|
"inputs": {
|
||||||
"inputs": {
|
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs-channels nixos-19.03", "emailresponsible": false },
|
||||||
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-20.09", "emailresponsible": false },
|
"nixScripts": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/nix-scripts.git", "emailresponsible": false }
|
||||||
"nixScripts": { "type": "git", "value": "https://git.m-labs.hk/astro/nix-scripts.git", "emailresponsible": false },
|
|
||||||
"artiqSrc": { "type": "git", "value": "git://github.com/m-labs/artiq.git master 1", "emailresponsible": false }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"board-generated-beta": {
|
|
||||||
"enabled": 1,
|
|
||||||
"hidden": false,
|
|
||||||
"description": "Generated code for ARTIQ boards (beta version)",
|
|
||||||
"nixexprinput": "nixScripts",
|
|
||||||
"nixexprpath": "artiq-board-generated",
|
|
||||||
"checkinterval": 14400,
|
|
||||||
"schedulingshares": 1,
|
|
||||||
"enableemail": false,
|
|
||||||
"emailoverride": "",
|
|
||||||
"keepnr": 1,
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-20.09", "emailresponsible": false },
|
|
||||||
"nixScripts": { "type": "git", "value": "https://git.m-labs.hk/astro/nix-scripts.git", "emailresponsible": false },
|
|
||||||
"sinaraSystemsSrc": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/sinara-systems.git master 1", "emailresponsible": false },
|
|
||||||
"artiq-fast": { "type": "sysbuild", "value": "artiq:fast-beta:generated-nix", "emailresponsible": false }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"full-beta": {
|
|
||||||
"enabled": 1,
|
|
||||||
"hidden": false,
|
|
||||||
"description": "Full set of ARTIQ packages (beta version)",
|
|
||||||
"nixexprinput": "nixScripts",
|
|
||||||
"nixexprpath": "artiq-full.nix",
|
|
||||||
"checkinterval": 86400,
|
|
||||||
"schedulingshares": 1,
|
|
||||||
"enableemail": false,
|
|
||||||
"emailoverride": "",
|
|
||||||
"keepnr": 1,
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-20.09", "emailresponsible": false },
|
|
||||||
"nixScripts": { "type": "git", "value": "https://git.m-labs.hk/astro/nix-scripts.git", "emailresponsible": false },
|
|
||||||
"a6p": { "type": "boolean", "value": "true" },
|
|
||||||
"artiq-board-generated": { "type": "sysbuild", "value": "artiq:board-generated-beta:generated-nix", "emailresponsible": false }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
"fast": {
|
|
||||||
"enabled": 1,
|
|
||||||
"hidden": false,
|
|
||||||
"description": "Core ARTIQ packages to build fast for CI purposes",
|
|
||||||
"nixexprinput": "nixScripts",
|
|
||||||
"nixexprpath": "artiq-fast.nix",
|
|
||||||
"checkinterval": 300,
|
|
||||||
"schedulingshares": 10,
|
|
||||||
"enableemail": false,
|
|
||||||
"emailoverride": "",
|
|
||||||
"keepnr": 1,
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-20.09", "emailresponsible": false },
|
|
||||||
"nixScripts": { "type": "git", "value": "https://git.m-labs.hk/astro/nix-scripts.git", "emailresponsible": false },
|
|
||||||
"artiqSrc": { "type": "git", "value": "git://github.com/m-labs/artiq.git release-6 1", "emailresponsible": false }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"board-generated": {
|
|
||||||
"enabled": 1,
|
|
||||||
"hidden": false,
|
|
||||||
"description": "Generated code for ARTIQ boards",
|
|
||||||
"nixexprinput": "nixScripts",
|
|
||||||
"nixexprpath": "artiq-board-generated",
|
|
||||||
"checkinterval": 14400,
|
|
||||||
"schedulingshares": 1,
|
|
||||||
"enableemail": false,
|
|
||||||
"emailoverride": "",
|
|
||||||
"keepnr": 1,
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-20.09", "emailresponsible": false },
|
|
||||||
"nixScripts": { "type": "git", "value": "https://git.m-labs.hk/astro/nix-scripts.git", "emailresponsible": false },
|
|
||||||
"sinaraSystemsSrc": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/sinara-systems.git master 1", "emailresponsible": false },
|
|
||||||
"artiq-fast": { "type": "sysbuild", "value": "artiq:fast:generated-nix", "emailresponsible": false }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"full": {
|
|
||||||
"enabled": 1,
|
|
||||||
"hidden": false,
|
|
||||||
"description": "Full set of ARTIQ packages",
|
|
||||||
"nixexprinput": "nixScripts",
|
|
||||||
"nixexprpath": "artiq-full.nix",
|
|
||||||
"checkinterval": 86400,
|
|
||||||
"schedulingshares": 1,
|
|
||||||
"enableemail": false,
|
|
||||||
"emailoverride": "",
|
|
||||||
"keepnr": 1,
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-20.09", "emailresponsible": false },
|
|
||||||
"nixScripts": { "type": "git", "value": "https://git.m-labs.hk/astro/nix-scripts.git", "emailresponsible": false },
|
|
||||||
"a6p": { "type": "boolean", "value": "true" },
|
|
||||||
"artiq-board-generated": { "type": "sysbuild", "value": "artiq:board-generated:generated-nix", "emailresponsible": false }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
"fast-legacy": {
|
|
||||||
"enabled": 1,
|
|
||||||
"hidden": false,
|
|
||||||
"description": "Core ARTIQ packages to build fast for CI purposes (legacy version)",
|
|
||||||
"nixexprinput": "nixScripts",
|
|
||||||
"nixexprpath": "artiq-fast.nix",
|
|
||||||
"checkinterval": 300,
|
|
||||||
"schedulingshares": 10,
|
|
||||||
"enableemail": false,
|
|
||||||
"emailoverride": "",
|
|
||||||
"keepnr": 1,
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-20.03", "emailresponsible": false },
|
|
||||||
"nixScripts": { "type": "git", "value": "https://git.m-labs.hk/astro/nix-scripts.git", "emailresponsible": false },
|
|
||||||
"artiqSrc": { "type": "git", "value": "git://github.com/m-labs/artiq.git release-5 1", "emailresponsible": false }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"full-legacy": {
|
|
||||||
"enabled": 1,
|
|
||||||
"hidden": false,
|
|
||||||
"description": "Full set of ARTIQ packages (legacy version)",
|
|
||||||
"nixexprinput": "nixScripts",
|
|
||||||
"nixexprpath": "artiq-full.nix",
|
|
||||||
"checkinterval": 86400,
|
|
||||||
"schedulingshares": 1,
|
|
||||||
"enableemail": false,
|
|
||||||
"emailoverride": "",
|
|
||||||
"keepnr": 1,
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-20.03", "emailresponsible": false },
|
|
||||||
"nixScripts": { "type": "git", "value": "https://git.m-labs.hk/astro/nix-scripts.git", "emailresponsible": false },
|
|
||||||
"sinaraSystemsSrc": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/sinara-systems.git master 1", "emailresponsible": false },
|
|
||||||
"a6p": { "type": "boolean", "value": "false" },
|
|
||||||
"artiq-fast": { "type": "sysbuild", "value": "artiq:fast-legacy:generated-nix", "emailresponsible": false }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
"gluelogic": {
|
|
||||||
"enabled": 1,
|
|
||||||
"hidden": false,
|
|
||||||
"description": "Glue logic gateware for Sinara devices",
|
|
||||||
"nixexprinput": "nixScripts",
|
|
||||||
"nixexprpath": "gluelogic.nix",
|
|
||||||
"checkinterval": 172800,
|
|
||||||
"schedulingshares": 1,
|
|
||||||
"enableemail": false,
|
|
||||||
"emailoverride": "",
|
|
||||||
"keepnr": 1,
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-20.09", "emailresponsible": false },
|
|
||||||
"nixScripts": { "type": "git", "value": "https://git.m-labs.hk/astro/nix-scripts.git", "emailresponsible": false },
|
|
||||||
"urukulSrc": { "type": "git", "value": "git://github.com/quartiq/urukul", "emailresponsible": false },
|
|
||||||
"mirnySrc": { "type": "git", "value": "git://github.com/quartiq/mirny", "emailresponsible": false },
|
|
||||||
"fastinoSrc": { "type": "git", "value": "git://github.com/quartiq/fastino", "emailresponsible": false },
|
|
||||||
"phaserSrc": { "type": "git", "value": "git://github.com/quartiq/phaser", "emailresponsible": false }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
"zynq": {
|
|
||||||
"enabled": 1,
|
|
||||||
"hidden": false,
|
|
||||||
"description": "ARTIQ on Zynq",
|
|
||||||
"nixexprinput": "nixScripts",
|
|
||||||
"nixexprpath": "zynq.nix",
|
|
||||||
"checkinterval": 300,
|
|
||||||
"schedulingshares": 1,
|
|
||||||
"enableemail": false,
|
|
||||||
"emailoverride": "",
|
|
||||||
"keepnr": 1,
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-20.09", "emailresponsible": false },
|
|
||||||
"nixScripts": { "type": "git", "value": "https://git.m-labs.hk/astro/nix-scripts.git", "emailresponsible": false },
|
|
||||||
"artiq-fast": { "type": "sysbuild", "value": "artiq:fast:generated-nix", "emailresponsible": false },
|
|
||||||
"zynq-rs": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/zynq-rs.git", "emailresponsible": false },
|
|
||||||
"artiq-zynq": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/artiq-zynq.git", "emailresponsible": false }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
45
hydra/artiq.nix
Normal file
45
hydra/artiq.nix
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
{ pkgs ? import <nixpkgs> {}}:
|
||||||
|
{
|
||||||
|
jobsets = pkgs.runCommand "spec.json" {}
|
||||||
|
''
|
||||||
|
cat > $out << EOF
|
||||||
|
{
|
||||||
|
"main": {
|
||||||
|
"enabled": 1,
|
||||||
|
"hidden": false,
|
||||||
|
"description": "Main ARTIQ packages and board support packages for HITL CI",
|
||||||
|
"nixexprinput": "nixScripts",
|
||||||
|
"nixexprpath": "main.nix",
|
||||||
|
"checkinterval": 300,
|
||||||
|
"schedulingshares": 10,
|
||||||
|
"enableemail": false,
|
||||||
|
"emailoverride": "",
|
||||||
|
"keepnr": 10,
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs-channels nixos-19.03", "emailresponsible": false },
|
||||||
|
"nixScripts": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/nix-scripts.git", "emailresponsible": false },
|
||||||
|
"artiqSrc": { "type": "git", "value": "git://github.com/m-labs/artiq.git master 1", "emailresponsible": false }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sinara-systems": {
|
||||||
|
"enabled": 1,
|
||||||
|
"hidden": false,
|
||||||
|
"description": "Board support packages for other Sinara systems",
|
||||||
|
"nixexprinput": "nixScripts",
|
||||||
|
"nixexprpath": "sinara-systems.nix",
|
||||||
|
"checkinterval": 86400,
|
||||||
|
"schedulingshares": 1,
|
||||||
|
"enableemail": false,
|
||||||
|
"emailoverride": "",
|
||||||
|
"keepnr": 10,
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs-channels nixos-19.03", "emailresponsible": false },
|
||||||
|
"nixScripts": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/nix-scripts.git", "emailresponsible": false },
|
||||||
|
"sinaraSystemsSrc": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/sinara-systems.git master 1", "emailresponsible": false },
|
||||||
|
"m-labs": { "type": "sysbuild", "value": "artiq:main:generated-nix", "emailresponsible": false }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
'';
|
||||||
|
}
|
16
hydra/fpga.json
Normal file
16
hydra/fpga.json
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"enabled": 1,
|
||||||
|
"hidden": true,
|
||||||
|
"description": "js",
|
||||||
|
"nixexprinput": "nixScripts",
|
||||||
|
"nixexprpath": "hydra/fpga.nix",
|
||||||
|
"checkinterval": 300,
|
||||||
|
"schedulingshares": 10,
|
||||||
|
"enableemail": false,
|
||||||
|
"emailoverride": "",
|
||||||
|
"keepnr": 10,
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs-channels nixos-unstable", "emailresponsible": false },
|
||||||
|
"nixScripts": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/nix-scripts.git", "emailresponsible": false }
|
||||||
|
}
|
||||||
|
}
|
26
hydra/fpga.nix
Normal file
26
hydra/fpga.nix
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{ pkgs ? import <nixpkgs> {}}:
|
||||||
|
{
|
||||||
|
jobsets = pkgs.runCommand "spec.json" {}
|
||||||
|
''
|
||||||
|
cat > $out << EOF
|
||||||
|
{
|
||||||
|
"heavyx": {
|
||||||
|
"enabled": 1,
|
||||||
|
"hidden": false,
|
||||||
|
"description": "HeavyX SoC toolkit experiment",
|
||||||
|
"nixexprinput": "heavyx",
|
||||||
|
"nixexprpath": "release.nix",
|
||||||
|
"checkinterval": 300,
|
||||||
|
"schedulingshares": 10,
|
||||||
|
"enableemail": false,
|
||||||
|
"emailoverride": "",
|
||||||
|
"keepnr": 10,
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs-channels nixos-unstable", "emailresponsible": false },
|
||||||
|
"heavyx": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/HeavyX.git", "emailresponsible": false }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
'';
|
||||||
|
}
|
@ -1,23 +0,0 @@
|
|||||||
{
|
|
||||||
"mcu": {
|
|
||||||
"enabled": 1,
|
|
||||||
"hidden": false,
|
|
||||||
"description": "MCU firmware",
|
|
||||||
"nixexprinput": "nixScripts",
|
|
||||||
"nixexprpath": "mcu.nix",
|
|
||||||
"checkinterval": 300,
|
|
||||||
"schedulingshares": 10,
|
|
||||||
"enableemail": false,
|
|
||||||
"emailoverride": "",
|
|
||||||
"keepnr": 10,
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-20.09", "emailresponsible": false },
|
|
||||||
"mozillaOverlay": { "type": "git", "value": "git://github.com/mozilla/nixpkgs-mozilla.git", "emailresponsible": false },
|
|
||||||
"nixScripts": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/nix-scripts.git", "emailresponsible": false },
|
|
||||||
"stabilizerSrc": { "type": "git", "value": "git://github.com/quartiq/stabilizer.git", "emailresponsible": false },
|
|
||||||
"thermostatSrc": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/thermostat.git", "emailresponsible": false },
|
|
||||||
"humpbackDdsSrc": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/humpback-dds.git", "emailresponsible": false },
|
|
||||||
"saymaMmcSrc": { "type": "git", "value": "git://github.com/sinara-hw/openMMC sayma-devel", "emailresponsible": false }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
16
hydra/stm32.json
Normal file
16
hydra/stm32.json
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"enabled": 1,
|
||||||
|
"hidden": true,
|
||||||
|
"description": "js",
|
||||||
|
"nixexprinput": "nixScripts",
|
||||||
|
"nixexprpath": "hydra/stm32.nix",
|
||||||
|
"checkinterval": 300,
|
||||||
|
"schedulingshares": 10,
|
||||||
|
"enableemail": false,
|
||||||
|
"emailoverride": "",
|
||||||
|
"keepnr": 10,
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs-channels nixos-19.03", "emailresponsible": false },
|
||||||
|
"nixScripts": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/nix-scripts.git", "emailresponsible": false }
|
||||||
|
}
|
||||||
|
}
|
29
hydra/stm32.nix
Normal file
29
hydra/stm32.nix
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
{ pkgs ? import <nixpkgs> {}}:
|
||||||
|
{
|
||||||
|
jobsets = pkgs.runCommand "spec.json" {}
|
||||||
|
''
|
||||||
|
cat > $out << EOF
|
||||||
|
{
|
||||||
|
"stm32": {
|
||||||
|
"enabled": 1,
|
||||||
|
"hidden": false,
|
||||||
|
"description": "STM32 firmware",
|
||||||
|
"nixexprinput": "nixScripts",
|
||||||
|
"nixexprpath": "stm32.nix",
|
||||||
|
"checkinterval": 300,
|
||||||
|
"schedulingshares": 10,
|
||||||
|
"enableemail": false,
|
||||||
|
"emailoverride": "",
|
||||||
|
"keepnr": 10,
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs-channels nixos-19.03", "emailresponsible": false },
|
||||||
|
"mozillaOverlay": { "type": "git", "value": "git://github.com/mozilla/nixpkgs-mozilla.git", "emailresponsible": false },
|
||||||
|
"nixScripts": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/nix-scripts.git", "emailresponsible": false },
|
||||||
|
"stabilizerSrc": { "type": "git", "value": "git://github.com/quartiq/stabilizer.git", "emailresponsible": false },
|
||||||
|
"thermostatSrc": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/thermostat.git", "emailresponsible": false }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
'';
|
||||||
|
}
|
@ -1,19 +0,0 @@
|
|||||||
{
|
|
||||||
"web": {
|
|
||||||
"enabled": 1,
|
|
||||||
"hidden": false,
|
|
||||||
"description": "M-Labs website",
|
|
||||||
"nixexprinput": "nixScripts",
|
|
||||||
"nixexprpath": "web.nix",
|
|
||||||
"checkinterval": 300,
|
|
||||||
"schedulingshares": 10,
|
|
||||||
"enableemail": false,
|
|
||||||
"emailoverride": "",
|
|
||||||
"keepnr": 10,
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-20.03", "emailresponsible": false },
|
|
||||||
"nixScripts": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/nix-scripts.git", "emailresponsible": false },
|
|
||||||
"webSrc": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/web2019.git", "emailresponsible": false }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -2,17 +2,10 @@ let
|
|||||||
pkgs = import <nixpkgs> {};
|
pkgs = import <nixpkgs> {};
|
||||||
artiqSrc = <artiqSrc>;
|
artiqSrc = <artiqSrc>;
|
||||||
generatedNix = pkgs.runCommand "generated-nix" { buildInputs = [ pkgs.nix pkgs.git ]; }
|
generatedNix = pkgs.runCommand "generated-nix" { buildInputs = [ pkgs.nix pkgs.git ]; }
|
||||||
# keep in sync with artiq-fast/pkgs/artiq-version.nix
|
|
||||||
''
|
''
|
||||||
cp --no-preserve=mode,ownership -R ${./artiq-fast} $out
|
cp --no-preserve=mode,ownership -R ${./artiq} $out
|
||||||
REV=`git --git-dir ${artiqSrc}/.git rev-parse HEAD`
|
REV=`git --git-dir ${artiqSrc}/.git rev-parse HEAD`
|
||||||
MAJOR_VERSION=`cat ${artiqSrc}/MAJOR_VERSION`
|
COMMITCOUNT=`git --git-dir ${artiqSrc}/.git rev-list --count HEAD`
|
||||||
if [ -e ${artiqSrc}/BETA ]; then
|
|
||||||
SUFFIX=".beta"
|
|
||||||
else
|
|
||||||
SUFFIX=""
|
|
||||||
fi
|
|
||||||
COMMIT_COUNT=`git --git-dir ${artiqSrc}/.git rev-list --count HEAD`
|
|
||||||
TIMESTAMP=`git --git-dir ${artiqSrc}/.git log -1 --format=%ct`
|
TIMESTAMP=`git --git-dir ${artiqSrc}/.git log -1 --format=%ct`
|
||||||
ARTIQ_SRC_CLEAN=`mktemp -d`
|
ARTIQ_SRC_CLEAN=`mktemp -d`
|
||||||
cp -a ${artiqSrc}/. $ARTIQ_SRC_CLEAN
|
cp -a ${artiqSrc}/. $ARTIQ_SRC_CLEAN
|
||||||
@ -28,60 +21,67 @@ let
|
|||||||
sha256 = "$HASH";
|
sha256 = "$HASH";
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
echo "{ stdenv, git, fetchgit }: \"$MAJOR_VERSION.$COMMIT_COUNT.`cut -c1-8 <<< $REV`$SUFFIX\"" > $out/pkgs/artiq-version.nix
|
echo "{ stdenv, git, fetchgit }: \"5.$COMMITCOUNT.`cut -c1-8 <<< $REV`.beta\"" > $out/pkgs/artiq-version.nix
|
||||||
echo "{ stdenv, git, fetchgit }: \"$TIMESTAMP\"" > $out/pkgs/artiq-timestamp.nix
|
echo "{ stdenv, git, fetchgit }: \"$TIMESTAMP\"" > $out/pkgs/artiq-timestamp.nix
|
||||||
|
'';
|
||||||
REV=`git --git-dir ${<nixpkgs>}/.git rev-parse HEAD`
|
generateTestOkHash = pkgs.runCommand "generate-test-ok-hash" { buildInputs = [ pkgs.nix ]; }
|
||||||
NIXPKGS_CLEAN=`mktemp -d`
|
''
|
||||||
cp -a ${<nixpkgs>}/. $NIXPKGS_CLEAN
|
TMPDIR=`mktemp -d`
|
||||||
chmod -R 755 $NIXPKGS_CLEAN/.git
|
cp ${generatedNix}/pkgs/artiq-version.nix $TMPDIR/passed
|
||||||
chmod 755 $NIXPKGS_CLEAN
|
HASH=`nix-hash --type sha256 --base32 $TMPDIR`
|
||||||
rm -rf $NIXPKGS_CLEAN/.git
|
echo \"$HASH\" > $out
|
||||||
HASH=`nix-hash --type sha256 --base32 $NIXPKGS_CLEAN`
|
|
||||||
cat > $out/pkgs/nixpkgs.nix << EOF
|
|
||||||
{ fetchgit }:
|
|
||||||
import (fetchgit {
|
|
||||||
url = "https://github.com/nixos/nixpkgs.git";
|
|
||||||
rev = "$REV";
|
|
||||||
sha256 = "$HASH";
|
|
||||||
})
|
|
||||||
EOF
|
|
||||||
'';
|
'';
|
||||||
artiqpkgs = import "${generatedNix}/default.nix" { inherit pkgs; };
|
artiqpkgs = import "${generatedNix}/default.nix" { inherit pkgs; };
|
||||||
artiqVersion = import "${generatedNix}/pkgs/artiq-version.nix" (with pkgs; { inherit stdenv fetchgit git; });
|
artiqVersion = import "${generatedNix}/pkgs/artiq-version.nix" (with pkgs; { inherit stdenv fetchgit git; });
|
||||||
windowsRunner = overrides:
|
windowsRunner = overrides:
|
||||||
import "${generatedNix}/windows/run-test.nix" ({
|
import "${generatedNix}/windows/run-test.nix" ({
|
||||||
inherit pkgs artiqpkgs;
|
inherit pkgs;
|
||||||
|
artiqPkg = artiqpkgs.conda-artiq;
|
||||||
} // overrides);
|
} // overrides);
|
||||||
jobs = (builtins.mapAttrs (key: value: pkgs.lib.hydraJob value) artiqpkgs);
|
jobs = (builtins.mapAttrs (key: value: pkgs.lib.hydraJob value) artiqpkgs) // {
|
||||||
|
# This is in the example in the ARTIQ manual - precompile it to speed up
|
||||||
|
# installation for users.
|
||||||
|
matplotlib-qt = pkgs.lib.hydraJob (pkgs.python3Packages.matplotlib.override { enableQt = true; });
|
||||||
|
# For Raspberry Pi JTAG servers
|
||||||
|
openocd-aarch64 = pkgs.lib.hydraJob ((import <nixpkgs> { system = "aarch64-linux"; }).callPackage ./artiq/pkgs/openocd.nix {});
|
||||||
|
};
|
||||||
in
|
in
|
||||||
jobs // {
|
jobs // {
|
||||||
generated-nix = pkgs.lib.hydraJob generatedNix; # used by artiq-full
|
generated-nix = pkgs.lib.hydraJob generatedNix; # used by sinara-systems
|
||||||
artiq-fast = pkgs.releaseTools.channel {
|
channel = pkgs.releaseTools.channel rec {
|
||||||
name = "artiq-fast";
|
name = "main";
|
||||||
src = generatedNix;
|
src = generatedNix;
|
||||||
constituents = builtins.attrValues jobs;
|
constituents = builtins.attrValues jobs;
|
||||||
};
|
};
|
||||||
|
|
||||||
windows-no-hardware-tests = pkgs.stdenv.mkDerivation {
|
windows-no-hardware-tests = pkgs.stdenv.mkDerivation {
|
||||||
name = "windows-no-hardware-tests";
|
name = "windows-no-hardware-tests";
|
||||||
|
buildInputs = [ (windowsRunner {}) ];
|
||||||
phases = [ "buildPhase" ];
|
phases = [ "buildPhase" ];
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
${windowsRunner { testCommand = "python -m unittest discover -v sipyco.test && python -m unittest discover -v artiq.test"; }}/bin/wfvm-run-windows-tests
|
${windowsRunner {}}/bin/run.sh
|
||||||
touch $out
|
touch $out
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# HACK: Abuse fixed-output derivations to escape the sandbox and run the hardware
|
||||||
|
# unit tests, all integrated in the Hydra interface.
|
||||||
|
# One major downside of this hack is the tests are only run when generateTestOkHash
|
||||||
|
# changes, i.e. when the ARTIQ version changes (and not the dependencies).
|
||||||
|
# Impure derivations, when they land in Nix/Hydra, should improve the situation.
|
||||||
extended-tests = pkgs.stdenv.mkDerivation {
|
extended-tests = pkgs.stdenv.mkDerivation {
|
||||||
name = "extended-tests";
|
name = "extended-tests";
|
||||||
|
|
||||||
# requires patched Nix
|
outputHashAlgo = "sha256";
|
||||||
__networked = true;
|
outputHashMode = "recursive";
|
||||||
|
outputHash = import generateTestOkHash;
|
||||||
|
__hydraRetry = false;
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
(pkgs.python3.withPackages(ps: [ ps.paramiko artiqpkgs.artiq artiqpkgs.artiq-board-kc705-nist_clock ]))
|
(pkgs.python3.withPackages(ps: [ ps.paramiko artiqpkgs.artiq artiqpkgs.artiq-board-kc705-nist_clock ]))
|
||||||
artiqpkgs.binutils-or1k
|
artiqpkgs.binutils-or1k
|
||||||
artiqpkgs.openocd
|
artiqpkgs.openocd
|
||||||
|
pkgs.iputils
|
||||||
pkgs.openssh
|
pkgs.openssh
|
||||||
];
|
];
|
||||||
phases = [ "buildPhase" ];
|
phases = [ "buildPhase" ];
|
||||||
@ -91,17 +91,12 @@ in
|
|||||||
mkdir $HOME/.ssh
|
mkdir $HOME/.ssh
|
||||||
cp /opt/hydra_id_rsa $HOME/.ssh/id_rsa
|
cp /opt/hydra_id_rsa $HOME/.ssh/id_rsa
|
||||||
cp /opt/hydra_id_rsa.pub $HOME/.ssh/id_rsa.pub
|
cp /opt/hydra_id_rsa.pub $HOME/.ssh/id_rsa.pub
|
||||||
echo "rpi-1 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMc7waNkP2HjL5Eo94evoxJhC8CbYj4i2n1THe5TPIR3" > $HOME/.ssh/known_hosts
|
echo "rpi-1,192.168.1.188 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMc7waNkP2HjL5Eo94evoxJhC8CbYj4i2n1THe5TPIR3" > $HOME/.ssh/known_hosts
|
||||||
chmod 600 $HOME/.ssh/id_rsa
|
chmod 600 $HOME/.ssh/id_rsa
|
||||||
LOCKCTL=$(mktemp -d)
|
LOCKCTL=$(mktemp -d)
|
||||||
mkfifo $LOCKCTL/lockctl
|
mkfifo $LOCKCTL/lockctl
|
||||||
|
|
||||||
cat $LOCKCTL/lockctl | ${pkgs.openssh}/bin/ssh \
|
cat $LOCKCTL/lockctl | ssh rpi-1 'flock /tmp/board_lock-kc705-1 -c "echo Ok; cat"' | (
|
||||||
-i $HOME/.ssh/id_rsa \
|
|
||||||
-o UserKnownHostsFile=$HOME/.ssh/known_hosts \
|
|
||||||
sb@rpi-1 \
|
|
||||||
'mkdir -p /tmp/board_lock && flock /tmp/board_lock/kc705-1 -c "echo Ok; cat"' \
|
|
||||||
| (
|
|
||||||
# End remote flock via FIFO
|
# End remote flock via FIFO
|
||||||
atexit_unlock() {
|
atexit_unlock() {
|
||||||
echo > $LOCKCTL/lockctl
|
echo > $LOCKCTL/lockctl
|
||||||
@ -113,15 +108,18 @@ in
|
|||||||
|
|
||||||
artiq_flash -t kc705 -H rpi-1
|
artiq_flash -t kc705 -H rpi-1
|
||||||
sleep 15
|
sleep 15
|
||||||
|
# ping: socket: Operation not permitted
|
||||||
|
#ping kc705-1 -c10 -w30
|
||||||
|
|
||||||
export ARTIQ_ROOT=`python -c "import artiq; print(artiq.__path__[0])"`/examples/kc705_nist_clock
|
export ARTIQ_ROOT=`python -c "import artiq; print(artiq.__path__[0])"`/examples/kc705_nist_clock
|
||||||
export ARTIQ_LOW_LATENCY=1
|
export ARTIQ_LOW_LATENCY=1
|
||||||
python -m unittest discover -v artiq.test.coredevice
|
python -m unittest discover -v artiq.test.coredevice
|
||||||
|
|
||||||
${windowsRunner { testCommand = "set ARTIQ_ROOT=%cd%\\Anaconda3\\envs\\artiq-env\\Lib\\site-packages\\artiq\\examples\\kc705_nist_clock&& python -m unittest discover -v artiq.test.coredevice"; }}/bin/wfvm-run-windows-tests
|
${windowsRunner { testCommand = "set ARTIQ_ROOT=%cd%\\anaconda\\envs\\artiq-env\\Lib\\site-packages\\artiq\\examples\\kc705_nist_clock&&python -m unittest discover -v artiq.test.coredevice"; }}/bin/run.sh
|
||||||
)
|
)
|
||||||
|
|
||||||
touch $out
|
mkdir $out
|
||||||
|
cp ${generatedNix}/pkgs/artiq-version.nix $out/passed
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
8
mcu.nix
8
mcu.nix
@ -1,8 +0,0 @@
|
|||||||
{ pkgs ? import <nixpkgs> {} }:
|
|
||||||
|
|
||||||
let
|
|
||||||
jobs = import ./mcu/default.nix {
|
|
||||||
mozillaOverlay = import <mozillaOverlay>;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
builtins.mapAttrs (key: value: pkgs.lib.hydraJob value) jobs
|
|
File diff suppressed because it is too large
Load Diff
105
mcu/default.nix
105
mcu/default.nix
@ -1,105 +0,0 @@
|
|||||||
{ # Use master branch of the overlay by default
|
|
||||||
mozillaOverlay ? import (builtins.fetchTarball https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz),
|
|
||||||
rustManifest ? ./channel-rust-nightly.toml
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
|
||||||
pkgs = import <nixpkgs> { overlays = [ mozillaOverlay ]; };
|
|
||||||
rustPlatform = pkgs.recurseIntoAttrs (pkgs.callPackage ./rustPlatform.nix {
|
|
||||||
inherit rustManifest;
|
|
||||||
});
|
|
||||||
buildStm32Firmware = { name, src, patchPhase ? "", extraNativeBuildInputs ? [], checkPhase ? "", ... } @ args:
|
|
||||||
let
|
|
||||||
# If binaryName is specified as an arg of buildStm32Firmware,
|
|
||||||
# then the .nix containing the cargoSha256 must be named "cargosha256-${binaryName}.nix";
|
|
||||||
# otherwise, the .nix must be named "cargosha256.nix".
|
|
||||||
cargoSha256Drv = pkgs.runCommand "${name}-cargosha256" { } ''
|
|
||||||
cp "${src}/cargosha256${
|
|
||||||
if (args ? binaryName) then "-" + args.binaryName else ""
|
|
||||||
}.nix" $out
|
|
||||||
'';
|
|
||||||
# If binaryName is specified as an arg of buildStm32Firmware,
|
|
||||||
# then use it as the filename of the ELF generated from `cargo build`;
|
|
||||||
# otherwise, use the `name` arg (i.e. the Rust package name) as the ELF filename.
|
|
||||||
binaryName = if (args ? binaryName) then args.binaryName else name;
|
|
||||||
in
|
|
||||||
rustPlatform.buildRustPackage rec {
|
|
||||||
inherit name;
|
|
||||||
version = "0.0.0";
|
|
||||||
|
|
||||||
inherit src;
|
|
||||||
cargoSha256 = (import cargoSha256Drv);
|
|
||||||
|
|
||||||
inherit patchPhase;
|
|
||||||
nativeBuildInputs = [ pkgs.llvm ] ++ extraNativeBuildInputs;
|
|
||||||
buildPhase = ''
|
|
||||||
export CARGO_HOME=$(mktemp -d cargo-home.XXX)
|
|
||||||
cargo build --release
|
|
||||||
'';
|
|
||||||
|
|
||||||
inherit checkPhase;
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out $out/nix-support
|
|
||||||
cp target/thumbv7em-none-eabihf/release/${binaryName} $out/${name}.elf
|
|
||||||
echo file binary-dist $out/${name}.elf >> $out/nix-support/hydra-build-products
|
|
||||||
llvm-objcopy -O binary target/thumbv7em-none-eabihf/release/${binaryName} $out/${name}.bin
|
|
||||||
echo file binary-dist $out/${name}.bin >> $out/nix-support/hydra-build-products
|
|
||||||
'';
|
|
||||||
|
|
||||||
dontFixup = true;
|
|
||||||
};
|
|
||||||
migen = (import ../artiq-fast/pkgs/python-deps.nix { inherit (pkgs) stdenv fetchgit fetchFromGitHub python3Packages; misoc-new = true; }).migen;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
stabilizer-dual-iir = buildStm32Firmware {
|
|
||||||
name = "stabilizer-dual-iir";
|
|
||||||
binaryName = "dual-iir";
|
|
||||||
src = <stabilizerSrc>;
|
|
||||||
patchPhase = ''
|
|
||||||
substituteInPlace src/hardware/configuration.rs \
|
|
||||||
--replace "IpAddress::v4(10, 34, 16, 103)" \
|
|
||||||
"IpAddress::v4(192, 168, 1, 76)" \
|
|
||||||
--replace "Ipv4Address::new(10, 34, 16, 1)" \
|
|
||||||
"Ipv4Address::new(192, 168, 1, 1)"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
thermostat = buildStm32Firmware {
|
|
||||||
name = "thermostat";
|
|
||||||
src = <thermostatSrc>;
|
|
||||||
checkPhase = ''
|
|
||||||
cargo test --target=${pkgs.rust.toRustTarget pkgs.stdenv.targetPlatform}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
humpback-dds = buildStm32Firmware {
|
|
||||||
name = "humpback-dds";
|
|
||||||
src = <humpbackDdsSrc>;
|
|
||||||
extraNativeBuildInputs = [
|
|
||||||
(pkgs.python3.withPackages(ps: [ migen ]))
|
|
||||||
pkgs.yosys
|
|
||||||
pkgs.nextpnr
|
|
||||||
pkgs.icestorm
|
|
||||||
];
|
|
||||||
};
|
|
||||||
# openMMC build system breaks if host compiler is not available, so do not use stdenvNoCC here
|
|
||||||
sayma-mmc = pkgs.stdenv.mkDerivation {
|
|
||||||
name = "sayma-mmc";
|
|
||||||
src = <saymaMmcSrc>;
|
|
||||||
phases = [ "unpackPhase" "buildPhase" "installPhase" ];
|
|
||||||
nativeBuildInputs = [ pkgs.cmake pkgs.gcc-arm-embedded ];
|
|
||||||
buildPhase =
|
|
||||||
''
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
cmake .. -DBOARD=sayma -DBOARD_RTM=sayma -DVERSION= -DTARGET_CONTROLLER=LPC1776 -DCMAKE_BUILD_TYPE=Debug
|
|
||||||
make
|
|
||||||
'';
|
|
||||||
installPhase =
|
|
||||||
''
|
|
||||||
mkdir $out
|
|
||||||
cp out/* $out
|
|
||||||
mkdir -p $out $out/nix-support
|
|
||||||
echo file binary-dist $out/openMMC.axf >> $out/nix-support/hydra-build-products
|
|
||||||
echo file binary-dist $out/openMMC.bin >> $out/nix-support/hydra-build-products
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,23 +0,0 @@
|
|||||||
{ recurseIntoAttrs, stdenv, lib,
|
|
||||||
makeRustPlatform,
|
|
||||||
fetchurl, patchelf,
|
|
||||||
rustManifest ? ./channel-rust-nightly.toml
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
|
||||||
targets = [
|
|
||||||
"thumbv7em-none-eabihf"
|
|
||||||
];
|
|
||||||
rustChannel =
|
|
||||||
lib.rustLib.fromManifestFile rustManifest {
|
|
||||||
inherit stdenv fetchurl patchelf;
|
|
||||||
};
|
|
||||||
rust =
|
|
||||||
rustChannel.rust.override {
|
|
||||||
inherit targets;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
makeRustPlatform {
|
|
||||||
rustc = rust;
|
|
||||||
cargo = rust;
|
|
||||||
}
|
|
54
nixbld-etc-nixos/backup-module.nix
Normal file
54
nixbld-etc-nixos/backup-module.nix
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
makeBackup = pkgs.writeScript "make-backup" ''
|
||||||
|
#!${pkgs.bash}/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
umask 0077
|
||||||
|
|
||||||
|
DBDUMPDIR=`mktemp -d`
|
||||||
|
pushd $DBDUMPDIR
|
||||||
|
|
||||||
|
${config.services.mysql.package}/bin/mysqldump --single-transaction flarum > flarum.sql
|
||||||
|
${pkgs.sudo}/bin/sudo -u mattermost ${config.services.postgresql.package}/bin/pg_dump mattermost > mattermost.sql
|
||||||
|
|
||||||
|
${pkgs.gnutar}/bin/tar cf - /etc/nixos /var/lib/gitea flarum.sql mattermost.sql | \
|
||||||
|
${pkgs.bzip2}/bin/bzip2 | \
|
||||||
|
${pkgs.gnupg}/bin/gpg --symmetric --batch --passphrase-file /etc/nixos/secret/backup-passphrase | \
|
||||||
|
${pkgs.rclone}/bin/rclone rcat --config /etc/nixos/secret/rclone.conf dropbox:backup-`date +%F`.tar.bz2.gpg
|
||||||
|
|
||||||
|
popd
|
||||||
|
rm -rf $DBDUMPDIR
|
||||||
|
|
||||||
|
echo Backup done
|
||||||
|
'';
|
||||||
|
cfg = config.services.mlabs-backup;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.services.mlabs-backup = {
|
||||||
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "Enable backups";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
systemd.services.mlabs-backup = {
|
||||||
|
description = "M-Labs backup";
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
User = "root";
|
||||||
|
Group = "root";
|
||||||
|
ExecStart = "${makeBackup}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.timers.mlabs-backup = {
|
||||||
|
description = "M-Labs backup";
|
||||||
|
wantedBy = [ "timers.target" ];
|
||||||
|
timerConfig.OnCalendar = "weekly";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user