From fc0d2144baf8871a56bda8de143d8f39357e47a7 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 18 Jul 2019 00:08:35 +0800 Subject: [PATCH] create a conda channel --- artiq-full.nix | 1 + artiq-full/conda-channel.nix | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 artiq-full/conda-channel.nix diff --git a/artiq-full.nix b/artiq-full.nix index f5fca45..6bce0ed 100644 --- a/artiq-full.nix +++ b/artiq-full.nix @@ -134,4 +134,5 @@ in src = generatedNix; constituents = builtins.attrValues jobs; }; + conda-channel = import ./artiq-full/conda-channel.nix { inherit pkgs; } { inherit jobs; }; } diff --git a/artiq-full/conda-channel.nix b/artiq-full/conda-channel.nix new file mode 100644 index 0000000..e07c40c --- /dev/null +++ b/artiq-full/conda-channel.nix @@ -0,0 +1,24 @@ +{ pkgs }: +{ jobs }: + +let + condaBuilderEnv = import { inherit pkgs; }; +in + pkgs.runCommand "blah" { } + '' + mkdir -p $out/noarch + 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 " "` + cp $path $out/noarch + fi + done < $hydra_build_products + fi + done + cd $out + ${condaBuilderEnv}/bin/conda-builder-env -c "conda index" + ''