forked from M-Labs/artiq
1
0
Fork 0

flake: add experimental feature support

This commit is contained in:
Sebastien Bourdeauducq 2022-09-05 11:48:43 +08:00
parent 3c7ab498d1
commit b4287ac9f4
1 changed files with 8 additions and 3 deletions

View File

@ -134,7 +134,7 @@
doCheck = false; # FIXME
};
artiq = pkgs.python3Packages.buildPythonPackage rec {
artiq-upstream = pkgs.python3Packages.buildPythonPackage rec {
pname = "artiq";
version = artiqVersion;
src = self;
@ -175,6 +175,11 @@
'';
};
artiq = artiq-upstream // {
withExperimentalFeatures = features: artiq-upstream.overrideAttrs(oa:
{ patches = map (f: ./experimental-features/${f}.diff) features; });
};
migen = pkgs.python3Packages.buildPythonPackage rec {
name = "migen";
src = src-migen;
@ -250,7 +255,7 @@
runScript = "vivado";
};
makeArtiqBoardPackage = { target, variant, buildCommand ? "python -m artiq.gateware.targets.${target} -V ${variant}" }:
makeArtiqBoardPackage = { target, variant, buildCommand ? "python -m artiq.gateware.targets.${target} -V ${variant}", experimentalFeatures ? [] }:
pkgs.stdenv.mkDerivation {
name = "artiq-board-${target}-${variant}";
phases = [ "buildPhase" "checkPhase" "installPhase" ];
@ -261,7 +266,7 @@
};
};
nativeBuildInputs = [
(pkgs.python3.withPackages(ps: [ ps.jsonschema migen misoc artiq]))
(pkgs.python3.withPackages(ps: [ ps.jsonschema migen misoc (artiq.withExperimentalFeatures experimentalFeatures) ]))
rustPlatform.rust.rustc
rustPlatform.rust.cargo
pkgs.llvmPackages_11.clang-unwrapped