urukul: also build release version

This commit is contained in:
Sebastien Bourdeauducq 2019-11-14 16:34:25 +08:00
parent 5797648204
commit 26f1418492

View File

@ -2,19 +2,32 @@
let let
migen = (pkgs.callPackage ../artiq-fast/pkgs/python-deps.nix {}).migen; migen = (pkgs.callPackage ../artiq-fast/pkgs/python-deps.nix {}).migen;
ise = import ./ise.nix { inherit pkgs; }; ise = import ./ise.nix { inherit pkgs; };
buildUrukulCpld = {version, src}: pkgs.stdenv.mkDerivation {
name = "urukul-cpld-${version}";
inherit src;
buildInputs = [(pkgs.python3.withPackages(ps: [migen]))] ++ (builtins.attrValues ise);
phases = ["buildPhase" "installPhase"];
buildPhase = "python $src/urukul_impl.py";
installPhase =
''
mkdir -p $out $out/nix-support
cp build/urukul.jed $out
echo file binary-dist $out/urukul.jed >> $out/nix-support/hydra-build-products
'';
};
in in
{ {
urukul-cpld = pkgs.stdenv.mkDerivation { urukul-cpld-master = buildUrukulCpld {
name = "urukul-cpld"; version = "master";
src = <urukulSrc>; src = <urukulSrc>;
buildInputs = [(pkgs.python3.withPackages(ps: [migen]))] ++ (builtins.attrValues ise); };
phases = ["buildPhase" "installPhase"]; urukul-cpld-release = buildUrukulCpld rec {
buildPhase = "python $src/urukul_impl.py"; version = "1.3.1";
installPhase = src = pkgs.fetchFromGitHub {
'' owner = "quartiq";
mkdir -p $out $out/nix-support repo = "urukul";
cp build/urukul.jed $out rev = "v${version}";
echo file binary-dist $out/urukul.jed >> $out/nix-support/hydra-build-products sha256 = "1nvarspqbf9f7b27j34jkkh4mj6rwrlmccmfpz5nnzk3h2j6zbqc";
''; };
}; };
} }