2021-01-17 00:15:33 +00:00
|
|
|
{ lib, stdenv
|
2020-10-16 20:44:37 +00:00
|
|
|
, cmake
|
|
|
|
, gettext
|
|
|
|
, libSrc
|
|
|
|
, libVersion
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
let
|
|
|
|
mkLib = name:
|
2020-05-15 21:57:56 +00:00
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "kicad-${name}";
|
2020-10-16 20:44:37 +00:00
|
|
|
version = libVersion;
|
|
|
|
|
|
|
|
src = libSrc name;
|
|
|
|
|
2020-05-15 21:57:56 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
|
|
|
meta = rec {
|
2021-01-17 00:15:33 +00:00
|
|
|
license = lib.licenses.cc-by-sa-40;
|
|
|
|
platforms = lib.platforms.all;
|
2020-05-15 21:57:56 +00:00
|
|
|
# the 3d models are a ~1 GiB download and occupy ~5 GiB in store.
|
|
|
|
# this would exceed the hydra output limit
|
2020-10-16 20:44:37 +00:00
|
|
|
hydraPlatforms = if (name == "packages3d") then [ ] else platforms;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2020-05-15 21:57:56 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
in
|
|
|
|
{
|
|
|
|
symbols = mkLib "symbols";
|
|
|
|
templates = mkLib "templates";
|
|
|
|
footprints = mkLib "footprints";
|
|
|
|
packages3d = mkLib "packages3d";
|
|
|
|
}
|