2021-01-15 14:21:58 +01:00
|
|
|
{ lib, stdenv
|
2020-10-10 21:50:41 +02:00
|
|
|
, cmake
|
|
|
|
, gettext
|
2020-10-11 01:10:53 +02:00
|
|
|
, libSrc
|
|
|
|
, libVersion
|
2019-11-26 12:02:49 +01:00
|
|
|
}:
|
|
|
|
let
|
2020-03-17 00:27:18 +01:00
|
|
|
mkLib = name:
|
2020-03-28 01:39:57 +01:00
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "kicad-${name}";
|
2020-10-11 01:10:53 +02:00
|
|
|
version = libVersion;
|
|
|
|
|
|
|
|
src = libSrc name;
|
|
|
|
|
2020-03-28 01:39:57 +01:00
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
|
|
|
meta = rec {
|
2021-01-15 14:21:58 +01:00
|
|
|
license = lib.licenses.cc-by-sa-40;
|
|
|
|
platforms = lib.platforms.all;
|
2020-03-28 01:39:57 +01:00
|
|
|
# the 3d models are a ~1 GiB download and occupy ~5 GiB in store.
|
|
|
|
# this would exceed the hydra output limit
|
2020-10-10 21:50:41 +02:00
|
|
|
hydraPlatforms = if (name == "packages3d") then [ ] else platforms;
|
2020-03-17 00:27:18 +01:00
|
|
|
};
|
2020-03-28 01:39:57 +01:00
|
|
|
};
|
2019-11-26 12:02:49 +01:00
|
|
|
in
|
2019-12-06 04:53:28 +01:00
|
|
|
{
|
2020-03-17 00:27:18 +01:00
|
|
|
symbols = mkLib "symbols";
|
|
|
|
templates = mkLib "templates";
|
|
|
|
footprints = mkLib "footprints";
|
|
|
|
packages3d = mkLib "packages3d";
|
2019-11-26 12:02:49 +01:00
|
|
|
}
|