2021-02-15 21:18:25 +08:00
|
|
|
{ pkgs, artiq-fast }:
|
2019-07-18 00:08:35 +08:00
|
|
|
{ jobs }:
|
|
|
|
|
|
|
|
let
|
2021-02-16 04:26:52 +08:00
|
|
|
condaBuilderEnv = import (artiq-fast + "/conda/builder-env.nix") { inherit pkgs; };
|
2019-07-18 00:08:35 +08:00
|
|
|
in
|
2019-07-18 00:15:11 +08:00
|
|
|
pkgs.runCommand "conda-channel" { }
|
2019-07-18 00:08:35 +08:00
|
|
|
''
|
2020-06-14 22:50:02 +08:00
|
|
|
mkdir -p $out/noarch $out/linux-64 $out/win-64
|
2019-07-18 00:08:35 +08:00
|
|
|
for storepath in ${pkgs.lib.concatMapStringsSep " " builtins.toString (builtins.attrValues jobs)}; do
|
|
|
|
hydra_build_products=$storepath/nix-support/hydra-build-products
|
|
|
|
if [ -f $hydra_build_products ]; then
|
|
|
|
while IFS= read -r line; do
|
|
|
|
type=`echo $line | cut -f2 -d " "`
|
|
|
|
if [ $type == "conda" ]; then
|
|
|
|
path=`echo $line | cut -f3 -d " "`
|
2020-06-10 12:05:01 +08:00
|
|
|
arch=`echo $path | cut -f5 -d "/"`
|
|
|
|
ln -s $path $out/$arch
|
2019-07-18 00:08:35 +08:00
|
|
|
fi
|
|
|
|
done < $hydra_build_products
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
cd $out
|
|
|
|
${condaBuilderEnv}/bin/conda-builder-env -c "conda index"
|
|
|
|
''
|