From 26f14184923fafec70b954feaadac41afd4554eb Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 14 Nov 2019 16:34:25 +0800 Subject: [PATCH] urukul: also build release version --- urukul/default.nix | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/urukul/default.nix b/urukul/default.nix index 393033c..063b4f1 100644 --- a/urukul/default.nix +++ b/urukul/default.nix @@ -2,19 +2,32 @@ let migen = (pkgs.callPackage ../artiq-fast/pkgs/python-deps.nix {}).migen; 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 { - urukul-cpld = pkgs.stdenv.mkDerivation { - name = "urukul-cpld"; + urukul-cpld-master = buildUrukulCpld { + version = "master"; 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 - ''; + }; + urukul-cpld-release = buildUrukulCpld rec { + version = "1.3.1"; + src = pkgs.fetchFromGitHub { + owner = "quartiq"; + repo = "urukul"; + rev = "v${version}"; + sha256 = "1nvarspqbf9f7b27j34jkkh4mj6rwrlmccmfpz5nnzk3h2j6zbqc"; + }; }; }