2019-02-15 18:17:34 +08:00
|
|
|
{ pkgs }:
|
2019-02-15 22:34:56 +08:00
|
|
|
{ target, variant, boardBinaries }:
|
2019-02-14 15:29:42 +08:00
|
|
|
|
|
|
|
with pkgs;
|
|
|
|
|
|
|
|
let
|
2019-04-24 15:17:40 +08:00
|
|
|
version = import ./pkgs/artiq-version.nix (with pkgs; { inherit stdenv fetchgit git; });
|
2019-02-15 17:23:54 +08:00
|
|
|
fakeCondaSource = runCommand "fake-condasrc-artiq-board-${target}-${variant}" { }
|
2019-02-14 15:29:42 +08:00
|
|
|
''
|
2019-02-15 22:34:56 +08:00
|
|
|
mkdir -p $out/fake-conda;
|
2019-02-14 15:29:42 +08:00
|
|
|
|
|
|
|
cat << EOF > $out/fake-conda/meta.yaml
|
|
|
|
package:
|
|
|
|
name: artiq-board-${target}-${variant}
|
2019-02-15 22:34:56 +08:00
|
|
|
version: ${version}
|
2019-02-14 15:29:42 +08:00
|
|
|
|
|
|
|
build:
|
|
|
|
noarch: python
|
|
|
|
ignore_prefix_files: True
|
|
|
|
|
|
|
|
outputs:
|
|
|
|
- name: artiq-board-${target}-${variant}
|
|
|
|
noarch: python
|
|
|
|
files:
|
|
|
|
- site-packages
|
|
|
|
ignore_prefix_files: True
|
|
|
|
|
|
|
|
about:
|
|
|
|
home: https://m-labs.hk/artiq
|
|
|
|
license: LGPL
|
|
|
|
summary: 'Bitstream, BIOS and firmware for the ${target}-${variant} board variant'
|
|
|
|
EOF
|
|
|
|
|
|
|
|
cat << EOF > $out/fake-conda/build.sh
|
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
2019-02-22 23:16:17 +08:00
|
|
|
SOC_PREFIX=\$PREFIX/site-packages/artiq/board-support/${target}-${variant}
|
2019-02-14 15:29:42 +08:00
|
|
|
mkdir -p \$SOC_PREFIX
|
2019-02-22 23:16:17 +08:00
|
|
|
cp ${boardBinaries}/${pkgs.python3Packages.python.sitePackages}/artiq/board-support/${target}-${variant}/* \$SOC_PREFIX
|
2019-02-14 15:29:42 +08:00
|
|
|
EOF
|
|
|
|
chmod 755 $out/fake-conda/build.sh
|
|
|
|
'';
|
2019-02-15 17:25:57 +08:00
|
|
|
conda-artiq-board = import ./conda-build.nix { inherit pkgs; } {
|
2019-02-14 15:29:42 +08:00
|
|
|
name = "conda-artiq-board-${target}-${variant}";
|
|
|
|
src = fakeCondaSource;
|
|
|
|
};
|
|
|
|
in
|
2019-02-15 17:25:57 +08:00
|
|
|
conda-artiq-board
|