1
0
Fork 0

artiq-extras: factor out dual nix/conda packaging

This commit is contained in:
Sebastien Bourdeauducq 2019-04-19 20:34:07 +08:00
parent e749502106
commit 6be45f18b0
1 changed files with 28 additions and 23 deletions

View File

@ -1,26 +1,31 @@
{ pkgs, asyncserial, artiq }: { pkgs, asyncserial, artiq }:
let let
korad_ka3005p_version = "1.0"; dualPackage = (
korad_ka3005p_src = pkgs.fetchFromGitHub { { name, version, src, pythonOptions, condaOptions }:
owner = "m-labs"; {
repo = "korad_ka3005p"; "${name}" = pkgs.python3Packages.buildPythonPackage ({
rev = "e0adec6c577d7d1b832a2b1bf20e89ac393ca27e"; inherit version;
sha256 = "18092zgjh63qrg6lg9mzsbr2yri7k7wb97mip5xq3zrcabmmpbk3"; name = "${name}-${version}";
}; inherit src;
in rec { } // pythonOptions);
korad_ka3005p = pkgs.python3Packages.buildPythonPackage rec { "conda-${name}" = import ./conda-build.nix { inherit pkgs; } {
version = korad_ka3005p_version; name = "conda-korad_ka3005p";
name = "korad_ka3005p-${version}"; src = import ./conda-fake-source.nix { inherit pkgs; } ({
buildInputs = [ asyncserial artiq ]; inherit name version src;
src = korad_ka3005p_src; } // condaOptions);
}; };
conda-korad_ka3005p = import ./conda-build.nix { inherit pkgs; } { }
name = "conda-korad_ka3005p"; );
src = import ./conda-fake-source.nix { inherit pkgs; } { in
name = "korad_ka3005p"; (dualPackage {
version = korad_ka3005p_version; name = "korad_ka3005p";
src = korad_ka3005p_src; version = "1.0";
dependencies = [ "asyncserial" ]; src = pkgs.fetchFromGitHub {
owner = "m-labs";
repo = "korad_ka3005p";
rev = "e0adec6c577d7d1b832a2b1bf20e89ac393ca27e";
sha256 = "18092zgjh63qrg6lg9mzsbr2yri7k7wb97mip5xq3zrcabmmpbk3";
}; };
}; pythonOptions = { buildInputs = [ asyncserial artiq ]; };
} condaOptions = { dependencies = [ "asyncserial" ]; };
})