extras: added enabled flag for dualpackage, only build dax for matching artiq version

This commit is contained in:
Leon Riesebos 2021-07-05 17:39:58 -04:00
parent 17efabf4a9
commit ee4014f008

View File

@ -3,8 +3,8 @@ 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 ? {}, withManual ? true}: { 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}";
@ -38,7 +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
''; '';
}; };
}) }))
); );
# 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: {
@ -242,6 +242,7 @@ in
}) // (dualPackage rec { }) // (dualPackage rec {
name = "dax"; name = "dax";
version = "6.4"; version = "6.4";
enabled = builtins.head (builtins.splitVersion version) == builtins.head (builtins.splitVersion artiq.version);
withManual = false; withManual = false;
src = pkgs.fetchgit { src = pkgs.fetchgit {
url = "https://gitlab.com/duke-artiq/dax.git"; url = "https://gitlab.com/duke-artiq/dax.git";