mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-11-06 02:06:46 +01:00
d96992a21b
use latest libraries for unstable move all revs and hashes to default.nix thanks TQ for getting me through this blockage
46 lines
1.1 KiB
Nix
46 lines
1.1 KiB
Nix
{ lib, stdenv, fetchFromGitHub, cmake, gettext
|
|
, version
|
|
, libSources
|
|
}:
|
|
|
|
# callPackage libraries {
|
|
# version = "unstable";
|
|
# libs.symbols = {
|
|
# rev = "09f9..";
|
|
# sha256 = "...";
|
|
# };
|
|
# };
|
|
with lib;
|
|
let
|
|
mkLib = name: attrs:
|
|
stdenv.mkDerivation ({
|
|
name = "kicad-${name}-${version}";
|
|
src = fetchFromGitHub ({
|
|
owner = "KiCad";
|
|
repo = "kicad-${name}";
|
|
rev = version;
|
|
inherit name;
|
|
} // (libSources.${name} or {}));
|
|
nativeBuildInputs = [ cmake ];
|
|
} // attrs);
|
|
in
|
|
{
|
|
symbols = mkLib "symbols" {
|
|
meta.license = licenses.cc-by-sa-40;
|
|
};
|
|
templates = mkLib "templates" {
|
|
meta.license = licenses.cc-by-sa-40;
|
|
};
|
|
footprints = mkLib "footprints" {
|
|
meta.license = licenses.cc-by-sa-40;
|
|
};
|
|
i18n = mkLib "i18n" {
|
|
buildInputs = [ gettext ];
|
|
meta.license = licenses.gpl2; # https://github.com/KiCad/kicad-i18n/issues/3
|
|
};
|
|
packages3d = mkLib "packages3d" {
|
|
hydraPlatforms = []; # this is a ~1 GiB download, occupies ~5 GiB in store
|
|
meta.license = licenses.cc-by-sa-40;
|
|
};
|
|
}
|