forked from M-Labs/nix-scripts
Compare commits
262 Commits
master
...
e79318171b
Author | SHA1 | Date |
---|---|---|
Sebastien Bourdeauducq | e79318171b | |
Sebastien Bourdeauducq | c9efc20aeb | |
Sebastien Bourdeauducq | f595103f17 | |
Sebastien Bourdeauducq | 2355ba148a | |
Harry Ho | 988d411946 | |
Harry Ho | 83baea2c4b | |
Sebastien Bourdeauducq | f23be562e0 | |
Sebastien Bourdeauducq | 7bde5a0406 | |
Sebastien Bourdeauducq | dacc57af74 | |
Sebastien Bourdeauducq | 5ea1d50226 | |
Sebastien Bourdeauducq | 92d2b24e7c | |
Leon Riesebos | 162238b1f7 | |
Leon Riesebos | 7a639e4fb4 | |
Leon Riesebos | f705a9c756 | |
Leon Riesebos | c967b67aa3 | |
Sebastien Bourdeauducq | 591ef2b4a6 | |
Sebastien Bourdeauducq | f581b6a649 | |
Sebastien Bourdeauducq | f35ae55a15 | |
Sebastien Bourdeauducq | ffe1fd2274 | |
Sebastien Bourdeauducq | c8742678c4 | |
Sebastien Bourdeauducq | db1bd9d5ae | |
Leon Riesebos | 4f37c250f4 | |
Harry Ho | a00537688c | |
Harry Ho | 45181c5c56 | |
Harry Ho | 868216eb2d | |
Harry Ho | e43223532c | |
Harry Ho | 2835575ee4 | |
Sebastien Bourdeauducq | 2a87c55e62 | |
Sebastien Bourdeauducq | 8646fd8822 | |
Sebastien Bourdeauducq | f3ddd838da | |
Sebastien Bourdeauducq | 7f0c746f99 | |
Sebastien Bourdeauducq | 6c768586b3 | |
Leon Riesebos | bfced456af | |
Leon Riesebos | 18f39a0868 | |
Leon Riesebos | a3fd10cef0 | |
Leon Riesebos | a162c7a65e | |
Leon Riesebos | fb0c412bb0 | |
Drew Risinger | 005d911fb7 | |
Sebastien Bourdeauducq | b8d4da3004 | |
Sebastien Bourdeauducq | e0b1b8576f | |
Sebastien Bourdeauducq | dc1dd6e61c | |
Sebastien Bourdeauducq | ac7b8b4029 | |
Sebastien Bourdeauducq | 69ba4229d2 | |
Sebastien Bourdeauducq | 63be59a677 | |
Sebastien Bourdeauducq | bdd57d8895 | |
Sebastien Bourdeauducq | 2c146918a9 | |
Sebastien Bourdeauducq | 9c3e77446c | |
Harry Ho | a6acfdca3a | |
Sebastien Bourdeauducq | 4d6d6efb71 | |
Sebastien Bourdeauducq | 79cb6fdcf7 | |
Sebastien Bourdeauducq | 5bd75bcbd2 | |
Drew Risinger | 10e6220703 | |
Sebastien Bourdeauducq | 5f7093fd7a | |
Harry Ho | b5e19a2944 | |
Leon Riesebos | d0e8cf00fa | |
Sebastien Bourdeauducq | 548eb53ccb | |
Sebastien Bourdeauducq | 2c378060e9 | |
Sebastien Bourdeauducq | a1d134ad25 | |
Astro | 84fc1375d1 | |
Leon Riesebos | 50fb3cd8e1 | |
Sebastien Bourdeauducq | b8a803a64f | |
Sebastien Bourdeauducq | 4e9339e3a8 | |
Sebastien Bourdeauducq | f2bdeaf401 | |
Sebastien Bourdeauducq | a57b927418 | |
Sebastien Bourdeauducq | 5b2ee17cb9 | |
Sebastien Bourdeauducq | c46534d41b | |
Sebastien Bourdeauducq | 5eea3a8267 | |
Sebastien Bourdeauducq | 9806228a8c | |
Astro | bc1ffe4fbf | |
Sebastien Bourdeauducq | 0c3f5161e1 | |
Astro | 72fb469b0b | |
Sebastien Bourdeauducq | a6ea6e3666 | |
Astro | 64ee51b673 | |
Astro | 33c33d49df | |
Sebastien Bourdeauducq | d1a6c2f5db | |
Sebastien Bourdeauducq | 5c6dc61d4d | |
Sebastien Bourdeauducq | 87c2586250 | |
Sebastien Bourdeauducq | 42107ff1e9 | |
Sebastien Bourdeauducq | 0d706f000f | |
topquark12 | 29b4cb1b09 | |
topquark12 | b83f40008c | |
topquark12 | 6d0dafb722 | |
topquark12 | f1d689ae78 | |
Harry Ho | 487bf219ba | |
Astro | 4666f1aa6a | |
Astro | d149c66d05 | |
Sebastien Bourdeauducq | 3c1a84a07e | |
Astro | 70a0b8f90f | |
Astro | b0e041c716 | |
Harry Ho | 6fe5a903b9 | |
Harry Ho | 726ee7aa82 | |
Harry Ho | 21f5362b6f | |
Harry Ho | 35c2844612 | |
Sebastien Bourdeauducq | d5b5dbeeb2 | |
Sebastien Bourdeauducq | 57aca5d142 | |
David Nadlinger | 87fdb2c5ea | |
Sebastien Bourdeauducq | 58aabaaa0e | |
Sebastien Bourdeauducq | eac7f4bddb | |
Sebastien Bourdeauducq | b810407aa9 | |
Sebastien Bourdeauducq | e39f359122 | |
occheung | 049de83093 | |
Sebastien Bourdeauducq | 221d2fe793 | |
Sebastien Bourdeauducq | 8b59734705 | |
Sebastien Bourdeauducq | 360eb10ada | |
Sebastien Bourdeauducq | 4d99f4884e | |
Sebastien Bourdeauducq | 45f46f8901 | |
Sebastien Bourdeauducq | 7ee9e4f068 | |
Sebastien Bourdeauducq | 8396cfa1cb | |
Sebastien Bourdeauducq | 7a76d08cb0 | |
Astro | ce676be8e4 | |
Sebastien Bourdeauducq | 2984cff156 | |
occheung | 3cd8e64846 | |
occheung | f5145e23ee | |
occheung | 58b49c173e | |
occheung | d4c78c8d1b | |
Astro | cc6e7095f3 | |
Astro | e189ee4c8f | |
Astro | 2f4b063513 | |
Astro | 0cf2def070 | |
Astro | 22a6d5fb2e | |
Astro | 1c103ccb62 | |
Sebastien Bourdeauducq | 42df27a7fd | |
Drew Risinger | 2577aa52c0 | |
Sebastien Bourdeauducq | a45b6fc771 | |
Sebastien Bourdeauducq | 228a73fc55 | |
occheung | e97e8be246 | |
Sebastien Bourdeauducq | 2814292f05 | |
Robert Jördens | cefb3ce2f2 | |
Robert Jördens | 2f2ed2b68e | |
Robert Jördens | 718230f12a | |
Drew Risinger | ca28925120 | |
Drew Risinger | beb99234fe | |
Sebastien Bourdeauducq | f072c46ee3 | |
occheung | abf17296c8 | |
occheung | 755f36ecdf | |
Sebastien Bourdeauducq | 0c3cb62cde | |
occheung | d1f7e5d25f | |
occheung | 73d7fe2502 | |
Sebastien Bourdeauducq | eb48b4a6b8 | |
Sebastien Bourdeauducq | 093b1b7224 | |
Sebastien Bourdeauducq | faedd3e1ea | |
Sebastien Bourdeauducq | 56382d6301 | |
Robert Jördens | 6721a8ea17 | |
SingularitySurfer | 08241d9ab0 | |
Sebastien Bourdeauducq | 7259a0b3aa | |
SingularitySurfer | b17a99ac3b | |
SingularitySurfer | 3d26cd62cf | |
SingularitySurfer | 8771512787 | |
Sebastien Bourdeauducq | d688ed1a56 | |
Sebastien Bourdeauducq | ea292df252 | |
Astro | 00352b9942 | |
SingularitySurfer | cf4ca3e4f2 | |
Astro | eab83a6a3f | |
occheung | 262ef72eb7 | |
Astro | 12fbe64616 | |
Robert Jördens | 6acf5b3f93 | |
Astro | 5695977531 | |
Astro | 2e62831998 | |
Astro | fd25af0733 | |
Astro | 843da12452 | |
Drew Risinger | 267b497ac4 | |
Sebastien Bourdeauducq | ff54c815d5 | |
Sebastien Bourdeauducq | eb398dcc53 | |
Robert Jördens | 88cd472f90 | |
Robert Jördens | 6eac1b5f3f | |
Robert Jördens | c31b0144d3 | |
Robert Jördens | 34c5ff76b9 | |
Astro | 571cfbd8a6 | |
Sebastien Bourdeauducq | 0db0ffb128 | |
Sebastien Bourdeauducq | 083e389b41 | |
Sebastien Bourdeauducq | 777b9dbecd | |
Sebastien Bourdeauducq | 0a11450df3 | |
Sebastien Bourdeauducq | 30629929a8 | |
Sebastien Bourdeauducq | d53eed3880 | |
Astro | df36762bfe | |
occheung | 8477bc2919 | |
Sebastien Bourdeauducq | 01dbcb5886 | |
Sebastien Bourdeauducq | f2c9e226ac | |
Sebastien Bourdeauducq | b46f418176 | |
Harry Ho | 6ee5fa70ec | |
Sebastien Bourdeauducq | 24510c81d6 | |
occheung | 17e6cbf6b1 | |
Sebastien Bourdeauducq | 59844c28d9 | |
Sebastien Bourdeauducq | 4172f745e3 | |
Sebastien Bourdeauducq | ee9983728e | |
Sebastien Bourdeauducq | b50d1a0f7e | |
Sebastien Bourdeauducq | a9108d5fa3 | |
Sebastien Bourdeauducq | 0064906c6f | |
Sebastien Bourdeauducq | 9754f45904 | |
Sebastien Bourdeauducq | 59ad8b124a | |
Sebastien Bourdeauducq | 1263c7f15f | |
Sebastien Bourdeauducq | 477f9ce197 | |
Sebastien Bourdeauducq | 4dd16d3aa8 | |
Sebastien Bourdeauducq | 497f1970a0 | |
Sebastien Bourdeauducq | bf45666b2b | |
Sebastien Bourdeauducq | 6cbfebf626 | |
Sebastien Bourdeauducq | 9870fce5a6 | |
Sebastien Bourdeauducq | a6f94d37e9 | |
Sebastien Bourdeauducq | 657d3c1b27 | |
Sebastien Bourdeauducq | fe728a7303 | |
Sebastien Bourdeauducq | f392ca6fd6 | |
Sebastien Bourdeauducq | 9a39d707da | |
Sebastien Bourdeauducq | 3e607f7d12 | |
Sebastien Bourdeauducq | f69616307e | |
Astro | 62f7610087 | |
Harry Ho | 68318b05ec | |
Astro | 7c7c0cb58d | |
Sebastien Bourdeauducq | 5ba0896be6 | |
Harry Ho | 7c4eb8e770 | |
Sebastien Bourdeauducq | c64d73649f | |
Sebastien Bourdeauducq | e6fb3088b1 | |
Sebastien Bourdeauducq | e4d6dd253d | |
Sebastien Bourdeauducq | b5d7b1d10a | |
Sebastien Bourdeauducq | 864bddd0b4 | |
Sebastien Bourdeauducq | de7c867866 | |
Sebastien Bourdeauducq | 58c9c6f83c | |
Sebastien Bourdeauducq | 532dd5c861 | |
Sebastien Bourdeauducq | eabcda5013 | |
Sebastien Bourdeauducq | b3715bbfc8 | |
Sebastien Bourdeauducq | 51bd917512 | |
Sebastien Bourdeauducq | b7a1f42a06 | |
Sebastien Bourdeauducq | 53838bd55f | |
Sebastien Bourdeauducq | 354f653a13 | |
Sebastien Bourdeauducq | 33b66b1a65 | |
Sebastien Bourdeauducq | 1b324970e5 | |
Sebastien Bourdeauducq | 44ffc90e3a | |
Sebastien Bourdeauducq | 6c51ea48fa | |
Sebastien Bourdeauducq | 953000afd1 | |
Sebastien Bourdeauducq | 82ff5added | |
Sebastien Bourdeauducq | 51ecc65edc | |
Sebastien Bourdeauducq | 536e26b771 | |
Robert Jördens | a7179589bd | |
Sebastien Bourdeauducq | d88e2287e2 | |
Sebastien Bourdeauducq | 1c43932205 | |
Sebastien Bourdeauducq | 60e554c501 | |
Sebastien Bourdeauducq | 7b27d68841 | |
Sebastien Bourdeauducq | 241d6224cb | |
Sebastien Bourdeauducq | 3c463f7397 | |
Sebastien Bourdeauducq | 4a1de56ce5 | |
Sebastien Bourdeauducq | 7a1ac77c8b | |
Sebastien Bourdeauducq | 7001d011fd | |
Sebastien Bourdeauducq | 454c3d806c | |
Sebastien Bourdeauducq | 4ef1b6e76d | |
Astro | be5787ab55 | |
Astro | bc447638a9 | |
Astro | 7f32f8e438 | |
Astro | 89d700a796 | |
Harry Ho | d86ea71a76 | |
Harry Ho | 756c256c77 | |
Astro | 1d7b1e9175 | |
Astro | 3409eb3c11 | |
Sebastien Bourdeauducq | 6c328f32f1 | |
Sebastien Bourdeauducq | e75d16f55a | |
Sebastien Bourdeauducq | cc00cfc1a8 | |
Sebastien Bourdeauducq | e8054aebbd | |
Sebastien Bourdeauducq | 30e0886a16 | |
Sebastien Bourdeauducq | 888481c0ce | |
Sebastien Bourdeauducq | cc5694dedf | |
Sebastien Bourdeauducq | e0a9253084 | |
Sebastien Bourdeauducq | eaa571b61f | |
Sebastien Bourdeauducq | c0f5d74bd0 | |
Astro | fe8417e229 |
|
@ -0,0 +1,97 @@
|
||||||
|
# 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;
|
||||||
|
}
|
|
@ -0,0 +1,54 @@
|
||||||
|
{ pkgs ? import <nixpkgs> {}
|
||||||
|
, 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 <nixpkgs> {}
|
||||||
|
}:
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
|
@ -75,7 +75,7 @@ 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 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPOBQVcsvk6WgRj18v4m0zkFeKrcN9gA+r6sxQxNwFpv" > $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
|
||||||
|
@ -84,7 +84,7 @@ in
|
||||||
-i $HOME/.ssh/id_rsa \
|
-i $HOME/.ssh/id_rsa \
|
||||||
-o UserKnownHostsFile=$HOME/.ssh/known_hosts \
|
-o UserKnownHostsFile=$HOME/.ssh/known_hosts \
|
||||||
sb@rpi-1 \
|
sb@rpi-1 \
|
||||||
'flock /tmp/board_lock-kc705-1 -c "echo Ok; cat"' \
|
'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() {
|
||||||
|
|
|
@ -9,7 +9,7 @@ let
|
||||||
artiqSrc = import ./pkgs/artiq-src.nix { fetchgit = pkgs.fetchgit; };
|
artiqSrc = import ./pkgs/artiq-src.nix { fetchgit = pkgs.fetchgit; };
|
||||||
artiqpkgs = import ./default.nix { inherit pkgs; };
|
artiqpkgs = import ./default.nix { inherit pkgs; };
|
||||||
fetchcargo = import ./fetchcargo.nix {
|
fetchcargo = import ./fetchcargo.nix {
|
||||||
inherit (pkgs) stdenv cacert git;
|
inherit (pkgs) stdenv lib cacert git;
|
||||||
inherit (artiqpkgs) cargo cargo-vendor;
|
inherit (artiqpkgs) cargo cargo-vendor;
|
||||||
};
|
};
|
||||||
cargoDeps = fetchcargo rec {
|
cargoDeps = fetchcargo rec {
|
||||||
|
@ -45,31 +45,36 @@ let
|
||||||
in
|
in
|
||||||
{ target
|
{ target
|
||||||
, variant
|
, variant
|
||||||
|
, src ? null
|
||||||
, buildCommand ? "python -m artiq.gateware.targets.${target} -V ${variant}"
|
, buildCommand ? "python -m artiq.gateware.targets.${target} -V ${variant}"
|
||||||
, extraInstallCommands ? ""}:
|
, extraInstallCommands ? ""
|
||||||
|
, ... }:
|
||||||
|
|
||||||
# Board packages are Python modules so that they get added to the ARTIQ Python
|
# Board packages are Python modules so that they get added to the ARTIQ Python
|
||||||
# environment, and artiq_flash finds them.
|
# environment, and artiq_flash finds them.
|
||||||
pkgs.python3Packages.toPythonModule (pkgs.stdenv.mkDerivation rec {
|
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" "checkPhase" ];
|
phases = [ "buildPhase" "installCheckPhase" "installPhase" "checkPhase" ];
|
||||||
buildInputs = [
|
nativeBuildInputs = [
|
||||||
vivado
|
vivado
|
||||||
pkgs.gnumake
|
pkgs.gnumake
|
||||||
(pkgs.python3.withPackages(ps: with ps; [ jinja2 numpy artiqpkgs.migen artiqpkgs.microscope artiqpkgs.misoc artiqpkgs.jesd204b artiqpkgs.artiq ]))
|
|
||||||
artiqpkgs.cargo
|
artiqpkgs.cargo
|
||||||
artiqpkgs.rustc
|
artiqpkgs.rustc
|
||||||
artiqpkgs.binutils-or1k
|
artiqpkgs.binutils-or1k
|
||||||
artiqpkgs.llvm-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}
|
export CARGO_HOME=${cargoVendored}
|
||||||
export TARGET_AR=or1k-linux-ar
|
export TARGET_AR=or1k-linux-ar
|
||||||
${buildCommand}
|
${buildCommand}
|
||||||
'';
|
'';
|
||||||
doCheck = true;
|
# 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() {
|
||||||
|
@ -92,4 +97,6 @@ pkgs.python3Packages.toPythonModule (pkgs.stdenv.mkDerivation rec {
|
||||||
fi
|
fi
|
||||||
${extraInstallCommands}
|
${extraInstallCommands}
|
||||||
'';
|
'';
|
||||||
|
# don't mangle ELF files as they are not for NixOS
|
||||||
|
dontFixup = true;
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
set MSYS=C:\MSYS64
|
set MSYS=C:\MSYS64
|
||||||
set TRIPLE=x86_64-pc-mingw64
|
set TRIPLE=x86_64-w64-mingw32
|
||||||
set PATH=%MSYS%\usr\bin;%MSYS%\mingw64\bin;%PATH%
|
set PATH=%MSYS%\usr\bin;%MSYS%\mingw64\bin;%PATH%
|
||||||
|
|
||||||
mkdir build
|
mkdir build
|
||||||
|
|
|
@ -36,6 +36,8 @@ let
|
||||||
build:
|
build:
|
||||||
- cmake
|
- cmake
|
||||||
- llvm-or1k
|
- llvm-or1k
|
||||||
|
run:
|
||||||
|
- python<3.9
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat > bld.bat << EOF
|
cat > bld.bat << EOF
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
[
|
|
||||||
"llvmlite-artiq"
|
|
||||||
"binutils-or1k-linux"
|
|
||||||
"pythonparser"
|
|
||||||
"scipy"
|
|
||||||
"numpy"
|
|
||||||
"prettytable"
|
|
||||||
"h5py"
|
|
||||||
"python-dateutil"
|
|
||||||
"pyqt"
|
|
||||||
"quamash"
|
|
||||||
"pyqtgraph"
|
|
||||||
"pygit2"
|
|
||||||
"python-levenshtein"
|
|
||||||
"sipyco"
|
|
||||||
]
|
|
|
@ -6,7 +6,22 @@ let
|
||||||
name = "artiq";
|
name = "artiq";
|
||||||
inherit version;
|
inherit version;
|
||||||
src = import ../pkgs/artiq-src.nix { fetchgit = pkgs.fetchgit; };
|
src = import ../pkgs/artiq-src.nix { fetchgit = pkgs.fetchgit; };
|
||||||
dependencies = import ./artiq-deps.nix;
|
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 =
|
extraYaml =
|
||||||
''
|
''
|
||||||
about:
|
about:
|
||||||
|
|
|
@ -6,7 +6,7 @@ let
|
||||||
mkdir -p $out/fake-conda;
|
mkdir -p $out/fake-conda;
|
||||||
|
|
||||||
# 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 ${bscan_spi_bitstreams} workaround-conda
|
cp --no-preserve=mode,ownership -L -R ${bscan_spi_bitstreams} workaround-conda
|
||||||
pushd workaround-conda
|
pushd workaround-conda
|
||||||
tar cf $out/src.tar .
|
tar cf $out/src.tar .
|
||||||
popd
|
popd
|
||||||
|
|
|
@ -2,12 +2,22 @@
|
||||||
# recipe must be a string pointing to a path within the source.
|
# recipe must be a string pointing to a path within the source.
|
||||||
|
|
||||||
{ pkgs }:
|
{ pkgs }:
|
||||||
{ name, src, recipe ? "fake-conda"}:
|
{ 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
|
let
|
||||||
condaBuilderEnv = import ./builder-env.nix { inherit pkgs; };
|
condaBuilderEnv = import ./builder-env.nix { inherit pkgs; };
|
||||||
|
realName = if (name != null) then name else "${pname}-${version}";
|
||||||
in pkgs.stdenv.mkDerivation {
|
in pkgs.stdenv.mkDerivation {
|
||||||
inherit name src;
|
name = realName;
|
||||||
|
inherit src;
|
||||||
buildCommand =
|
buildCommand =
|
||||||
''
|
''
|
||||||
HOME=`pwd`
|
HOME=`pwd`
|
||||||
|
|
|
@ -3,14 +3,21 @@
|
||||||
with pkgs;
|
with pkgs;
|
||||||
|
|
||||||
let
|
let
|
||||||
condaDeps = [ stdenv.cc xorg.libSM xorg.libICE xorg.libX11 xorg.libXau xorg.libXi xorg.libXrender libselinux libGL ];
|
condaDeps = [ stdenv.cc zlib 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,
|
# Use the full Anaconda distribution, which already contains conda-build and its many dependencies,
|
||||||
# so we don't have to manually deal with them.
|
# so we don't have to manually deal with them.
|
||||||
condaInstaller = fetchurl {
|
condaInstaller = fetchurl {
|
||||||
url = "https://repo.anaconda.com/archive/Anaconda3-2019.03-Linux-x86_64.sh";
|
url = "https://repo.anaconda.com/archive/Anaconda3-2021.05-Linux-x86_64.sh";
|
||||||
sha256 = "0fmpdd5876ylds98mydmv5klnwlzasa461k0l1f4vhbw96vm3j25";
|
sha256 = "0lrxwd3pwz8k3jxwgkd9x47wgkqqy9s8m7hgx1x2gw4gcwysnl97";
|
||||||
};
|
};
|
||||||
condaSrcChmod = runCommand "conda-src-chmod" { } "mkdir $out; cp ${condaInstaller} $out/conda-installer.sh; chmod +x $out/conda-installer.sh";
|
condaSrcChmod = runCommand "conda-src-chmod" { }
|
||||||
|
''
|
||||||
|
mkdir $out
|
||||||
|
cp ${condaInstaller} $out/conda-installer.sh
|
||||||
|
chmod +x $out/conda-installer.sh
|
||||||
|
# keep the same file length to avoid breaking embedded payload offsets
|
||||||
|
sed -i 0,/unset\ LD_LIBRARY_PATH/s//\#nset\ LD_LIBRARY_PATH/ $out/conda-installer.sh
|
||||||
|
'';
|
||||||
condaInstallerEnv = buildFHSUserEnv {
|
condaInstallerEnv = buildFHSUserEnv {
|
||||||
name = "conda-installer-env";
|
name = "conda-installer-env";
|
||||||
targetPkgs = pkgs: ([ condaSrcChmod ] ++ condaDeps);
|
targetPkgs = pkgs: ([ condaSrcChmod ] ++ condaDeps);
|
||||||
|
@ -26,7 +33,7 @@ let
|
||||||
condaInstalled = runCommand "conda-installed" { }
|
condaInstalled = runCommand "conda-installed" { }
|
||||||
''
|
''
|
||||||
${condaInstallerEnv}/bin/conda-installer-env -c "${condaSrcChmod}/conda-installer.sh -p $out -b"
|
${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 \
|
substituteInPlace $out/lib/python3.8/site-packages/conda/gateways/disk/__init__.py \
|
||||||
--replace "os.chmod(path, 0o2775)" "pass"
|
--replace "os.chmod(path, 0o2775)" "pass"
|
||||||
|
|
||||||
# The conda garbage breaks if the package filename is prefixed with the Nix store hash.
|
# The conda garbage breaks if the package filename is prefixed with the Nix store hash.
|
||||||
|
|
|
@ -25,7 +25,7 @@ let
|
||||||
# that they are not there if they have been installed from files.
|
# that they are not there if they have been installed from files.
|
||||||
requirements:
|
requirements:
|
||||||
run:
|
run:
|
||||||
- python
|
- python<3.9
|
||||||
- ncurses [linux]
|
- ncurses [linux]
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
{ pkgs ? import <nixpkgs> {}}:
|
{ pkgs ? import <nixpkgs> {}}:
|
||||||
with pkgs;
|
with pkgs;
|
||||||
let
|
let
|
||||||
pythonDeps = import ./pkgs/python-deps.nix { inherit (pkgs) stdenv fetchFromGitHub python3Packages; };
|
artiq6 = pkgs.lib.strings.versionAtLeast mainPackages.artiq.version "6.0";
|
||||||
|
artiq7 = pkgs.lib.strings.versionAtLeast mainPackages.artiq.version "7.0";
|
||||||
|
pythonDeps = import ./pkgs/python-deps.nix { inherit (pkgs) lib fetchgit fetchFromGitHub python3Packages; misoc-new = artiq7; };
|
||||||
|
|
||||||
boards = [
|
boards = [
|
||||||
{ target = "kasli"; variant = "tester"; }
|
{ target = "kasli"; variant = "tester"; }
|
||||||
|
@ -19,36 +21,38 @@ let
|
||||||
}) {} boards;
|
}) {} boards;
|
||||||
|
|
||||||
mainPackages = rec {
|
mainPackages = rec {
|
||||||
inherit (pythonDeps) sipyco asyncserial pythonparser pyqtgraph-qt5 misoc migen microscope jesd204b migen-axi lit outputcheck;
|
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-or1k = callPackage ./pkgs/binutils.nix { platform = "or1k"; target = "or1k-linux"; };
|
||||||
binutils-arm = callPackage ./pkgs/binutils.nix { platform = "arm"; target = "armv7-unknown-linux-gnueabihf"; };
|
binutils-arm = callPackage ./pkgs/binutils.nix { platform = "arm"; target = "armv7-unknown-linux-gnueabihf"; };
|
||||||
llvm-or1k = callPackage ./pkgs/llvm-or1k.nix {};
|
llvm-or1k = callPackage ./pkgs/llvm-or1k.nix {};
|
||||||
rustc = callPackage ./pkgs/rust/rustc-with-crates.nix
|
rustc = callPackage ./pkgs/rust/rustc-with-crates.nix
|
||||||
((stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) {
|
((lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) {
|
||||||
stdenv = overrideCC stdenv gcc6; # with gcc-7: undefined reference to `__divmoddi4'
|
stdenv = overrideCC stdenv gcc6; # with gcc-7: undefined reference to `__divmoddi4'
|
||||||
}) //
|
}) //
|
||||||
{ inherit llvm-or1k; });
|
{ inherit llvm-or1k; });
|
||||||
cargo = callPackage ./pkgs/rust/cargo.nix { inherit rustc; };
|
cargo = callPackage ./pkgs/rust/cargo.nix { inherit rustc; rustPlatform = rustPackages_1_45.rustPlatform; };
|
||||||
cargo-vendor = callPackage ./pkgs/rust/cargo-vendor.nix {};
|
cargo-vendor = callPackage ./pkgs/rust/cargo-vendor.nix {};
|
||||||
llvmlite-artiq = callPackage ./pkgs/llvmlite-artiq.nix { inherit llvm-or1k; };
|
llvmlite-artiq = callPackage ./pkgs/llvmlite-artiq.nix { inherit llvm-or1k; };
|
||||||
libartiq-support = callPackage ./pkgs/libartiq-support.nix { inherit rustc; };
|
libartiq-support = callPackage ./pkgs/libartiq-support.nix { inherit rustc; };
|
||||||
artiq = callPackage ./pkgs/artiq.nix { inherit binutils-or1k binutils-arm llvm-or1k llvmlite-artiq libartiq-support lit outputcheck; };
|
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}"; });
|
artiq-env = (pkgs.python3.withPackages(ps: [ artiq ])).overrideAttrs (oldAttrs: { name = "${pkgs.python3.name}-artiq-env-${artiq.version}"; });
|
||||||
openocd = callPackage ./pkgs/openocd.nix {};
|
openocd = callPackage ./pkgs/openocd.nix { };
|
||||||
};
|
};
|
||||||
|
|
||||||
condaNoarch = {
|
condaNoarch = {
|
||||||
conda-pythonparser = import ./conda/build.nix { inherit pkgs; } {
|
conda-pythonparser = import ./conda/build.nix { inherit pkgs; } {
|
||||||
name = "conda-pythonparser";
|
pname = "conda-pythonparser";
|
||||||
|
inherit (pythonDeps.pythonparser) version;
|
||||||
src = import ./conda/fake-source.nix { inherit pkgs; } {
|
src = import ./conda/fake-source.nix { inherit pkgs; } {
|
||||||
name = "pythonparser";
|
name = "pythonparser";
|
||||||
inherit (pythonDeps.pythonparser) version src;
|
inherit (pythonDeps.pythonparser) version src;
|
||||||
extraSrcCommands = "patch -p1 < ${./pkgs/python37hack.patch}";
|
extraSrcCommands = "patch -p1 < ${./pkgs/pythonparserver.patch}";
|
||||||
dependencies = ["regex"];
|
dependencies = ["regex"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
conda-sipyco = import ./conda/build.nix { inherit pkgs; } {
|
conda-sipyco = import ./conda/build.nix { inherit pkgs; } {
|
||||||
name = "conda-sipyco";
|
pname = "conda-sipyco";
|
||||||
|
inherit (pythonDeps.sipyco) version;
|
||||||
src = import ./conda/fake-source.nix { inherit pkgs; } {
|
src = import ./conda/fake-source.nix { inherit pkgs; } {
|
||||||
name = "sipyco";
|
name = "sipyco";
|
||||||
inherit (pythonDeps.sipyco) version src;
|
inherit (pythonDeps.sipyco) version src;
|
||||||
|
@ -56,19 +60,29 @@ let
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
conda-quamash = import ./conda/build.nix { inherit pkgs; } {
|
conda-quamash = import ./conda/build.nix { inherit pkgs; } {
|
||||||
name = "conda-quamash";
|
pname = "conda-quamash";
|
||||||
|
inherit (pkgs.python3Packages.quamash) version;
|
||||||
src = import ./conda/fake-source.nix { inherit pkgs; } {
|
src = import ./conda/fake-source.nix { inherit pkgs; } {
|
||||||
name = "quamash";
|
name = "quamash";
|
||||||
inherit (pkgs.python3Packages.quamash) version src;
|
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 {
|
conda-bscan-spi-bitstreams = import ./conda/bscan-spi-bitstreams.nix {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
inherit (mainPackages.openocd) bscan_spi_bitstreams;
|
bscan_spi_bitstreams = "${mainPackages.openocd}/share/bscan-spi-bitstreams";
|
||||||
};
|
};
|
||||||
conda-artiq = import ./conda/artiq.nix { inherit pkgs; };
|
conda-artiq = import ./conda/artiq.nix { inherit pkgs; };
|
||||||
conda-asyncserial = import ./conda/build.nix { inherit pkgs; } {
|
conda-asyncserial = import ./conda/build.nix { inherit pkgs; } {
|
||||||
name = "conda-asyncserial";
|
pname = "conda-asyncserial";
|
||||||
|
inherit (pythonDeps.asyncserial) version;
|
||||||
src = import ./conda/fake-source.nix { inherit pkgs; } {
|
src = import ./conda/fake-source.nix { inherit pkgs; } {
|
||||||
name = "asyncserial";
|
name = "asyncserial";
|
||||||
inherit (pythonDeps.asyncserial) version src;
|
inherit (pythonDeps.asyncserial) version src;
|
||||||
|
@ -145,6 +159,6 @@ let
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
condaWindows = if (pkgs.lib.strings.versionAtLeast mainPackages.artiq.version "6.0") then condaWindowsExperimental else condaWindowsLegacy;
|
condaWindows = if artiq6 then condaWindowsExperimental else condaWindowsLegacy;
|
||||||
in
|
in
|
||||||
boardPackages // mainPackages // condaNoarch // condaLinux // condaWindows
|
boardPackages // mainPackages // condaNoarch // condaLinux // condaWindows
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
{ stdenv, cacert, git, cargo, cargo-vendor }:
|
{ stdenv, lib, 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;
|
||||||
|
|
||||||
|
@ -30,6 +31,6 @@ stdenv.mkDerivation {
|
||||||
outputHashMode = "recursive";
|
outputHashMode = "recursive";
|
||||||
outputHash = sha256;
|
outputHash = sha256;
|
||||||
|
|
||||||
impureEnvVars = stdenv.lib.fetchers.proxyImpureEnvVars;
|
impureEnvVars = lib.fetchers.proxyImpureEnvVars;
|
||||||
preferLocalBuild = true;
|
preferLocalBuild = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,30 +1,48 @@
|
||||||
{ stdenv, lib, callPackage, fetchgit, git, python3Packages, qt5Full, binutils-or1k, binutils-arm, llvm-or1k, llvmlite-artiq, libartiq-support, lit, outputcheck }:
|
{ stdenv, lib, pythonDeps, fetchgit, git, python3Packages, qt5, binutils-or1k, binutils-arm, llvm-or1k, llvmlite-artiq, libartiq-support, lit, outputcheck, fontconfig }:
|
||||||
|
|
||||||
let
|
python3Packages.buildPythonPackage rec {
|
||||||
pythonDeps = callPackage ./python-deps.nix {};
|
pname = "artiq";
|
||||||
in
|
version = import ./artiq-version.nix { inherit stdenv fetchgit git; };
|
||||||
python3Packages.buildPythonPackage rec {
|
src = import ./artiq-src.nix { inherit fetchgit; };
|
||||||
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 ]
|
|
||||||
++ (lib.lists.optionals (lib.strings.versionAtLeast version "6.0") [ binutils-arm ])
|
|
||||||
++ (with pythonDeps; [ sipyco pyqtgraph-qt5 pythonparser ])
|
|
||||||
++ (with python3Packages; [ pygit2 numpy dateutil quamash scipy prettytable pyserial python-Levenshtein h5py pyqt5 ]);
|
|
||||||
checkInputs = [ binutils-or1k outputcheck ];
|
|
||||||
checkPhase =
|
|
||||||
''
|
|
||||||
python -m unittest discover -v artiq.test
|
|
||||||
|
|
||||||
TESTDIR=`mktemp -d`
|
preBuild = "export VERSIONEER_OVERRIDE=${version}";
|
||||||
cp --no-preserve=mode,ownership -R ${src}/artiq/test/lit $TESTDIR
|
|
||||||
LIBARTIQ_SUPPORT=${libartiq-support}/libartiq_support.so ${lit}/bin/lit -v $TESTDIR/lit
|
nativeBuildInputs = [ qt5.wrapQtAppsHook ];
|
||||||
'';
|
propagatedBuildInputs = [ binutils-or1k llvm-or1k llvmlite-artiq ]
|
||||||
meta = with stdenv.lib; {
|
++ (lib.lists.optionals (lib.strings.versionAtLeast version "6.0") [ binutils-arm ])
|
||||||
description = "A leading-edge control system for quantum information experiments";
|
++ (with pythonDeps; [ sipyco pyqtgraph-qt5 pythonparser ])
|
||||||
homepage = https://m-labs/artiq;
|
++ (with python3Packages; [ pygit2 numpy dateutil scipy prettytable pyserial python-Levenshtein h5py pyqt5 ])
|
||||||
license = licenses.lgpl3;
|
++ [(if (lib.strings.versionAtLeast version "6.0") then pythonDeps.qasync else python3Packages.quamash)];
|
||||||
maintainers = [ maintainers.sb0 ];
|
|
||||||
};
|
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' ''
|
||||||
|
"--set FONTCONFIG_FILE ${fontconfig.out}/etc/fonts/fonts.conf"
|
||||||
|
];
|
||||||
|
|
||||||
|
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,4 +1,4 @@
|
||||||
{ stdenv, buildPackages
|
{ stdenv, lib, buildPackages
|
||||||
, fetchurl, zlib
|
, fetchurl, zlib
|
||||||
, platform, target
|
, platform, target
|
||||||
}:
|
}:
|
||||||
|
@ -27,7 +27,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 = stdenv.lib.licenses.gpl3Plus;
|
license = 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,6 +1,6 @@
|
||||||
{ stdenv, fetchgit, git, rustc }:
|
{ stdenv, fetchgit, git, rustc }:
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "libartiq-support-${version}";
|
pname = "libartiq-support";
|
||||||
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; };
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ stdenv
|
{ stdenv, lib
|
||||||
, fetchFromGitHub, runCommand
|
, fetchFromGitHub, runCommand
|
||||||
, perl, groff, cmake, libxml2, python, libffi, valgrind
|
, perl, groff, cmake, libxml2, python, libffi, valgrind
|
||||||
}:
|
}:
|
||||||
|
@ -25,12 +25,12 @@ let
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "llvm-or1k";
|
pname = "llvm-or1k";
|
||||||
|
version = "6.0.0";
|
||||||
passthru.llvm-src = llvm-src;
|
passthru.llvm-src = llvm-src;
|
||||||
src = llvm-clang-src;
|
src = llvm-clang-src;
|
||||||
version = "6.0.0";
|
|
||||||
|
|
||||||
buildInputs = [ perl groff cmake libxml2 python libffi ] ++ stdenv.lib.optional stdenv.isLinux valgrind;
|
buildInputs = [ perl groff cmake libxml2 python libffi ] ++ lib.optional stdenv.isLinux valgrind;
|
||||||
|
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
NIX_BUILD_CORES=4
|
NIX_BUILD_CORES=4
|
||||||
|
@ -59,8 +59,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 = stdenv.lib.licenses.bsd3;
|
license = lib.licenses.bsd3;
|
||||||
maintainers = with stdenv.lib.maintainers; [ sb0 ];
|
maintainers = with lib.maintainers; [ sb0 ];
|
||||||
platforms = stdenv.lib.platforms.all;
|
platforms = lib.platforms.all;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ stdenv, fetchFromGitHub, llvm-or1k, makeWrapper, python3, ncurses, zlib, python3Packages }:
|
{ stdenv, lib, fetchFromGitHub, llvm-or1k, makeWrapper, python3, ncurses, zlib, python3Packages }:
|
||||||
python3Packages.buildPythonPackage rec {
|
python3Packages.buildPythonPackage rec {
|
||||||
name = "llvmlite-artiq";
|
pname = "llvmlite-artiq";
|
||||||
version = "0.23.0.dev";
|
version = "0.23.0.dev";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
rev = "158f9d3a898dbf055ca513d69505df288c681fea";
|
rev = "158f9d3a898dbf055ca513d69505df288c681fea";
|
||||||
|
@ -13,7 +13,7 @@ python3Packages.buildPythonPackage rec {
|
||||||
|
|
||||||
preBuild = "export LLVM_CONFIG=${llvm-or1k}/bin/llvm-config";
|
preBuild = "export LLVM_CONFIG=${llvm-or1k}/bin/llvm-config";
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with 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,74 +1,22 @@
|
||||||
{ stdenv, fetchFromGitHub, autoreconfHook, libftdi, libusb1, pkgconfig, hidapi }:
|
{ stdenv, buildEnv, lib, fetchFromGitHub, openocd }:
|
||||||
|
let
|
||||||
stdenv.mkDerivation rec {
|
bscan_spi_bitstreams-pkg = stdenv.mkDerivation {
|
||||||
name = "openocd-mlabs-${version}";
|
name = "bscan_spi_bitstreams";
|
||||||
version = "0.10.0";
|
src = fetchFromGitHub {
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "m-labs";
|
|
||||||
repo = "openocd";
|
|
||||||
fetchSubmodules = true;
|
|
||||||
rev = "c383a57adcff332b2c5cf8d55a84626285b42c2c";
|
|
||||||
sha256 = "0xlj9cs72acx3zqagvr7f1c0v6lnqhl8fgrlhgmhmvk5n9knk492";
|
|
||||||
};
|
|
||||||
bscan_spi_bitstreams = fetchFromGitHub {
|
|
||||||
owner = "quartiq";
|
owner = "quartiq";
|
||||||
repo = "bscan_spi_bitstreams";
|
repo = "bscan_spi_bitstreams";
|
||||||
rev = "01d8f819f15baf9a8cc5d96945a51e4d267ff564";
|
rev = "01d8f819f15baf9a8cc5d96945a51e4d267ff564";
|
||||||
sha256 = "1zqv47kzgvbn4c8cr019a6wcja7gn5h1z4kvw5bhpc72fyhagal9";
|
sha256 = "1zqv47kzgvbn4c8cr019a6wcja7gn5h1z4kvw5bhpc72fyhagal9";
|
||||||
};
|
};
|
||||||
|
phases = ["installPhase"];
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
installPhase =
|
||||||
buildInputs = [ autoreconfHook libftdi libusb1 hidapi ];
|
''
|
||||||
|
mkdir -p $out/share/bscan-spi-bitstreams
|
||||||
configureFlags = [
|
cp $src/*.bit $out/share/bscan-spi-bitstreams
|
||||||
"--enable-jtag_vpi"
|
|
||||||
"--enable-usb_blaster_libftdi"
|
|
||||||
"--enable-amtjtagaccel"
|
|
||||||
"--enable-gw16012"
|
|
||||||
"--enable-presto_libftdi"
|
|
||||||
"--enable-openjtag_ftdi"
|
|
||||||
"--enable-oocd_trace"
|
|
||||||
"--enable-buspirate"
|
|
||||||
"--enable-sysfsgpio"
|
|
||||||
"--enable-remote-bitbang"
|
|
||||||
"--disable-werror"
|
|
||||||
];
|
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE = [
|
|
||||||
"-Wno-implicit-fallthrough"
|
|
||||||
"-Wno-format-truncation"
|
|
||||||
"-Wno-format-overflow"
|
|
||||||
"-Wno-error=tautological-compare"
|
|
||||||
];
|
|
||||||
|
|
||||||
postInstall = ''
|
|
||||||
mkdir -p "$out/etc/udev/rules.d"
|
|
||||||
rules="$out/share/openocd/contrib/60-openocd.rules"
|
|
||||||
if [ ! -f "$rules" ]; then
|
|
||||||
echo "$rules is missing, must update the Nix file."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
ln -s "$rules" "$out/etc/udev/rules.d/"
|
|
||||||
|
|
||||||
mkdir -p "$out/share/bscan-spi-bitstreams"
|
|
||||||
cp ${bscan_spi_bitstreams}/*.bit "$out/share/bscan-spi-bitstreams"
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
|
||||||
description = "Free and Open On-Chip Debugging, In-System Programming and Boundary-Scan Testing";
|
|
||||||
longDescription = ''
|
|
||||||
OpenOCD provides on-chip programming and debugging support with a layered
|
|
||||||
architecture of JTAG interface and TAP support, debug target support
|
|
||||||
(e.g. ARM, MIPS), and flash chip drivers (e.g. CFI, NAND, etc.). Several
|
|
||||||
network interfaces are available for interactiving with OpenOCD: HTTP,
|
|
||||||
telnet, TCL, and GDB. The GDB server enables OpenOCD to function as a
|
|
||||||
"remote target" for source-level debugging of embedded systems using the
|
|
||||||
GNU GDB program.
|
|
||||||
'';
|
'';
|
||||||
homepage = http://openocd.sourceforge.net/;
|
|
||||||
license = licenses.gpl2Plus;
|
|
||||||
maintainers = with maintainers; [ sb0 ];
|
|
||||||
platforms = platforms.linux;
|
|
||||||
};
|
};
|
||||||
}
|
in
|
||||||
|
buildEnv {
|
||||||
|
name = "openocd-bscanspi";
|
||||||
|
paths = [ openocd bscan_spi_bitstreams-pkg ];
|
||||||
|
}
|
||||||
|
|
|
@ -1,21 +1,21 @@
|
||||||
{ stdenv, fetchFromGitHub, python3Packages }:
|
{ lib, fetchgit, fetchFromGitHub, python3Packages, misoc-new }:
|
||||||
|
|
||||||
rec {
|
rec {
|
||||||
# User dependencies
|
# User dependencies
|
||||||
sipyco = python3Packages.buildPythonPackage rec {
|
sipyco = python3Packages.buildPythonPackage rec {
|
||||||
name = "sipyco";
|
pname = "sipyco";
|
||||||
version = "1.1";
|
version = "1.2";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "m-labs";
|
owner = "m-labs";
|
||||||
repo = "sipyco";
|
repo = "sipyco";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "09vyrzfhnbp65ybd7w2g96gvvnhzafpn72syls2kbg2paqjjf9gs";
|
sha256 = "02x2s66x9bbzj82d823vjg2i73w7iqwvkrjbbyrsav6ccj7f90sj";
|
||||||
};
|
};
|
||||||
propagatedBuildInputs = with python3Packages; [ numpy ];
|
propagatedBuildInputs = with python3Packages; [ numpy ];
|
||||||
};
|
};
|
||||||
|
|
||||||
asyncserial = python3Packages.buildPythonPackage rec {
|
asyncserial = python3Packages.buildPythonPackage rec {
|
||||||
name = "asyncserial";
|
pname = "asyncserial";
|
||||||
version = "0.1";
|
version = "0.1";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "m-labs";
|
owner = "m-labs";
|
||||||
|
@ -27,7 +27,7 @@ rec {
|
||||||
};
|
};
|
||||||
|
|
||||||
pythonparser = python3Packages.buildPythonPackage rec {
|
pythonparser = python3Packages.buildPythonPackage rec {
|
||||||
name = "pythonparser";
|
pname = "pythonparser";
|
||||||
version = "1.3";
|
version = "1.3";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "m-labs";
|
owner = "m-labs";
|
||||||
|
@ -35,41 +35,81 @@ rec {
|
||||||
rev = "5b391fe86f43bb9f4f96c5bc0532e2a112db2936";
|
rev = "5b391fe86f43bb9f4f96c5bc0532e2a112db2936";
|
||||||
sha256 = "1gw1fk4y2l6bwq0fg2a9dfc1rvq8cv492dyil96amjdhsxvnx35b";
|
sha256 = "1gw1fk4y2l6bwq0fg2a9dfc1rvq8cv492dyil96amjdhsxvnx35b";
|
||||||
};
|
};
|
||||||
patches = [ ./python37hack.patch ];
|
patches = [ ./pythonparserver.patch ];
|
||||||
propagatedBuildInputs = with python3Packages; [ regex ];
|
propagatedBuildInputs = with python3Packages; [ regex ];
|
||||||
};
|
};
|
||||||
|
|
||||||
pyqtgraph-qt5 = python3Packages.buildPythonPackage rec {
|
pyqtgraph-qt5 = python3Packages.buildPythonPackage rec {
|
||||||
name = "pyqtgraph_qt5-${version}";
|
pname = "pyqtgraph_qt5";
|
||||||
version = "0.10.0";
|
version = "0.11.0";
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
pythonImportsCheck = [ "pyqtgraph" ];
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "pyqtgraph";
|
owner = "pyqtgraph";
|
||||||
repo = "pyqtgraph";
|
repo = "pyqtgraph";
|
||||||
rev = "1426e334e1d20542400d77c72c132b04c6d17ddb";
|
rev = "pyqtgraph-${version}";
|
||||||
sha256 = "1079haxyr316jf0wpirxdj0ry6j8mr16cqr0dyyrd5cnxwl7zssh";
|
sha256 = "03fvpkqdn80ni51msvyivmghw41qk4vplwdqndkvzzzlppimdjbn";
|
||||||
};
|
};
|
||||||
propagatedBuildInputs = with python3Packages; [ scipy numpy pyqt5 pyopengl ];
|
propagatedBuildInputs = with python3Packages; [ scipy numpy pyqt5 pyopengl ];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Development/firmware dependencies
|
qasync = python3Packages.buildPythonPackage rec {
|
||||||
misoc = python3Packages.buildPythonPackage rec {
|
pname = "qasync";
|
||||||
name = "misoc";
|
version = "0.10.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "m-labs";
|
owner = "CabbageDevelopment";
|
||||||
repo = "misoc";
|
repo = "qasync";
|
||||||
rev = "7e5fe8d38835175202dad2c51d37b20b76fd9e16";
|
rev = "v${version}";
|
||||||
sha256 = "0i8bppz7x2s45lx9n49c0r87pqps09z35yzc17amvx21qsplahxn";
|
sha256 = "1zga8s6dr7gk6awmxkh4pf25gbg8n6dv1j4b0by7y0fhi949qakq";
|
||||||
fetchSubmodules = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
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-07-22" else "unstable-2021-02-15";
|
||||||
|
|
||||||
|
src = if misoc-new
|
||||||
|
then (fetchFromGitHub {
|
||||||
|
owner = "m-labs";
|
||||||
|
repo = "misoc";
|
||||||
|
rev = "79a27a82050266ce4d99d35ca0fe6b53a44649ac";
|
||||||
|
sha256 = "10pq3ll3h7mrfgk552nlr80v26gr4mvmpb5pd2h5ck2s9gpkkb82";
|
||||||
|
fetchSubmodules = true;
|
||||||
|
})
|
||||||
|
else (fetchFromGitHub {
|
||||||
|
owner = "m-labs";
|
||||||
|
repo = "misoc";
|
||||||
|
rev = "d84551418042cea0891ea743442e20684b51e77a";
|
||||||
|
sha256 = "1id5qjr9dl4r3vi6jdn7dfpnr2wb08nrm3nfscn18clbbdxybyjn";
|
||||||
|
fetchSubmodules = true;
|
||||||
|
});
|
||||||
|
|
||||||
# TODO: fix misoc bitrot and re-enable tests
|
# TODO: fix misoc bitrot and re-enable tests
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
propagatedBuildInputs = with python3Packages; [ pyserial jinja2 numpy asyncserial migen ];
|
propagatedBuildInputs = with python3Packages; [ pyserial jinja2 numpy asyncserial migen ];
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with lib; {
|
||||||
description = "A high performance and small footprint system-on-chip based on Migen";
|
description = "A high performance and small footprint system-on-chip based on Migen";
|
||||||
homepage = "https://m-labs.hk/migen";
|
homepage = "https://m-labs.hk/migen";
|
||||||
license = licenses.bsd2;
|
license = licenses.bsd2;
|
||||||
|
@ -78,18 +118,19 @@ rec {
|
||||||
};
|
};
|
||||||
|
|
||||||
migen = python3Packages.buildPythonPackage rec {
|
migen = python3Packages.buildPythonPackage rec {
|
||||||
name = "migen";
|
pname = "migen";
|
||||||
|
version = "unstable-2021-02-08";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "m-labs";
|
owner = "m-labs";
|
||||||
repo = "migen";
|
repo = "migen";
|
||||||
rev = "b1b2b298b85a795239daad84c75be073ddc4f8bd";
|
rev = "7014bdccc11270764186e6a4441fb58238c612aa";
|
||||||
sha256 = "1qy2ydk8xqqv92i992j1g71fbi185zd6s3kigzsf3169874dyh81";
|
sha256 = "12mhmcdf0jqv33ald9x9zb1qi26sw4ywdfgg5saqvmx0pmbmvynk";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = with python3Packages; [ colorama ];
|
propagatedBuildInputs = with python3Packages; [ colorama ];
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with lib; {
|
||||||
description = "A Python toolbox for building complex digital hardware";
|
description = "A Python toolbox for building complex digital hardware";
|
||||||
homepage = "https://m-labs.hk/migen";
|
homepage = "https://m-labs.hk/migen";
|
||||||
license = licenses.bsd2;
|
license = licenses.bsd2;
|
||||||
|
@ -98,7 +139,8 @@ rec {
|
||||||
};
|
};
|
||||||
|
|
||||||
microscope = python3Packages.buildPythonPackage rec {
|
microscope = python3Packages.buildPythonPackage rec {
|
||||||
name = "microscope";
|
pname = "microscope";
|
||||||
|
version = "unstable-2019-05-17";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "m-labs";
|
owner = "m-labs";
|
||||||
|
@ -109,7 +151,7 @@ rec {
|
||||||
|
|
||||||
propagatedBuildInputs = with python3Packages; [ pyserial prettytable msgpack migen ];
|
propagatedBuildInputs = with python3Packages; [ pyserial prettytable msgpack migen ];
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with lib; {
|
||||||
description = "Finding the bacteria in rotting FPGA designs";
|
description = "Finding the bacteria in rotting FPGA designs";
|
||||||
homepage = "https://m-labs.hk/migen";
|
homepage = "https://m-labs.hk/migen";
|
||||||
license = licenses.bsd2;
|
license = licenses.bsd2;
|
||||||
|
@ -118,18 +160,19 @@ rec {
|
||||||
};
|
};
|
||||||
|
|
||||||
jesd204b = python3Packages.buildPythonPackage rec {
|
jesd204b = python3Packages.buildPythonPackage rec {
|
||||||
name = "jesd204b";
|
pname = "jesd204b";
|
||||||
|
version = "unstable-2021-05-05";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "m-labs";
|
owner = "m-labs";
|
||||||
repo = "jesd204b";
|
repo = "jesd204b";
|
||||||
rev = "ac877ac5975411a438415f824e182338ed773529";
|
rev = "bf1cd9014c8b7a9db67609f653634daaf3bcd39b";
|
||||||
sha256 = "1lkb7cyj87bq4y0hp6379jq4q4lm2ijldccpyhawiizcfkawxa10";
|
sha256 = "035csm6as4p75cjz7kd6gnras14856i2jzi9g1gd800g284hw9n3";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = with python3Packages; [ migen misoc ];
|
propagatedBuildInputs = with python3Packages; [ migen misoc ];
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with lib; {
|
||||||
description = "JESD204B core for Migen/MiSoC";
|
description = "JESD204B core for Migen/MiSoC";
|
||||||
homepage = "https://m-labs.hk/migen";
|
homepage = "https://m-labs.hk/migen";
|
||||||
license = licenses.bsd2;
|
license = licenses.bsd2;
|
||||||
|
@ -146,7 +189,7 @@ rec {
|
||||||
sha256 = "0j15i54p7nri6hkzn1wal9pxri4pgql01wgjccig6ar0v5jjbvsy";
|
sha256 = "0j15i54p7nri6hkzn1wal9pxri4pgql01wgjccig6ar0v5jjbvsy";
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with lib; {
|
||||||
description = "Super-fast and clean conversions to numbers";
|
description = "Super-fast and clean conversions to numbers";
|
||||||
homepage = "https://github.com/SethMMorton/fastnumbers";
|
homepage = "https://github.com/SethMMorton/fastnumbers";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
|
@ -155,7 +198,8 @@ rec {
|
||||||
};
|
};
|
||||||
|
|
||||||
ramda = python3Packages.buildPythonPackage {
|
ramda = python3Packages.buildPythonPackage {
|
||||||
name = "ramda";
|
pname = "ramda";
|
||||||
|
version = "unstable-2019-02-01";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "peteut";
|
owner = "peteut";
|
||||||
|
@ -174,7 +218,7 @@ rec {
|
||||||
export PBR_VERSION=0.0.1
|
export PBR_VERSION=0.0.1
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with lib; {
|
||||||
description = "Ramda, ported to Python";
|
description = "Ramda, ported to Python";
|
||||||
homepage = "https://github.com/peteut/ramda.py";
|
homepage = "https://github.com/peteut/ramda.py";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
|
@ -183,13 +227,14 @@ rec {
|
||||||
};
|
};
|
||||||
|
|
||||||
migen-axi = python3Packages.buildPythonPackage {
|
migen-axi = python3Packages.buildPythonPackage {
|
||||||
name = "migen-axi";
|
pname = "migen-axi";
|
||||||
|
version = "unstable-2021-01-22";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "peteut";
|
owner = "peteut";
|
||||||
repo = "migen-axi";
|
repo = "migen-axi";
|
||||||
rev = "c4002f7db62cb9c4599336a9413006ee1d138fbd";
|
rev = "9439ee900358598cecc682db327aa30e506172b5";
|
||||||
sha256 = "0p2ndznch7z4sbp4m8hq49rkg7p4vcrlbbfk6l8644wyl1kk0fvg";
|
sha256 = "1z5s8ifq7fbpqi6sx2i87rmz63kbgh9ck94fs2qf21ixhxi46nm3";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ python3Packages.pbr ];
|
nativeBuildInputs = [ python3Packages.pbr ];
|
||||||
|
@ -204,17 +249,21 @@ rec {
|
||||||
--replace "ramda==0.5.5" "ramda"
|
--replace "ramda==0.5.5" "ramda"
|
||||||
substituteInPlace requirements.txt \
|
substituteInPlace requirements.txt \
|
||||||
--replace "colorama==0.4.3" "colorama"
|
--replace "colorama==0.4.3" "colorama"
|
||||||
|
substituteInPlace requirements.txt \
|
||||||
|
--replace "toolz==0.10.0" "toolz"
|
||||||
|
substituteInPlace requirements.txt \
|
||||||
|
--replace "pyserial==3.4" "pyserial"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
||||||
checkInputs = [ python3Packages.pytest python3Packages.pytest-flake8 ];
|
checkInputs = [ python3Packages.pytest python3Packages.pytest-timeout python3Packages.pytest-flake8 ];
|
||||||
checkPhase = "pytest";
|
checkPhase = "pytest";
|
||||||
|
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
export PBR_VERSION=0.0.1
|
export PBR_VERSION=0.0.1
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with lib; {
|
||||||
description = "AXI support for Migen/MiSoC";
|
description = "AXI support for Migen/MiSoC";
|
||||||
homepage = "https://github.com/peteut/migen-axi";
|
homepage = "https://github.com/peteut/migen-axi";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
|
@ -235,7 +284,7 @@ rec {
|
||||||
# Non-standard test suite. Needs custom checkPhase.
|
# Non-standard test suite. Needs custom checkPhase.
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with lib; {
|
||||||
description = "Portable tool for executing LLVM and Clang style test suites";
|
description = "Portable tool for executing LLVM and Clang style test suites";
|
||||||
homepage = http://llvm.org/docs/CommandGuide/lit.html;
|
homepage = http://llvm.org/docs/CommandGuide/lit.html;
|
||||||
license = licenses.ncsa;
|
license = licenses.ncsa;
|
||||||
|
@ -254,7 +303,7 @@ rec {
|
||||||
};
|
};
|
||||||
prePatch = "echo ${version} > RELEASE-VERSION";
|
prePatch = "echo ${version} > RELEASE-VERSION";
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with lib; {
|
||||||
description = "A tool for checking tool output inspired by LLVM's FileCheck";
|
description = "A tool for checking tool output inspired by LLVM's FileCheck";
|
||||||
homepage = "https://github.com/stp/OutputCheck";
|
homepage = "https://github.com/stp/OutputCheck";
|
||||||
license = licenses.bsd3;
|
license = licenses.bsd3;
|
||||||
|
|
|
@ -1,25 +1,27 @@
|
||||||
diff --git a/pythonparser/lexer.py b/pythonparser/lexer.py
|
diff --git a/pythonparser/lexer.py b/pythonparser/lexer.py
|
||||||
index a62eaf1..2c48d36 100644
|
index a62eaf1..c70e85a 100644
|
||||||
--- a/pythonparser/lexer.py
|
--- a/pythonparser/lexer.py
|
||||||
+++ b/pythonparser/lexer.py
|
+++ b/pythonparser/lexer.py
|
||||||
@@ -79,6 +79,7 @@ class Lexer:
|
@@ -79,6 +79,8 @@ 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 +103,7 @@ class Lexer:
|
@@ -102,6 +104,8 @@ 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..f748695 100644
|
index 10c741d..62b93e1 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):
|
||||||
|
@ -27,7 +29,7 @@ index 10c741d..f748695 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)):
|
+ elif version in ((3, 0), (3, 1), (3, 2), (3, 3), (3, 4), (3, 5), (3, 6), (3, 7), (3, 8)):
|
||||||
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, makeWrapper, bash, buildRustPackage, curl, darwin
|
{ stdenv, lib, makeWrapper, bash, buildRustPackage, curl, darwin
|
||||||
, version
|
, version
|
||||||
, src
|
, src
|
||||||
, platform
|
, platform
|
||||||
|
@ -6,7 +6,7 @@
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (stdenv.lib) optionalString;
|
inherit (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 stdenv.lib; {
|
meta = with 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 ] ++ stdenv.lib.optional stdenv.isDarwin Security;
|
buildInputs = [ bash ] ++ 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 '${stdenv.lib.getLib curl}/lib/libcurl.4.dylib' "$out/bin/cargo"
|
install_name_tool -change /usr/lib/libcurl.4.dylib '${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 stdenv.lib; {
|
meta = with 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 ] ++ stdenv.lib.optional stdenv.isDarwin Security;
|
buildInputs = [ makeWrapper bash ] ++ 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 '${stdenv.lib.getLib curl}/lib/libcurl.4.dylib' "$out/bin/cargo"
|
install_name_tool -change /usr/lib/libcurl.4.dylib '${lib.getLib curl}/lib/libcurl.4.dylib' "$out/bin/cargo"
|
||||||
''}
|
''}
|
||||||
|
|
||||||
wrapProgram "$out/bin/cargo" \
|
wrapProgram "$out/bin/cargo" \
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ stdenv, file, curl, pkgconfig, python, openssl, cmake, zlib
|
{ stdenv, lib, file, curl, pkgconfig, python, openssl, cmake, zlib
|
||||||
, makeWrapper, libiconv, cacert, rustPlatform, rustc, libgit2
|
, makeWrapper, libiconv, cacert, rustPlatform, rustc, libgit2
|
||||||
, fetchurl
|
, fetchurl
|
||||||
}:
|
}:
|
||||||
|
@ -6,11 +6,12 @@
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
# Note: we can't build cargo 1.28.0 because rustc tightened the borrow checker rules and broke
|
# 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.
|
# backward compatibility, which affects old cargo versions.
|
||||||
name = "cargo-${version}";
|
# There are also issues with asm/llvm_asm with recent rustc and cargo versions prior to 1.39.
|
||||||
version = "1.37.0";
|
pname = "cargo";
|
||||||
|
version = "1.39.0";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://static.rust-lang.org/dist/rustc-1.37.0-src.tar.gz";
|
url = "https://static.rust-lang.org/dist/rustc-1.39.0-src.tar.gz";
|
||||||
sha256 = "1hrqprybhkhs6d9b5pjskfnc5z9v2l2gync7nb39qjb5s0h703hj";
|
sha256 = "0mwkc1bnil2cfyf6nglpvbn2y0zfbv44zfhsd5qg4c9rm6vgd8dl";
|
||||||
};
|
};
|
||||||
|
|
||||||
# the rust source tarball already has all the dependencies vendored, no need to fetch them again
|
# the rust source tarball already has all the dependencies vendored, no need to fetch them again
|
||||||
|
@ -51,7 +52,7 @@ rustPlatform.buildRustPackage rec {
|
||||||
# Disable check phase as there are failures (4 tests fail)
|
# Disable check phase as there are failures (4 tests fail)
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with lib; {
|
||||||
homepage = https://crates.io;
|
homepage = https://crates.io;
|
||||||
description = "Downloads your Rust project's dependencies and builds your project";
|
description = "Downloads your Rust project's dependencies and builds your project";
|
||||||
maintainers = with maintainers; [ wizeman retrry ];
|
maintainers = with maintainers; [ wizeman retrry ];
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ stdenv, targetPackages
|
{ stdenv, lib, 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 (stdenv.lib) optional optionalString;
|
inherit (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 {
|
||||||
name = "rustc-${version}";
|
pname = "rustc";
|
||||||
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 stdenv.lib; {
|
meta = with 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 ];
|
||||||
|
|
|
@ -8,7 +8,7 @@ in
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
vivado
|
vivado
|
||||||
pkgs.gnumake
|
pkgs.gnumake
|
||||||
(pkgs.python3.withPackages(ps: (with ps; [ jinja2 numpy paramiko ]) ++ (with artiqpkgs; [ migen microscope misoc jesd204b migen-axi artiq ])))
|
(pkgs.python3.withPackages(ps: (with ps; [ jinja2 jsonschema numpy paramiko ]) ++ (with artiqpkgs; [ migen microscope misoc jesd204b migen-axi artiq ])))
|
||||||
artiqpkgs.cargo
|
artiqpkgs.cargo
|
||||||
artiqpkgs.rustc
|
artiqpkgs.rustc
|
||||||
artiqpkgs.binutils-or1k
|
artiqpkgs.binutils-or1k
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
{ 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 {}); }
|
|
@ -10,7 +10,7 @@ let
|
||||||
};
|
};
|
||||||
wfvm = pkgs.fetchgit {
|
wfvm = pkgs.fetchgit {
|
||||||
url = "https://git.m-labs.hk/M-Labs/wfvm.git";
|
url = "https://git.m-labs.hk/M-Labs/wfvm.git";
|
||||||
rev = "304a102b61ae1649739129510bbfc2f162e069b7";
|
rev = "6d9d9d91f66929574b7c8e5dacb3a611939bfaf1";
|
||||||
sha256 = "0ss7z5inp2fbrqjpp296iy04m8v3bwiajhwa7w5ijixva5v2mmg0";
|
sha256 = "02b7rs46ia3vvw0r98ih6i2xb6k952hza4i8h4gi0r8dzplsg004";
|
||||||
};
|
};
|
||||||
in import "${wfvm}/wfvm" { pkgs = (import wfvm-pkgs {}); }
|
in import "${wfvm}/wfvm" { pkgs = (import wfvm-pkgs {}); }
|
||||||
|
|
|
@ -1,27 +1,22 @@
|
||||||
{ pkgs } : [
|
{ pkgs } : [
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
(pkgs.fetchurl {
|
||||||
url = "https://conda.anaconda.org/conda-forge/noarch/prettytable-0.7.2-py_3.tar.bz2";
|
url = "https://conda.anaconda.org/conda-forge/noarch/prettytable-2.1.0-pyhd8ed1ab_0.tar.bz2";
|
||||||
sha256 = "0b7s4xm6bbkcg37sf1i3mxrbac0vxhryq22m3qx4x9kh6k2c5g5q";
|
sha256 = "1w71padwzy6ay5g8zl575ali994cssgcgzf5917rap3fmw2mgg4d";
|
||||||
})
|
})
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
(pkgs.fetchurl {
|
||||||
url = "https://repo.anaconda.com/pkgs/main/noarch/six-1.15.0-py_0.tar.bz2";
|
url = "https://repo.anaconda.com/pkgs/main/noarch/six-1.16.0-pyhd3eb1b0_0.tar.bz2";
|
||||||
sha256 = "08rsfp9bd2mz8r120s8w5vgncy0gn732xa0lfgbmx833548cfqmb";
|
sha256 = "120wav3bxbyv0jsvbl94rxsigqqchsqg4qqxccg9ij7ydirmqaql";
|
||||||
})
|
})
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
(pkgs.fetchurl {
|
||||||
url = "https://repo.anaconda.com/pkgs/main/noarch/python-dateutil-2.8.1-py_0.tar.bz2";
|
url = "https://repo.anaconda.com/pkgs/main/noarch/pyqtgraph-0.11.0-py_0.tar.bz2";
|
||||||
sha256 = "0cbcd0jq6683ibj8ncsmmrbhbjvwww8i22lb68bx4xfzsmb9z8cb";
|
sha256 = "1jnid69dpvhd8nscmkm761qpqz8ip0gka5av90xs3i0pqkqmffqg";
|
||||||
})
|
})
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
(pkgs.fetchurl {
|
||||||
url = "https://repo.anaconda.com/pkgs/main/noarch/cached-property-1.5.1-py_1.tar.bz2";
|
url = "https://repo.anaconda.com/pkgs/main/noarch/cached-property-1.5.2-py_0.tar.bz2";
|
||||||
sha256 = "1yl6h3wb6hxgw79i7rpgpq260l5vqfcj5dv5kyxn8z99xdkp52q5";
|
sha256 = "01mcbrsrdwvinyvp0fs2hbkczydb33gbz59ldhb1484w5mm9y9bi";
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
url = "https://repo.anaconda.com/pkgs/main/noarch/pycparser-2.20-py_0.tar.bz2";
|
|
||||||
sha256 = "1qwcb07q8cjz0qpj6pfxb0qb68kddmx9bv9wr5pghwz78q8073z9";
|
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,132 +1,67 @@
|
||||||
{ pkgs } : [
|
{ pkgs } : [
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
(pkgs.fetchurl {
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/regex-2020.5.14-py37he774522_0.tar.bz2";
|
url = "https://repo.anaconda.com/pkgs/main/win-64/numpy-base-1.20.2-py38hc2deb75_0.tar.bz2";
|
||||||
sha256 = "125l0ywc17h5hlpidjbr7dxyz9c24xmfjllj19dmvbx8hdlmvp99";
|
sha256 = "1940fryxlil04d5y0df1s1sydhny8l97slvfm7v40mxibdmf2sdn";
|
||||||
})
|
})
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
(pkgs.fetchurl {
|
||||||
url = "https://conda.anaconda.org/conda-forge/win-64/python_abi-3.7-1_cp37m.tar.bz2";
|
url = "https://repo.anaconda.com/pkgs/main/win-64/hdf5-1.10.6-h7ebc959_0.tar.bz2";
|
||||||
sha256 = "04dllvrvczky7p7d82iqj7czmy5mm8w7h2gg0zpjzx0s09gkq09l";
|
sha256 = "09bik65gspyrqj3j5p67wf2ywhgyfz3pkw39gwdzha7yyjkkzx0q";
|
||||||
})
|
})
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
(pkgs.fetchurl {
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/icu-58.2-ha925a31_3.tar.bz2";
|
url = "https://repo.anaconda.com/pkgs/main/win-64/certifi-2021.5.30-py38haa95532_0.tar.bz2";
|
||||||
sha256 = "0vcl0j3v9ab022s2g3a9iv1pn7sflh670yyf5m08hdyf049m3jz7";
|
sha256 = "0hzj23xjw88wllz1l4qdnzp335608vm8pl7w1ka9pkg6ip69lnpm";
|
||||||
})
|
})
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
(pkgs.fetchurl {
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/pip-20.1.1-py37_1.tar.bz2";
|
url = "https://repo.anaconda.com/pkgs/main/win-64/sqlite-3.36.0-h2bbff1b_0.tar.bz2";
|
||||||
sha256 = "0wx0sdjq2kkdid4m0iss1bxjhpdk1lnrqsl3w7bqc0papz3gbx0a";
|
sha256 = "15w0lhcl97wafqvc6ccc96311wc5rrmh16i4ki1pw6kzkfmr1k6r";
|
||||||
})
|
})
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
(pkgs.fetchurl {
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/mkl_fft-1.1.0-py37h45dec08_0.tar.bz2";
|
url = "https://conda.anaconda.org/conda-forge/win-64/libgit2-1.1.1-h8648793_0.tar.bz2";
|
||||||
sha256 = "1v73rd107x1r77gv77cn2bv50hr15c0rwspzf7pdp93i5ydk7fm0";
|
sha256 = "0rwmd48g7sywmxgcyjad3hznpm15d3w5604syrkcs2ryih0cgwkd";
|
||||||
})
|
})
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
(pkgs.fetchurl {
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/tk-8.6.10-he774522_0.tar.bz2";
|
url = "https://repo.anaconda.com/pkgs/main/win-64/h5py-3.2.1-py38h3de5c98_0.tar.bz2";
|
||||||
sha256 = "15bfncacdxmcbn4xixmfz2m7a09k7hcpwxvwn1lki84bx0fmzsis";
|
sha256 = "17czl7gvv6d9v6ng9l6c0i1iy181cr1qq7cyn2s90kamnfh3dx8b";
|
||||||
})
|
})
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
(pkgs.fetchurl {
|
||||||
url = "https://conda.anaconda.org/conda-forge/win-64/pygit2-1.2.1-py37h4ab8f01_0.tar.bz2";
|
url = "https://repo.anaconda.com/pkgs/main/win-64/numpy-1.20.2-py38ha4e8547_0.tar.bz2";
|
||||||
sha256 = "1rj6bmf56g3imcrhfd67nqfzd5jjpnmbck714p6aqljxjw5x1zja";
|
sha256 = "0w4hkirwgh4bp7djzxp2yh086jfdbz1y3njsrpqm441rjjq39hpz";
|
||||||
})
|
})
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
(pkgs.fetchurl {
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/certifi-2020.6.20-py37_0.tar.bz2";
|
url = "https://conda.anaconda.org/conda-forge/win-64/python_abi-3.8-2_cp38.tar.bz2";
|
||||||
sha256 = "0601dwm5grhwnq7kvhz9sr49pw72ji8xbc28jc6z3pzihin243fy";
|
sha256 = "1j62rls5r6646b7gagc7d6jj6sqiyqd9vq442dqg3pwyldlz3zqg";
|
||||||
})
|
})
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
(pkgs.fetchurl {
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/libssh2-1.9.0-h7a1dbc1_1.tar.bz2";
|
url = "https://repo.anaconda.com/pkgs/main/win-64/python-levenshtein-0.12.2-py38h2bbff1b_0.tar.bz2";
|
||||||
sha256 = "0sz405ab3n7991hxy8l9affs1slivsimgadxsdr6wvpgx3j4aqgx";
|
sha256 = "0xvl3v7q1wr0a8li3f8d7hara58lcvrr6hmcd6cqkvcnhggkhp9s";
|
||||||
})
|
})
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
(pkgs.fetchurl {
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/vs2015_runtime-14.16.27012-hf0eaf9b_2.tar.bz2";
|
url = "https://conda.anaconda.org/conda-forge/win-64/pygit2-1.6.1-py38h294d835_0.tar.bz2";
|
||||||
sha256 = "1gbm6i6nkp8linmak5mm42hj1nzqd5ppak8kv1n3wfn52p21ngvs";
|
sha256 = "0frgv2b1ckgp8w574abliz369lbziyqsipkwxcjy4l9rbn2pa0rj";
|
||||||
})
|
})
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
(pkgs.fetchurl {
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/intel-openmp-2020.1-216.tar.bz2";
|
url = "https://repo.anaconda.com/pkgs/main/win-64/ca-certificates-2021.5.25-haa95532_1.tar.bz2";
|
||||||
sha256 = "097kkdpd27gc5v5fwsanbrpvmkqricbkd2igglz0yym0x2rldgb8";
|
sha256 = "0g77ic1hs9gj9nknjgrn7byk63z82ima7gqynjcds1kbk8cy4hcd";
|
||||||
})
|
})
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
(pkgs.fetchurl {
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/zlib-1.2.11-h62dcd97_4.tar.bz2";
|
url = "https://repo.anaconda.com/pkgs/main/win-64/pip-21.1.3-py38haa95532_0.tar.bz2";
|
||||||
sha256 = "1jxd7sg0c278hqv09q6hridpdnyhkd34gbs92wkravj3gwsr1adk";
|
sha256 = "1wzb3f3n1lndmxbr3agmx4rr1k11jf60fcrqmgr1d7a3ygqvqy4q";
|
||||||
})
|
})
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
(pkgs.fetchurl {
|
||||||
url = "https://repo.anaconda.com/pkgs/main/win-64/pyqtgraph-0.10.0-py37h28b3542_3.tar.bz2";
|
url = "https://repo.anaconda.com/pkgs/main/win-64/python-3.8.10-hdbf39b2_7.tar.bz2";
|
||||||
sha256 = "1vfxym7lpiv624ll82yp07v2906chdzvczjj9xbvfvk2sk0w1nk7";
|
sha256 = "05p2g1552crfmcf4a9wfjg4d1qngsvi1srpca2hqr6s9slip2w19";
|
||||||
})
|
|
||||||
|
|
||||||
(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,8 +1,13 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# run manually to build the list of conda dependencies to install in the
|
# Run manually to build the list of conda dependencies to install in the
|
||||||
# test environments.
|
# 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
|
set -e
|
||||||
|
|
||||||
nix-build -E "
|
nix-build -E "
|
||||||
|
|
|
@ -10,11 +10,12 @@ let
|
||||||
inherit port;
|
inherit port;
|
||||||
}) tcpPorts;
|
}) tcpPorts;
|
||||||
|
|
||||||
wfvm = import ../wfvm.nix { inherit pkgs; };
|
artiq6 = pkgs.lib.strings.versionAtLeast artiqpkgs.artiq.version "6.0";
|
||||||
|
wfvm = import (if artiq6 then ../wfvm.nix else ../wfvm-legacy.nix) { inherit pkgs; };
|
||||||
conda-deps = {
|
conda-deps = {
|
||||||
name = "conda-deps";
|
name = "conda-deps";
|
||||||
script = let
|
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-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-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"
|
conda-packages-put = pkgs.lib.strings.concatStringsSep "\n"
|
||||||
|
@ -32,7 +33,7 @@ let
|
||||||
|
|
||||||
win-put ${artiqpkgs.conda-pythonparser}/noarch/*.tar.bz2 'fake-channel/noarch'
|
win-put ${artiqpkgs.conda-pythonparser}/noarch/*.tar.bz2 'fake-channel/noarch'
|
||||||
win-put ${artiqpkgs.conda-sipyco}/noarch/*.tar.bz2 'fake-channel/noarch'
|
win-put ${artiqpkgs.conda-sipyco}/noarch/*.tar.bz2 'fake-channel/noarch'
|
||||||
win-put ${artiqpkgs.conda-quamash}/noarch/*.tar.bz2 'fake-channel/noarch'
|
win-put ${qt-asyncio-package}/noarch/*.tar.bz2 'fake-channel/noarch'
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|
343
artiq-full.nix
343
artiq-full.nix
|
@ -1,121 +1,127 @@
|
||||||
{ pkgs ? import <nixpkgs> {}}:
|
{ pkgs ? import <nixpkgs> {}
|
||||||
|
, a6p ? <a6p>
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
sinaraSystemsSrc = <sinaraSystemsSrc>;
|
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>;
|
||||||
|
artiq-fast =
|
||||||
|
if a6p
|
||||||
|
then <artiq-board-generated/fast>
|
||||||
|
else <artiq-fast>;
|
||||||
|
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 ]; }
|
generatedNix = pkgs.runCommand "generated-nix" { buildInputs = [ pkgs.nix pkgs.git ]; }
|
||||||
''
|
''
|
||||||
mkdir $out
|
mkdir $out
|
||||||
|
|
||||||
cp -a ${<artiq-fast>} $out/fast
|
${if a6p
|
||||||
cp ${./artiq-full/conda-artiq-board.nix} $out/conda-artiq-board.nix
|
then ''
|
||||||
cp ${./artiq-full/extras.nix} $out/extras.nix
|
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
|
||||||
|
|
||||||
REV=`git --git-dir ${sinaraSystemsSrc}/.git rev-parse HEAD`
|
${if a6p
|
||||||
SINARA_SRC_CLEAN=`mktemp -d`
|
then ''
|
||||||
cp -a ${sinaraSystemsSrc}/. $SINARA_SRC_CLEAN
|
REV=${sinaraSystemsRev}
|
||||||
chmod -R 755 $SINARA_SRC_CLEAN/.git
|
HASH=${sinaraSystemsHash}
|
||||||
chmod 755 $SINARA_SRC_CLEAN
|
''
|
||||||
rm -rf $SINARA_SRC_CLEAN/.git
|
else ''
|
||||||
HASH=`nix-hash --type sha256 --base32 $SINARA_SRC_CLEAN`
|
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
|
cat > $out/default.nix << EOF
|
||||||
{ pkgs ? import <nixpkgs> {}}:
|
{ pkgs ? import <nixpkgs> {}}:
|
||||||
|
|
||||||
let
|
let
|
||||||
artiq-fast = import ./fast { inherit pkgs; };
|
artiq-fast = import ${if a6p then "./board-generated" else "."}/fast { inherit pkgs; };
|
||||||
|
ddbDeps = [
|
||||||
|
artiq-fast.artiq
|
||||||
|
(pkgs.python3.withPackages (ps: [ ps.jsonschema ]))
|
||||||
|
];
|
||||||
|
|
||||||
target = "kasli";
|
kasliVariants = [${builtins.concatStringsSep " " (
|
||||||
variants = [
|
builtins.map (variant: "\"${variant}\"") kasliVariants
|
||||||
"afmaster"
|
)}];
|
||||||
"afsatellite"
|
standaloneVariants = [${builtins.concatStringsSep " " (
|
||||||
"berkeley2"
|
builtins.map (variant: "\"${variant}\"") standaloneVariants
|
||||||
"berkeley3"
|
)}];
|
||||||
"csu"
|
|
||||||
"duke"
|
|
||||||
"duke2"
|
|
||||||
"duke3"
|
|
||||||
"femto1"
|
|
||||||
"femto2"
|
|
||||||
"femto3"
|
|
||||||
"freiburg1"
|
|
||||||
"griffith"
|
|
||||||
"hub"
|
|
||||||
"hw"
|
|
||||||
"indiana"
|
|
||||||
"innsbruck2"
|
|
||||||
"ist"
|
|
||||||
"liaf"
|
|
||||||
"luh"
|
|
||||||
"luh2"
|
|
||||||
"luh3"
|
|
||||||
"mikes"
|
|
||||||
"mit"
|
|
||||||
"mitll3"
|
|
||||||
"mitll4master"
|
|
||||||
"mitll4satellite"
|
|
||||||
"mpik"
|
|
||||||
"mpq"
|
|
||||||
"nict"
|
|
||||||
"nist"
|
|
||||||
"no"
|
|
||||||
"npl1"
|
|
||||||
"npl2"
|
|
||||||
"oklahoma"
|
|
||||||
"olomouc"
|
|
||||||
"opticlock"
|
|
||||||
"oregon"
|
|
||||||
"osaka"
|
|
||||||
"ptb"
|
|
||||||
"ptb2"
|
|
||||||
"ptb3"
|
|
||||||
"ptb4"
|
|
||||||
"ptb5"
|
|
||||||
"ptb6"
|
|
||||||
"ptbal"
|
|
||||||
"ptbin"
|
|
||||||
"purdue"
|
|
||||||
"qe"
|
|
||||||
"qleds"
|
|
||||||
"rice"
|
|
||||||
"saymamaster"
|
|
||||||
"siegen"
|
|
||||||
"su"
|
|
||||||
"sydney"
|
|
||||||
"uaarhus"
|
|
||||||
"ubirmingham"
|
|
||||||
"ugranada"
|
|
||||||
"unlv"
|
|
||||||
"unsw2"
|
|
||||||
"ustc2"
|
|
||||||
"vlbaimaster"
|
|
||||||
"vlbaisatellite"
|
|
||||||
"wipm"
|
|
||||||
"wipm4"
|
|
||||||
"wipm5master"
|
|
||||||
"wipm5satellite"
|
|
||||||
] ++ (pkgs.lib.lists.optionals (pkgs.lib.strings.versionAtLeast artiq-fast.artiq.version "6.0") [
|
|
||||||
"bonn1master"
|
|
||||||
"bonn1satellite"
|
|
||||||
"hw2master"
|
|
||||||
"hw2satellite"
|
|
||||||
"uamsterdam"
|
|
||||||
]);
|
|
||||||
|
|
||||||
vivado = import ./fast/vivado.nix { inherit pkgs; };
|
vivado = import ${if a6p then "./board-generated" else "."}/fast/vivado.nix {
|
||||||
artiq-board = import ./fast/artiq-board.nix { inherit pkgs vivado; };
|
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; };
|
conda-artiq-board = import ./conda-artiq-board.nix { inherit pkgs; };
|
||||||
src = pkgs.fetchgit {
|
src = pkgs.fetchgit {
|
||||||
url = "https://git.m-labs.hk/M-Labs/sinara-systems.git";
|
url = "https://git.m-labs.hk/M-Labs/sinara-systems.git";
|
||||||
rev = "$REV";
|
rev = "$REV";
|
||||||
sha256 = "$HASH";
|
sha256 = "$HASH";
|
||||||
};
|
};
|
||||||
generic-kasli = pkgs.lib.lists.foldr (variant: start:
|
artiq-targets = pkgs.lib.lists.foldr (conf: start:
|
||||||
let
|
let
|
||||||
json = builtins.toPath (src + "/\''${variant}.json");
|
inherit (conf) target variant;
|
||||||
boardBinaries = artiq-board {
|
json = src + "/\''${variant}.json";
|
||||||
inherit target variant;
|
boardBinaries = artiq-board (conf // {
|
||||||
buildCommand = "python -m artiq.gateware.targets.kasli_generic \''${json}";
|
src = json;
|
||||||
};
|
});
|
||||||
in
|
in
|
||||||
start // {
|
start // {
|
||||||
"artiq-board-\''${target}-\''${variant}" = boardBinaries;
|
"artiq-board-\''${target}-\''${variant}" = boardBinaries;
|
||||||
|
@ -123,10 +129,13 @@ let
|
||||||
boardBinaries = boardBinaries;
|
boardBinaries = boardBinaries;
|
||||||
inherit target variant;
|
inherit target variant;
|
||||||
};
|
};
|
||||||
} // (pkgs.lib.optionalAttrs ((builtins.fromJSON (builtins.readFile json)).base == "standalone") {
|
} // (pkgs.lib.optionalAttrs (
|
||||||
|
target == "kasli" &&
|
||||||
|
builtins.elem variant standaloneVariants
|
||||||
|
) {
|
||||||
"device-db-\''${target}-\''${variant}" = pkgs.stdenv.mkDerivation {
|
"device-db-\''${target}-\''${variant}" = pkgs.stdenv.mkDerivation {
|
||||||
name = "device-db-\''${target}-\''${variant}";
|
name = "device-db-\''${target}-\''${variant}";
|
||||||
buildInputs = [ artiq-fast.artiq ];
|
buildInputs = ddbDeps;
|
||||||
phases = [ "buildPhase" ];
|
phases = [ "buildPhase" ];
|
||||||
buildPhase = "
|
buildPhase = "
|
||||||
mkdir \$out
|
mkdir \$out
|
||||||
|
@ -135,99 +144,73 @@ let
|
||||||
echo file device_db_template \$out/device_db.py >> \$out/nix-support/hydra-build-products
|
echo file device_db_template \$out/device_db.py >> \$out/nix-support/hydra-build-products
|
||||||
";
|
";
|
||||||
};
|
};
|
||||||
})) {} variants;
|
})
|
||||||
|
) {} ${serializedTargets};
|
||||||
drtio-systems = {
|
drtio-systems = {
|
||||||
af = {
|
${pkgs.lib.optionalString a6p ''
|
||||||
master = "afmaster";
|
ap = {
|
||||||
satellites = {
|
master = "apmaster";
|
||||||
"1" = "afsatellite";
|
satellites = {
|
||||||
|
"1" = "apsatellite1";
|
||||||
|
"2" = "apsatellite2";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
berkeley3 = {
|
||||||
mitll4 = {
|
master = "berkeley3master";
|
||||||
master = "mitll4master";
|
satellites = {
|
||||||
satellites = {
|
"1" = "berkeley3satellite";
|
||||||
"1" = "mitll4satellite";
|
};
|
||||||
};
|
};
|
||||||
};
|
ptb3 = {
|
||||||
vlbai = {
|
master = "ptb3master";
|
||||||
master = "vlbaimaster";
|
satellites = {
|
||||||
satellites = {
|
"1" = "ptb3satellite";
|
||||||
"1" = "vlbaisatellite";
|
};
|
||||||
};
|
};
|
||||||
};
|
purdue = {
|
||||||
wipm5 = {
|
master = "purduemaster";
|
||||||
master = "wipm5master";
|
satellites = {
|
||||||
satellites = {
|
"1" = "purduesatellite";
|
||||||
"1" = "wipm5satellite";
|
};
|
||||||
};
|
};
|
||||||
};
|
stfc = {
|
||||||
} // (pkgs.lib.optionalAttrs (pkgs.lib.strings.versionAtLeast artiq-fast.artiq.version "6.0") {
|
master = "stfcmaster";
|
||||||
bonn1 = {
|
satellites = {
|
||||||
master = "bonn1master";
|
"1" = "stfcsatellite";
|
||||||
satellites = {
|
};
|
||||||
"1" = "bonn1satellite";
|
|
||||||
};
|
};
|
||||||
};
|
ubirmingham3 = {
|
||||||
hw2 = {
|
master = "ubirmingham3master";
|
||||||
master = "hw2master";
|
satellites = {
|
||||||
satellites = {
|
"1" = "ubirmingham3satellite";
|
||||||
"1" = "hw2satellite";
|
};
|
||||||
};
|
};
|
||||||
};
|
wipm7 = {
|
||||||
});
|
master = "wipm7master";
|
||||||
|
satellites = {
|
||||||
|
"1" = "wipm7satellite";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
''}
|
||||||
|
};
|
||||||
drtio-ddbs = pkgs.lib.attrsets.mapAttrs'
|
drtio-ddbs = pkgs.lib.attrsets.mapAttrs'
|
||||||
(system: crates: pkgs.lib.attrsets.nameValuePair ("device-db-" + system)
|
(system: crates: pkgs.lib.attrsets.nameValuePair ("device-db-" + system)
|
||||||
(pkgs.stdenv.mkDerivation {
|
(pkgs.stdenv.mkDerivation {
|
||||||
name = "device-db-\''${system}";
|
name = "device-db-\''${system}";
|
||||||
buildInputs = [ artiq-fast.artiq ];
|
buildInputs = ddbDeps;
|
||||||
phases = [ "buildPhase" ];
|
phases = [ "buildPhase" ];
|
||||||
buildPhase = "
|
buildPhase = "
|
||||||
mkdir \$out
|
mkdir \$out
|
||||||
artiq_ddb_template \
|
artiq_ddb_template \
|
||||||
\''${pkgs.lib.strings.concatStringsSep " " (pkgs.lib.attrsets.mapAttrsToList (dest: desc: "-s " + dest + " " + src + "/" + desc + ".json") crates.satellites) } \
|
\''${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
|
\''${src}/\''${crates.master}.json -o \$out/device_db.py
|
||||||
mkdir \$out/nix-support
|
mkdir \$out/nix-support
|
||||||
echo file device_db_template \$out/device_db.py >> \$out/nix-support/hydra-build-products
|
echo file device_db_template \$out/device_db.py >> \$out/nix-support/hydra-build-products
|
||||||
";
|
";
|
||||||
})) drtio-systems;
|
})) drtio-systems;
|
||||||
extras = import ./extras.nix { inherit pkgs; inherit (artiq-fast) sipyco asyncserial artiq; };
|
extras = import ./extras.nix { inherit pkgs; inherit (artiq-fast) sipyco asyncserial pyqtgraph-qt5 artiq; };
|
||||||
in
|
in
|
||||||
artiq-fast // generic-kasli // drtio-ddbs // extras // rec {
|
artiq-fast // artiq-targets // drtio-ddbs // extras // rec {
|
||||||
artiq-board-sayma-rtm = artiq-board {
|
|
||||||
target = "sayma";
|
|
||||||
variant = "rtm";
|
|
||||||
buildCommand = "python -m artiq.gateware.targets.sayma_rtm";
|
|
||||||
};
|
|
||||||
artiq-board-sayma-satellite = artiq-board {
|
|
||||||
target = "sayma";
|
|
||||||
variant = "satellite";
|
|
||||||
buildCommand = "python -m artiq.gateware.targets.sayma_amc";
|
|
||||||
};
|
|
||||||
artiq-board-metlino-master = artiq-board {
|
|
||||||
target = "metlino";
|
|
||||||
variant = "master";
|
|
||||||
buildCommand = "python -m artiq.gateware.targets.metlino";
|
|
||||||
};
|
|
||||||
artiq-board-kc705-nist_qc2 = artiq-board {
|
|
||||||
target = "kc705";
|
|
||||||
variant = "nist_qc2";
|
|
||||||
};
|
|
||||||
|
|
||||||
conda-artiq-board-sayma-rtm = conda-artiq-board {
|
|
||||||
target = "sayma";
|
|
||||||
variant = "rtm";
|
|
||||||
boardBinaries = artiq-board-sayma-rtm;
|
|
||||||
};
|
|
||||||
conda-artiq-board-sayma-satellite = conda-artiq-board {
|
|
||||||
target = "sayma";
|
|
||||||
variant = "satellite";
|
|
||||||
boardBinaries = artiq-board-sayma-satellite;
|
|
||||||
};
|
|
||||||
conda-artiq-board-metlino-master = conda-artiq-board {
|
|
||||||
target = "metlino";
|
|
||||||
variant = "master";
|
|
||||||
boardBinaries = artiq-board-metlino-master;
|
|
||||||
};
|
|
||||||
conda-artiq-board-kasli-tester = conda-artiq-board {
|
conda-artiq-board-kasli-tester = conda-artiq-board {
|
||||||
target = "kasli";
|
target = "kasli";
|
||||||
variant = "tester";
|
variant = "tester";
|
||||||
|
@ -238,28 +221,22 @@ let
|
||||||
variant = "nist_clock";
|
variant = "nist_clock";
|
||||||
boardBinaries = artiq-fast.artiq-board-kc705-nist_clock;
|
boardBinaries = artiq-fast.artiq-board-kc705-nist_clock;
|
||||||
};
|
};
|
||||||
conda-artiq-board-kc705-nist_qc2 = conda-artiq-board {
|
|
||||||
target = "kc705";
|
|
||||||
variant = "nist_qc2";
|
|
||||||
boardBinaries = artiq-board-kc705-nist_qc2;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
'';
|
'';
|
||||||
pythonDeps = import ./artiq-full/python-deps.nix { inherit pkgs; };
|
pythonDeps = import ./artiq-full/python-deps.nix { inherit pkgs; };
|
||||||
sipycoManualPackages = import ./artiq-full/sipyco-manual.nix {
|
sipycoManualPackages = import ./artiq-full/sipyco-manual.nix {
|
||||||
inherit (pkgs) stdenv lib python3Packages texlive texinfo;
|
inherit (pkgs) stdenv lib python3Packages texlive texinfo;
|
||||||
inherit (import <artiq-fast> { inherit pkgs; }) sipyco;
|
inherit (import artiq-fast { inherit pkgs; }) sipyco;
|
||||||
};
|
};
|
||||||
artiqManualPackages = import ./artiq-full/artiq-manual.nix {
|
artiqManualPackages = import ./artiq-full/artiq-manual.nix {
|
||||||
inherit (pkgs) stdenv lib fetchgit git python3Packages texlive texinfo;
|
inherit (pkgs) stdenv lib fetchgit git python3Packages texlive texinfo;
|
||||||
inherit (pythonDeps) sphinxcontrib-wavedrom;
|
inherit (pythonDeps) sphinxcontrib-wavedrom;
|
||||||
|
inherit artiq-fast;
|
||||||
};
|
};
|
||||||
jobs = (import generatedNix { inherit pkgs; }) // sipycoManualPackages // artiqManualPackages // {
|
artiq-full = import generatedNix { inherit pkgs; };
|
||||||
# This is in the example in the ARTIQ manual - precompile it to speed up
|
exampleUserEnv = import ./artiq-full/example-user-env.nix { inherit pkgs artiq-full; };
|
||||||
# installation for users.
|
jobs = artiq-full // sipycoManualPackages // artiqManualPackages // exampleUserEnv;
|
||||||
matplotlib-qt = pkgs.lib.hydraJob (pkgs.python3Packages.matplotlib.override { enableQt = true; });
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
builtins.mapAttrs (key: value: pkgs.lib.hydraJob value) jobs // {
|
builtins.mapAttrs (key: value: pkgs.lib.hydraJob value) jobs // {
|
||||||
artiq-full = pkgs.releaseTools.channel {
|
artiq-full = pkgs.releaseTools.channel {
|
||||||
|
@ -267,5 +244,5 @@ in
|
||||||
src = generatedNix;
|
src = generatedNix;
|
||||||
constituents = [];
|
constituents = [];
|
||||||
};
|
};
|
||||||
conda-channel = import ./artiq-full/conda-channel.nix { inherit pkgs; } { inherit jobs; };
|
conda-channel = import ./artiq-full/conda-channel.nix { inherit pkgs artiq-fast; } { inherit jobs; };
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,125 @@
|
||||||
|
# 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,7 +1,7 @@
|
||||||
{ stdenv, lib, fetchgit, git, python3Packages, texlive, texinfo, sphinxcontrib-wavedrom }:
|
{ stdenv, lib, fetchgit, git, python3Packages, texlive, texinfo, sphinxcontrib-wavedrom, artiq-fast }:
|
||||||
|
|
||||||
let
|
let
|
||||||
artiqVersion = import <artiq-fast/pkgs/artiq-version.nix> { inherit stdenv fetchgit git; };
|
artiqVersion = import (artiq-fast + "/pkgs/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-fast + "/pkgs/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-fast + "/pkgs/artiq-timestamp.nix") { inherit stdenv fetchgit git; }}
|
||||||
cd doc/manual
|
cd doc/manual
|
||||||
'';
|
'';
|
||||||
makeFlags = [ target ];
|
makeFlags = [ target ];
|
||||||
|
|
|
@ -0,0 +1,65 @@
|
||||||
|
{ 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,8 +1,8 @@
|
||||||
{ pkgs }:
|
{ pkgs, artiq-fast }:
|
||||||
{ jobs }:
|
{ jobs }:
|
||||||
|
|
||||||
let
|
let
|
||||||
condaBuilderEnv = import <artiq-fast/conda/builder-env.nix> { inherit pkgs; };
|
condaBuilderEnv = import (artiq-fast + "/conda/builder-env.nix") { inherit pkgs; };
|
||||||
in
|
in
|
||||||
pkgs.runCommand "conda-channel" { }
|
pkgs.runCommand "conda-channel" { }
|
||||||
''
|
''
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
{ 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,15 +1,22 @@
|
||||||
{ pkgs, sipyco, asyncserial, artiq }:
|
{ pkgs, sipyco, asyncserial, pyqtgraph-qt5, artiq }:
|
||||||
let
|
let
|
||||||
condaBuild = import ./fast/conda/build.nix { inherit pkgs; };
|
condaBuild = import ./fast/conda/build.nix { inherit pkgs; };
|
||||||
condaFakeSource = import ./fast/conda/fake-source.nix { inherit pkgs; };
|
condaFakeSource = import ./fast/conda/fake-source.nix { inherit pkgs; };
|
||||||
dualPackage = (
|
dualPackage = (
|
||||||
{ name, version, src, pythonOptions ? {}, condaOptions ? {}}:
|
{ name, version, src, pythonOptions ? {}, condaOptions ? {}, enabled ? true, withManual ? true}:
|
||||||
{
|
pkgs.lib.optionalAttrs enabled ({
|
||||||
"${name}" = pkgs.python3Packages.buildPythonPackage ({
|
"${name}" = pkgs.python3Packages.buildPythonPackage ({
|
||||||
inherit version;
|
inherit version;
|
||||||
name = "${name}-${version}";
|
name = "${name}-${version}";
|
||||||
inherit src;
|
inherit src;
|
||||||
} // pythonOptions);
|
} // 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}-manual-html" = pkgs.stdenv.mkDerivation {
|
||||||
name = "${name}-manual-html-${version}";
|
name = "${name}-manual-html-${version}";
|
||||||
inherit version src;
|
inherit version src;
|
||||||
|
@ -31,13 +38,7 @@ let
|
||||||
echo doc manual ${dest}/html index.html >> $out/nix-support/hydra-build-products
|
echo doc manual ${dest}/html index.html >> $out/nix-support/hydra-build-products
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
"conda-${name}" = condaBuild {
|
}))
|
||||||
name = "conda-${name}";
|
|
||||||
src = condaFakeSource ({
|
|
||||||
inherit name version src;
|
|
||||||
} // condaOptions);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
);
|
);
|
||||||
# https://github.com/m-labs/artiq/issues/23
|
# https://github.com/m-labs/artiq/issues/23
|
||||||
hidapi = pkgs.hidapi.overrideAttrs (oa: {
|
hidapi = pkgs.hidapi.overrideAttrs (oa: {
|
||||||
|
@ -55,8 +56,8 @@ in
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
owner = "m-labs";
|
owner = "m-labs";
|
||||||
repo = "korad_ka3005p";
|
repo = "korad_ka3005p";
|
||||||
rev = "a0cfaa5792a211e166d224314c4d0be4881b9b8d";
|
rev = "a1898409cb188b388ed1cf84e76ca69e9c8a74eb";
|
||||||
sha256 = "1bxzyjyvdhsbm9hj7ypf0vgkd1lvc340bb6lx3wchvh30n7bv9gv";
|
sha256 = "0h20qss70nssqiagc2fx75mravq1pji7rizhag3nq8xrcz2w20nc";
|
||||||
};
|
};
|
||||||
pythonOptions = { propagatedBuildInputs = [ sipyco asyncserial ]; };
|
pythonOptions = { propagatedBuildInputs = [ sipyco asyncserial ]; };
|
||||||
condaOptions = { dependencies = [ "sipyco" "asyncserial" ]; };
|
condaOptions = { dependencies = [ "sipyco" "asyncserial" ]; };
|
||||||
|
@ -66,8 +67,8 @@ in
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
owner = "m-labs";
|
owner = "m-labs";
|
||||||
repo = "novatech409b";
|
repo = "novatech409b";
|
||||||
rev = "8740b3e7b254e03395135e6bc128bbaca70d4fbb";
|
rev = "3bd559753972f07d881df66b7c6819afc5436053";
|
||||||
sha256 = "0mwm434y83y8jb30fpz69z6z3b6sxbc8dv3nw0hq4wc7iginx89d";
|
sha256 = "1g9qv6fn5h7d393mb1v7w8sg6fimqg34blqdj22qnayb4agw1wyg";
|
||||||
};
|
};
|
||||||
pythonOptions = { propagatedBuildInputs = [ sipyco asyncserial ]; };
|
pythonOptions = { propagatedBuildInputs = [ sipyco asyncserial ]; };
|
||||||
condaOptions = { dependencies = [ "sipyco" "asyncserial" ]; };
|
condaOptions = { dependencies = [ "sipyco" "asyncserial" ]; };
|
||||||
|
@ -77,8 +78,8 @@ in
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
owner = "m-labs";
|
owner = "m-labs";
|
||||||
repo = "lda";
|
repo = "lda";
|
||||||
rev = "6138a94a1116c8f7b40b8bd8bb161f847065aab6";
|
rev = "e6bf828b6dfd7fbf59b61b691712736c98c95970";
|
||||||
sha256 = "1009k9pq8wx5zxrljkxr1g95g8q979i7mq3csksdkd3d0v2jvqif";
|
sha256 = "1w4ykzsl3386bz4ggpd6i60b6a3k7rnc6qjw59xm3hk0vs3w2vyn";
|
||||||
};
|
};
|
||||||
pythonOptions = {
|
pythonOptions = {
|
||||||
propagatedBuildInputs = [ sipyco ];
|
propagatedBuildInputs = [ sipyco ];
|
||||||
|
@ -95,8 +96,8 @@ in
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
owner = "m-labs";
|
owner = "m-labs";
|
||||||
repo = "thorlabs_tcube";
|
repo = "thorlabs_tcube";
|
||||||
rev = "8b85292d76a69ae72ba8da32b894c87c794574ba";
|
rev = "0cb0c15fc7e660a150e193245f5338d48f8b97db";
|
||||||
sha256 = "09cy9nhydcwdib21wb0qg1cinvibfbszwgphrmf2ajw5kqpr1d6a";
|
sha256 = "1n4zmjcj2kpd97217y602pq6x8s80w39fgyi6qjmal92aicqdg07";
|
||||||
};
|
};
|
||||||
pythonOptions = { propagatedBuildInputs = [ sipyco asyncserial ]; };
|
pythonOptions = { propagatedBuildInputs = [ sipyco asyncserial ]; };
|
||||||
condaOptions = { dependencies = [ "sipyco" "asyncserial" ]; };
|
condaOptions = { dependencies = [ "sipyco" "asyncserial" ]; };
|
||||||
|
@ -194,6 +195,9 @@ in
|
||||||
sha256 = "165j12k9nnrkf2pv0idcv6xhnp1hnsllna4rps2dssnqgjfaw1ss";
|
sha256 = "165j12k9nnrkf2pv0idcv6xhnp1hnsllna4rps2dssnqgjfaw1ss";
|
||||||
};
|
};
|
||||||
propagatedBuildInputs = [ sipyco pkgs.python3Packages.numpy pkgs.python3Packages.aiohttp ];
|
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 {
|
conda-artiq-comtools = condaBuild {
|
||||||
name = "conda-artiq-comtools";
|
name = "conda-artiq-comtools";
|
||||||
|
@ -203,4 +207,69 @@ in
|
||||||
dependencies = [ "sipyco" "numpy" "aiohttp >=3" ];
|
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 = "24bbd3e7f1b3735ac4f40fe54d3666b35a147df0";
|
||||||
|
sha256 = "1rjy1lxcyyq5bak2swfww08vibd1n1l39vrsdb1cg8sl5jpg5in2";
|
||||||
|
};
|
||||||
|
pythonOptions = {
|
||||||
|
propagatedBuildInputs = [ pkgs.python3Packages.flake8 ];
|
||||||
|
checkInputs = [ pkgs.python3Packages.pytestCheckHook ];
|
||||||
|
};
|
||||||
|
condaOptions = { dependencies = [ "flake8" ]; };
|
||||||
|
}) // (dualPackage rec {
|
||||||
|
name = "dax";
|
||||||
|
version = "6.4";
|
||||||
|
enabled = builtins.head (builtins.splitVersion version) == builtins.head (builtins.splitVersion artiq.version);
|
||||||
|
withManual = false;
|
||||||
|
src = pkgs.fetchgit {
|
||||||
|
url = "https://gitlab.com/duke-artiq/dax.git";
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "08w0fpyyhk78i1qmych9kq3va02sm5k1z14yhzrfk9hhf5r7ypf8";
|
||||||
|
};
|
||||||
|
pythonOptions = {
|
||||||
|
VERSIONEER_OVERRIDE = version;
|
||||||
|
inherit (pkgs.python3Packages.pygit2) SSL_CERT_FILE;
|
||||||
|
propagatedBuildInputs = [ artiq sipyco ]
|
||||||
|
++ (with pkgs.python3Packages; [ numpy scipy pyvcd natsort pygit2 matplotlib graphviz h5py networkx ]);
|
||||||
|
checkInputs = [ pkgs.python3Packages.pytestCheckHook ];
|
||||||
|
};
|
||||||
|
condaOptions = { dependencies = [ "python>=3.7" "artiq" "sipyco" "numpy" "scipy" "pyvcd" "natsort" "pygit2" "matplotlib" "python-graphviz" "h5py" "networkx" ]; };
|
||||||
|
}) // (dualPackage {
|
||||||
|
name = "dax-applets";
|
||||||
|
version = "0.0.0";
|
||||||
|
withManual = false;
|
||||||
|
src = pkgs.fetchgit {
|
||||||
|
url = "https://gitlab.com/duke-artiq/dax-applets.git";
|
||||||
|
rev = "584ea3e54131242ec1da5365abd21670cdf4a169";
|
||||||
|
sha256 = "0mgjd92yifs24dg4b14vhawx5mdisbx6jqi5xf7fgkijzjp9hvs3";
|
||||||
|
};
|
||||||
|
pythonOptions = {
|
||||||
|
propagatedBuildInputs = [ artiq pyqtgraph-qt5 ]
|
||||||
|
++ (with pkgs.python3Packages; [ numpy pyqt5 ]);
|
||||||
|
doCheck = false;
|
||||||
|
};
|
||||||
|
condaOptions = { dependencies = [ "python>=3.5" "artiq" "numpy" "pyqt" "pyqtgraph" ]; };
|
||||||
|
})
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
#!/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");
|
|
@ -3,18 +3,18 @@
|
||||||
rec {
|
rec {
|
||||||
wavedrom = pkgs.python3Packages.buildPythonPackage rec {
|
wavedrom = pkgs.python3Packages.buildPythonPackage rec {
|
||||||
pname = "wavedrom";
|
pname = "wavedrom";
|
||||||
version = "0.1";
|
version = "2.0.3.post2";
|
||||||
|
|
||||||
src = pkgs.python3Packages.fetchPypi {
|
src = pkgs.python3Packages.fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "006w683zlmmwcw5xz1n5dwg34ims5jg3gl2700ql4wr0myjz6710";
|
sha256 = "13a4086417nv836s2wbj3f4r31gwapbyw5smgl00jsqizwsk96r3";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ pkgs.python3Packages.setuptools_scm ];
|
buildInputs = [ pkgs.python3Packages.setuptools_scm ];
|
||||||
propagatedBuildInputs = with pkgs.python3Packages; [ svgwrite attrdict ];
|
propagatedBuildInputs = with pkgs.python3Packages; [ svgwrite attrdict ];
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
meta = with pkgs.stdenv.lib; {
|
meta = with pkgs.lib; {
|
||||||
description = "WaveDrom compatible Python module and command line";
|
description = "WaveDrom compatible Python module and command line";
|
||||||
homepage = "https://pypi.org/project/wavedrom/";
|
homepage = "https://pypi.org/project/wavedrom/";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
|
@ -23,18 +23,18 @@ rec {
|
||||||
|
|
||||||
sphinxcontrib-wavedrom = pkgs.python3Packages.buildPythonPackage rec {
|
sphinxcontrib-wavedrom = pkgs.python3Packages.buildPythonPackage rec {
|
||||||
pname = "sphinxcontrib-wavedrom";
|
pname = "sphinxcontrib-wavedrom";
|
||||||
version = "2.0.0";
|
version = "2.1.1";
|
||||||
|
|
||||||
src = pkgs.python3Packages.fetchPypi {
|
src = pkgs.python3Packages.fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "0nk36zqq5ipxqx9izz2iazb3iraasanv3nm05bjr21gw42zgkz22";
|
sha256 = "09xq4csdcil2x8mm38yd5k6lfbkazicvm278xnzwbfc9vghkqqs2";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ pkgs.python3Packages.setuptools_scm ];
|
buildInputs = [ pkgs.python3Packages.setuptools_scm ];
|
||||||
propagatedBuildInputs = [ wavedrom ] ++ (with pkgs.python3Packages; [ sphinx xcffib cairosvg ]);
|
propagatedBuildInputs = [ wavedrom ] ++ (with pkgs.python3Packages; [ sphinx xcffib cairosvg ]);
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
meta = with pkgs.stdenv.lib; {
|
meta = with pkgs.lib; {
|
||||||
description = "A Sphinx extension that allows including WaveDrom diagrams";
|
description = "A Sphinx extension that allows including WaveDrom diagrams";
|
||||||
homepage = "https://pypi.org/project/sphinxcontrib-wavedrom/";
|
homepage = "https://pypi.org/project/sphinxcontrib-wavedrom/";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
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 = ""
|
|
@ -0,0 +1,68 @@
|
||||||
|
let
|
||||||
|
pkgs = import <nixpkgs> {};
|
||||||
|
artiq-zynq = import <artiq-zynq>;
|
||||||
|
artiq-fast = import <artiq-fast> { inherit pkgs; };
|
||||||
|
|
||||||
|
zynq-rs = import artiq-zynq.zynq-rs;
|
||||||
|
# New zynq-rs versions with Kasli-SoC support have the multiboard "szl" package.
|
||||||
|
# Older versions need the SZL environment variable set to the SZL ELF to be loaded.
|
||||||
|
szlEnv = if zynq-rs ? "szl" then "${zynq-rs.szl}" else "${zynq-rs.zc706-szl}/szl.elf";
|
||||||
|
in
|
||||||
|
(
|
||||||
|
builtins.mapAttrs (key: value: pkgs.lib.hydraJob value) artiq-zynq
|
||||||
|
) // {
|
||||||
|
gateware-sim = pkgs.lib.hydraJob (pkgs.stdenv.mkDerivation {
|
||||||
|
name = "gateware-sim";
|
||||||
|
buildInputs = [ artiq-fast.migen artiq-fast.migen-axi artiq-fast.artiq ];
|
||||||
|
|
||||||
|
phases = [ "buildPhase" ];
|
||||||
|
|
||||||
|
buildPhase =
|
||||||
|
''
|
||||||
|
python -m unittest discover ${<artiq-zynq>}/src/gateware -v
|
||||||
|
touch $out
|
||||||
|
'';
|
||||||
|
});
|
||||||
|
zc706-hitl-tests = pkgs.lib.hydraJob (pkgs.stdenv.mkDerivation {
|
||||||
|
name = "zc706-hitl-tests";
|
||||||
|
|
||||||
|
# requires patched Nix
|
||||||
|
__networked = true;
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
pkgs.netcat pkgs.openssh pkgs.rsync artiq-fast.artiq artiq-fast.artiq-netboot
|
||||||
|
];
|
||||||
|
phases = [ "buildPhase" ];
|
||||||
|
|
||||||
|
buildPhase =
|
||||||
|
''
|
||||||
|
echo Power cycling board...
|
||||||
|
(echo b; sleep 5; echo B; sleep 5) | nc -N -w6 192.168.1.31 3131
|
||||||
|
echo Power cycle done.
|
||||||
|
|
||||||
|
export USER=hydra
|
||||||
|
export OPENOCD_ZYNQ=${artiq-zynq.zynq-rs}/openocd
|
||||||
|
export SZL=${szlEnv}
|
||||||
|
pushd ${<artiq-zynq>}
|
||||||
|
export NIX_SSHOPTS="-F /dev/null -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=ERROR -i /opt/hydra_id_rsa"
|
||||||
|
bash ${<artiq-zynq>}/remote_run.sh -h rpi-4 -o "$NIX_SSHOPTS" -d ${artiq-zynq.zc706-nist_qc2-jtag}
|
||||||
|
popd
|
||||||
|
|
||||||
|
echo Waiting for the firmware to boot...
|
||||||
|
sleep 15
|
||||||
|
|
||||||
|
echo Running test kernel...
|
||||||
|
artiq_run --device-db ${<artiq-zynq>}/examples/device_db.py ${<artiq-zynq>}/examples/mandelbrot.py
|
||||||
|
|
||||||
|
echo Running ARTIQ unit tests...
|
||||||
|
ARTIQ_ROOT=${<artiq-zynq>}/examples python -m unittest discover artiq.test.coredevice -v
|
||||||
|
|
||||||
|
touch $out
|
||||||
|
|
||||||
|
echo Completed
|
||||||
|
|
||||||
|
(echo b; sleep 5) | nc -N -w6 192.168.1.31 3131
|
||||||
|
echo Board powered off
|
||||||
|
'';
|
||||||
|
});
|
||||||
|
}
|
|
@ -1,14 +1,15 @@
|
||||||
{ pkgs ? import <nixpkgs> {} }:
|
{ pkgs ? import <nixpkgs> {} }:
|
||||||
let
|
let
|
||||||
artiqpkgs = import ../artiq-fast/pkgs/python-deps.nix { inherit (pkgs) stdenv fetchFromGitHub python3Packages; };
|
artiqpkgs = import ../artiq-fast/pkgs/python-deps.nix { inherit (pkgs) lib fetchgit fetchFromGitHub python3Packages; misoc-new = true; };
|
||||||
ise = import ./ise.nix { inherit pkgs; };
|
ise = import ./ise.nix { inherit pkgs; };
|
||||||
|
vivado = import ../artiq-fast/vivado.nix { inherit pkgs; };
|
||||||
buildUrukulCpld = {version, src}: pkgs.stdenv.mkDerivation {
|
buildUrukulCpld = {version, src}: pkgs.stdenv.mkDerivation {
|
||||||
name = "urukul-cpld-${version}";
|
pname = "urukul-cpld";
|
||||||
inherit src;
|
inherit src version;
|
||||||
buildInputs = [(pkgs.python3.withPackages(ps: [artiqpkgs.migen]))] ++ (builtins.attrValues ise);
|
buildInputs = [(pkgs.python3.withPackages(ps: [artiqpkgs.migen]))] ++ (builtins.attrValues ise);
|
||||||
phases = ["buildPhase" "installPhase"];
|
phases = ["buildPhase" "installPhase"];
|
||||||
buildPhase = "python $src/urukul_impl.py";
|
buildPhase = "python $src/urukul_impl.py";
|
||||||
installPhase =
|
installPhase =
|
||||||
''
|
''
|
||||||
mkdir -p $out $out/nix-support
|
mkdir -p $out $out/nix-support
|
||||||
cp build/urukul.jed $out
|
cp build/urukul.jed $out
|
||||||
|
@ -16,12 +17,12 @@ let
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
buildMirnyCpld = {version, src}: pkgs.stdenv.mkDerivation {
|
buildMirnyCpld = {version, src}: pkgs.stdenv.mkDerivation {
|
||||||
name = "mirny-cpld-${version}";
|
pname = "mirny-cpld";
|
||||||
inherit src;
|
inherit src version;
|
||||||
buildInputs = [(pkgs.python3.withPackages(ps: [artiqpkgs.migen]))] ++ (builtins.attrValues ise);
|
buildInputs = [(pkgs.python3.withPackages(ps: [artiqpkgs.migen]))] ++ (builtins.attrValues ise);
|
||||||
phases = ["buildPhase" "installPhase"];
|
phases = ["buildPhase" "installPhase"];
|
||||||
buildPhase = "python $src/mirny_impl.py";
|
buildPhase = "python $src/mirny_impl.py";
|
||||||
installPhase =
|
installPhase =
|
||||||
''
|
''
|
||||||
mkdir -p $out $out/nix-support
|
mkdir -p $out $out/nix-support
|
||||||
cp build/mirny.jed $out
|
cp build/mirny.jed $out
|
||||||
|
@ -78,4 +79,27 @@ in
|
||||||
echo file binary-dist $out/fastino.bin >> $out/nix-support/hydra-build-products
|
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";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
243
hydra/artiq.json
243
hydra/artiq.json
|
@ -1,16 +1,233 @@
|
||||||
{
|
{
|
||||||
"enabled": 1,
|
"fast-beta": {
|
||||||
"hidden": true,
|
"enabled": 1,
|
||||||
"description": "js",
|
"hidden": false,
|
||||||
"nixexprinput": "nixScripts",
|
"description": "Core ARTIQ packages to build fast for CI purposes (beta version)",
|
||||||
"nixexprpath": "hydra/artiq.nix",
|
"nixexprinput": "nixScripts",
|
||||||
"checkinterval": 300,
|
"nixexprpath": "artiq-fast.nix",
|
||||||
"schedulingshares": 10,
|
"checkinterval": 300,
|
||||||
"enableemail": false,
|
"schedulingshares": 10,
|
||||||
"emailoverride": "",
|
"enableemail": false,
|
||||||
"keepnr": 10,
|
"emailoverride": "",
|
||||||
"inputs": {
|
"keepnr": 10,
|
||||||
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs-channels nixos-20.03", "emailresponsible": false },
|
"inputs": {
|
||||||
"nixScripts": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/nix-scripts.git", "emailresponsible": false }
|
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-21.05", "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 }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"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": 10,
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-21.05", "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 },
|
||||||
|
"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": 10,
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-21.05", "emailresponsible": false },
|
||||||
|
"nixScripts": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/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": 10,
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-21.05", "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 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": 10,
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-21.05", "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 },
|
||||||
|
"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": 10,
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-21.05", "emailresponsible": false },
|
||||||
|
"nixScripts": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/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": 10,
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-21.05", "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 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": 10,
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-21.05", "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 },
|
||||||
|
"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": 10,
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-21.05", "emailresponsible": false },
|
||||||
|
"nixScripts": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/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-rs": {
|
||||||
|
"enabled": 1,
|
||||||
|
"hidden": false,
|
||||||
|
"description": "Bare-metal Rust on Zynq-7000",
|
||||||
|
"nixexprinput": "nixScripts",
|
||||||
|
"nixexprpath": "zynq-rs.nix",
|
||||||
|
"checkinterval": 300,
|
||||||
|
"schedulingshares": 1,
|
||||||
|
"enableemail": false,
|
||||||
|
"emailoverride": "",
|
||||||
|
"keepnr": 10,
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-21.05", "emailresponsible": false },
|
||||||
|
"nixScripts": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/nix-scripts.git", "emailresponsible": false },
|
||||||
|
"zynq-rs": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/zynq-rs.git", "emailresponsible": false },
|
||||||
|
|
||||||
|
"gitea_repo_name": { "value": "zynq-rs", "type": "string" },
|
||||||
|
"gitea_repo_owner": { "value": "M-Labs", "type": "string" },
|
||||||
|
"gitea_status_repo": { "value": "zynq-rs", "type": "string" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"zynq-beta": {
|
||||||
|
"enabled": 1,
|
||||||
|
"hidden": false,
|
||||||
|
"description": "ARTIQ on Zynq-7000 (beta version)",
|
||||||
|
"nixexprinput": "nixScripts",
|
||||||
|
"nixexprpath": "artiq-zynq.nix",
|
||||||
|
"checkinterval": 300,
|
||||||
|
"schedulingshares": 1,
|
||||||
|
"enableemail": false,
|
||||||
|
"emailoverride": "",
|
||||||
|
"keepnr": 10,
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-21.05", "emailresponsible": false },
|
||||||
|
"nixScripts": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/nix-scripts.git", "emailresponsible": false },
|
||||||
|
"artiq-fast": { "type": "sysbuild", "value": "artiq:fast-beta:generated-nix", "emailresponsible": false },
|
||||||
|
"artiq-zynq": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/artiq-zynq.git", "emailresponsible": false },
|
||||||
|
|
||||||
|
"gitea_repo_name": { "value": "artiq-zynq", "type": "string" },
|
||||||
|
"gitea_repo_owner": { "value": "M-Labs", "type": "string" },
|
||||||
|
"gitea_status_repo": { "value": "artiq-zynq", "type": "string" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"zynq": {
|
||||||
|
"enabled": 1,
|
||||||
|
"hidden": false,
|
||||||
|
"description": "ARTIQ on Zynq-7000",
|
||||||
|
"nixexprinput": "nixScripts",
|
||||||
|
"nixexprpath": "artiq-zynq.nix",
|
||||||
|
"checkinterval": 300,
|
||||||
|
"schedulingshares": 1,
|
||||||
|
"enableemail": false,
|
||||||
|
"emailoverride": "",
|
||||||
|
"keepnr": 10,
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-21.05", "emailresponsible": false },
|
||||||
|
"nixScripts": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/nix-scripts.git", "emailresponsible": false },
|
||||||
|
"artiq-fast": { "type": "sysbuild", "value": "artiq:fast:generated-nix", "emailresponsible": false },
|
||||||
|
"artiq-zynq": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/artiq-zynq.git release-6", "emailresponsible": false },
|
||||||
|
|
||||||
|
"gitea_repo_name": { "value": "artiq-zynq", "type": "string" },
|
||||||
|
"gitea_repo_owner": { "value": "M-Labs", "type": "string" },
|
||||||
|
"gitea_status_repo": { "value": "artiq-zynq", "type": "string" }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
119
hydra/artiq.nix
119
hydra/artiq.nix
|
@ -1,119 +0,0 @@
|
||||||
{ pkgs ? import <nixpkgs> {}}:
|
|
||||||
{
|
|
||||||
jobsets = pkgs.runCommand "spec.json" {}
|
|
||||||
''
|
|
||||||
cat > $out << EOF
|
|
||||||
{
|
|
||||||
"fast-beta": {
|
|
||||||
"enabled": 1,
|
|
||||||
"hidden": false,
|
|
||||||
"description": "Core ARTIQ packages to build fast for CI purposes (beta version)",
|
|
||||||
"nixexprinput": "nixScripts",
|
|
||||||
"nixexprpath": "artiq-fast.nix",
|
|
||||||
"checkinterval": 300,
|
|
||||||
"schedulingshares": 10,
|
|
||||||
"enableemail": false,
|
|
||||||
"emailoverride": "",
|
|
||||||
"keepnr": 10,
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs-channels nixos-20.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 }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"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": 10,
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs-channels nixos-20.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 },
|
|
||||||
"artiq-fast": { "type": "sysbuild", "value": "artiq:fast-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": 10,
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs-channels nixos-20.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 release-5 1", "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": 10,
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs-channels nixos-20.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 },
|
|
||||||
"artiq-fast": { "type": "sysbuild", "value": "artiq:fast: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": 10,
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs-channels nixos-20.03", "emailresponsible": false },
|
|
||||||
"nixScripts": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/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 }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"zynq": {
|
|
||||||
"enabled": 1,
|
|
||||||
"hidden": false,
|
|
||||||
"description": "ARTIQ on the Zynq-based ZC706 board",
|
|
||||||
"nixexprinput": "nixScripts",
|
|
||||||
"nixexprpath": "zynq.nix",
|
|
||||||
"checkinterval": 300,
|
|
||||||
"schedulingshares": 1,
|
|
||||||
"enableemail": false,
|
|
||||||
"emailoverride": "",
|
|
||||||
"keepnr": 10,
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs-channels nixos-20.03", "emailresponsible": false },
|
|
||||||
"nixScripts": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/nix-scripts.git", "emailresponsible": false },
|
|
||||||
"mozillaOverlay": { "type": "git", "value": "git://github.com/mozilla/nixpkgs-mozilla", "emailresponsible": false },
|
|
||||||
"artiq-fast": { "type": "sysbuild", "value": "artiq:fast-beta:generated-nix", "emailresponsible": false },
|
|
||||||
"zc706": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/zc706.git", "emailresponsible": false },
|
|
||||||
"artiq-zynq": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/artiq-zynq.git", "emailresponsible": false }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
'';
|
|
||||||
}
|
|
|
@ -1,16 +0,0 @@
|
||||||
{
|
|
||||||
"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-19.03", "emailresponsible": false },
|
|
||||||
"nixScripts": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/nix-scripts.git", "emailresponsible": false }
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,26 +0,0 @@
|
||||||
{ 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-19.03", "emailresponsible": false },
|
|
||||||
"heavyx": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/HeavyX.git", "emailresponsible": false }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
'';
|
|
||||||
}
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
{
|
||||||
|
"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-21.05", "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/HarryMakes/stabilizer.git pre-mqtt 1", "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 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,16 +0,0 @@
|
||||||
{
|
|
||||||
"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-20.03", "emailresponsible": false },
|
|
||||||
"nixScripts": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/nix-scripts.git", "emailresponsible": false }
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,29 +0,0 @@
|
||||||
{ 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-20.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,16 +1,19 @@
|
||||||
{
|
{
|
||||||
"enabled": 1,
|
"web": {
|
||||||
"hidden": true,
|
"enabled": 1,
|
||||||
"description": "js",
|
"hidden": false,
|
||||||
"nixexprinput": "nixScripts",
|
"description": "M-Labs website",
|
||||||
"nixexprpath": "hydra/web.nix",
|
"nixexprinput": "nixScripts",
|
||||||
"checkinterval": 300,
|
"nixexprpath": "web.nix",
|
||||||
"schedulingshares": 10,
|
"checkinterval": 300,
|
||||||
"enableemail": false,
|
"schedulingshares": 10,
|
||||||
"emailoverride": "",
|
"enableemail": false,
|
||||||
"keepnr": 10,
|
"emailoverride": "",
|
||||||
"inputs": {
|
"keepnr": 10,
|
||||||
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs-channels nixos-20.03", "emailresponsible": false },
|
"inputs": {
|
||||||
"nixScripts": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/nix-scripts.git", "emailresponsible": false }
|
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-21.05", "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 }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,27 +0,0 @@
|
||||||
{ pkgs ? import <nixpkgs> {}}:
|
|
||||||
{
|
|
||||||
jobsets = pkgs.runCommand "spec.json" {}
|
|
||||||
''
|
|
||||||
cat > $out << EOF
|
|
||||||
{
|
|
||||||
"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-channels 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 }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
'';
|
|
||||||
}
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
{ 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
|
@ -0,0 +1,119 @@
|
||||||
|
{ # 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, cargoDepsName ? name, patchPhase ? "", extraNativeBuildInputs ? [], checkPhase ? "", doCheck ? true, binaryName ? name, extraCargoBuildArgs ? "" }:
|
||||||
|
let
|
||||||
|
cargoSha256Drv = pkgs.runCommand "${name}-cargosha256" { } ''
|
||||||
|
cp "${src}/cargosha256.nix" $out
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
rustPlatform.buildRustPackage rec {
|
||||||
|
inherit name cargoDepsName;
|
||||||
|
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 --bin ${binaryName} ${extraCargoBuildArgs}
|
||||||
|
'';
|
||||||
|
|
||||||
|
inherit checkPhase doCheck;
|
||||||
|
# binaryName defaults to the `name` arg (i.e. the Rust package name);
|
||||||
|
# it is used as the Cargo binary filename
|
||||||
|
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) lib fetchgit fetchFromGitHub python3Packages; misoc-new = true; }).migen;
|
||||||
|
in
|
||||||
|
pkgs.lib.attrsets.mapAttrs'
|
||||||
|
(name: value: pkgs.lib.attrsets.nameValuePair ("stabilizer-" + name)
|
||||||
|
(buildStm32Firmware ({
|
||||||
|
name = "stabilizer-" + name;
|
||||||
|
# If binaryName is not specified, use the attribute name as binaryName by default.
|
||||||
|
binaryName = name;
|
||||||
|
cargoDepsName = "stabilizer";
|
||||||
|
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)"
|
||||||
|
'';
|
||||||
|
doCheck = false;
|
||||||
|
} // value))) {
|
||||||
|
dual-iir = {};
|
||||||
|
dual-iir-pounder_v1_1 = {
|
||||||
|
binaryName = "dual-iir";
|
||||||
|
extraCargoBuildArgs = "--features pounder_v1_1";
|
||||||
|
};
|
||||||
|
lockin-external = {};
|
||||||
|
lockin-external-pounder_v1_1 = {
|
||||||
|
binaryName = "lockin-external";
|
||||||
|
extraCargoBuildArgs = "--features pounder_v1_1";
|
||||||
|
};
|
||||||
|
lockin-internal = {};
|
||||||
|
lockin-internal-pounder_v1_1 = {
|
||||||
|
binaryName = "lockin-internal";
|
||||||
|
extraCargoBuildArgs = "--features pounder_v1_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,9 +0,0 @@
|
||||||
{ pkgs ? import <nixpkgs> {}, rustManifest ? ./stm32/channel-rust-nightly.toml }:
|
|
||||||
|
|
||||||
let
|
|
||||||
jobs = import ./stm32/default.nix {
|
|
||||||
inherit rustManifest;
|
|
||||||
mozillaOverlay = import <mozillaOverlay>;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
builtins.mapAttrs (key: value: pkgs.lib.hydraJob value) jobs
|
|
|
@ -1,50 +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 ? builtins.fetchurl "https://static.rust-lang.org/dist/channel-rust-nightly.toml"
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
|
||||||
pkgs = import <nixpkgs> { overlays = [ mozillaOverlay ]; };
|
|
||||||
rustPlatform = pkgs.recurseIntoAttrs (pkgs.callPackage ./rustPlatform.nix {
|
|
||||||
inherit rustManifest;
|
|
||||||
});
|
|
||||||
buildStm32Firmware = { name, src, patchPhase ? "" }:
|
|
||||||
let
|
|
||||||
cargoSha256Drv = pkgs.runCommand "${name}-cargosha256" { } ''cp "${src}/cargosha256.nix" $out'';
|
|
||||||
in
|
|
||||||
rustPlatform.buildRustPackage rec {
|
|
||||||
inherit name;
|
|
||||||
version = "0.0.0";
|
|
||||||
|
|
||||||
inherit src;
|
|
||||||
cargoSha256 = (import cargoSha256Drv);
|
|
||||||
|
|
||||||
inherit patchPhase;
|
|
||||||
buildPhase = ''
|
|
||||||
export CARGO_HOME=$(mktemp -d cargo-home.XXX)
|
|
||||||
cargo build --release
|
|
||||||
'';
|
|
||||||
|
|
||||||
doCheck = false;
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out $out/nix-support
|
|
||||||
cp target/thumbv7em-none-eabihf/release/${name} $out/${name}.elf
|
|
||||||
echo file binary-dist $out/${name}.elf >> $out/nix-support/hydra-build-products
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
stabilizer = buildStm32Firmware {
|
|
||||||
name = "stabilizer";
|
|
||||||
src = <stabilizerSrc>;
|
|
||||||
patchPhase = ''
|
|
||||||
substituteInPlace src/main.rs \
|
|
||||||
--replace "let local_addr = net::wire::IpAddress::v4(10, 0, 16, 99);" \
|
|
||||||
"let local_addr = net::wire::IpAddress::v4(192, 168, 1, 76);"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
thermostat = buildStm32Firmware {
|
|
||||||
name = "thermostat";
|
|
||||||
src = <thermostatSrc>;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
let
|
||||||
|
pkgs = import <nixpkgs> {};
|
||||||
|
zynq-rs = import <zynq-rs>;
|
||||||
|
in
|
||||||
|
(
|
||||||
|
builtins.mapAttrs (key: value: pkgs.lib.hydraJob value) zynq-rs
|
||||||
|
)
|
59
zynq.nix
59
zynq.nix
|
@ -1,59 +0,0 @@
|
||||||
let
|
|
||||||
pkgs = import <nixpkgs> {};
|
|
||||||
zc706 = import <zc706> { mozillaOverlay = import <mozillaOverlay>; };
|
|
||||||
artiq-zynq = import <artiq-zynq> { mozillaOverlay = import <mozillaOverlay>; };
|
|
||||||
artiq-fast = import <artiq-fast> { inherit pkgs; };
|
|
||||||
addBuildProducts = drv: drv.overrideAttrs (oldAttrs: {
|
|
||||||
installPhase = ''
|
|
||||||
${oldAttrs.installPhase}
|
|
||||||
mkdir -p $out/nix-support
|
|
||||||
for f in $out/*.elf ; do
|
|
||||||
echo file binary-dist $f >> $out/nix-support/hydra-build-products
|
|
||||||
done
|
|
||||||
'';
|
|
||||||
});
|
|
||||||
in
|
|
||||||
(
|
|
||||||
builtins.mapAttrs (name: drv:
|
|
||||||
pkgs.lib.hydraJob (
|
|
||||||
addBuildProducts drv
|
|
||||||
)
|
|
||||||
) zc706.zc706
|
|
||||||
) // (
|
|
||||||
builtins.mapAttrs (key: value: pkgs.lib.hydraJob value) artiq-zynq
|
|
||||||
) // {
|
|
||||||
zc706-hitl-tests = pkgs.lib.hydraJob (pkgs.stdenv.mkDerivation {
|
|
||||||
name = "zc706-hitl-tests";
|
|
||||||
|
|
||||||
# requires patched Nix
|
|
||||||
__networked = true;
|
|
||||||
|
|
||||||
buildInputs = [
|
|
||||||
pkgs.netcat pkgs.openssh pkgs.rsync artiq-fast.artiq
|
|
||||||
];
|
|
||||||
phases = [ "buildPhase" ];
|
|
||||||
|
|
||||||
buildPhase =
|
|
||||||
''
|
|
||||||
echo Power cycling board...
|
|
||||||
(echo b; sleep 5; echo B) | nc -N 192.168.1.31 3131
|
|
||||||
sleep 5
|
|
||||||
echo Power cycle done.
|
|
||||||
|
|
||||||
export USER=hydra
|
|
||||||
pushd ${<artiq-zynq>}
|
|
||||||
bash ${<artiq-zynq>}/remote_run.sh -h rpi-4 -o "-F /dev/null -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=ERROR -i /opt/hydra_id_rsa" -d ${artiq-zynq.zc706-simple-jtag}
|
|
||||||
popd
|
|
||||||
|
|
||||||
echo Waiting for the firmware to boot...
|
|
||||||
sleep 15
|
|
||||||
|
|
||||||
echo Running test kernel...
|
|
||||||
artiq_run --device-db ${<artiq-zynq>}/examples/device_db.py ${<artiq-zynq>}/examples/mandelbrot.py
|
|
||||||
|
|
||||||
touch $out
|
|
||||||
|
|
||||||
echo Completed
|
|
||||||
'';
|
|
||||||
});
|
|
||||||
}
|
|
Loading…
Reference in New Issue