nix-scripts/artiq-fast/conda/build.nix

21 lines
613 B
Nix
Raw Normal View History

# We need to pass the whole source to conda for the git variables to work.
# recipe must be a string pointing to a path within the source.
{ pkgs }:
2019-04-19 19:52:34 +08:00
{ name, src, recipe ? "fake-conda"}:
let
2020-06-09 14:30:23 +08:00
condaBuilderEnv = import ./builder-env.nix { inherit pkgs; };
2019-07-17 23:51:09 +08:00
in pkgs.stdenv.mkDerivation {
inherit name src;
buildCommand =
''
HOME=`pwd`
mkdir $out
2020-06-09 15:12:37 +08:00
${condaBuilderEnv}/bin/conda-builder-env -c "conda build --no-anaconda-upload --no-test --output-folder $out $src/${recipe}"
mkdir -p $out/nix-support
echo file conda $out/noarch/*.tar.bz2 >> $out/nix-support/hydra-build-products
'';
}