forked from M-Labs/artiq
flake: add experimental feature support
This commit is contained in:
parent
3c7ab498d1
commit
b4287ac9f4
11
flake.nix
11
flake.nix
|
@ -134,7 +134,7 @@
|
||||||
doCheck = false; # FIXME
|
doCheck = false; # FIXME
|
||||||
};
|
};
|
||||||
|
|
||||||
artiq = pkgs.python3Packages.buildPythonPackage rec {
|
artiq-upstream = pkgs.python3Packages.buildPythonPackage rec {
|
||||||
pname = "artiq";
|
pname = "artiq";
|
||||||
version = artiqVersion;
|
version = artiqVersion;
|
||||||
src = self;
|
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 {
|
migen = pkgs.python3Packages.buildPythonPackage rec {
|
||||||
name = "migen";
|
name = "migen";
|
||||||
src = src-migen;
|
src = src-migen;
|
||||||
|
@ -250,7 +255,7 @@
|
||||||
runScript = "vivado";
|
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 {
|
pkgs.stdenv.mkDerivation {
|
||||||
name = "artiq-board-${target}-${variant}";
|
name = "artiq-board-${target}-${variant}";
|
||||||
phases = [ "buildPhase" "checkPhase" "installPhase" ];
|
phases = [ "buildPhase" "checkPhase" "installPhase" ];
|
||||||
|
@ -261,7 +266,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
nativeBuildInputs = [
|
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.rustc
|
||||||
rustPlatform.rust.cargo
|
rustPlatform.rust.cargo
|
||||||
pkgs.llvmPackages_11.clang-unwrapped
|
pkgs.llvmPackages_11.clang-unwrapped
|
||||||
|
|
Loading…
Reference in New Issue