nixpkgs/pkgs/by-name/in/indi-full/package.nix
Linus Karl d2367c3f7e indi-full: refactor 3rdparty drivers
This splits the 3rdparty drivers into seperate
packages as recommended by upstream. This also
allows to build a indi-full equivalent with only
the needed drivers. Also add indi-full-nonfree
with all the nonfree drivers. And remove them
from indi-full.
2024-08-18 01:05:52 +02:00

24 lines
516 B
Nix

{
lib,
stdenv,
indi-3rdparty,
indi-with-drivers,
indilib,
}:
let
licenseFree = p: p.meta.license.free or false;
isFree =
p:
(builtins.all licenseFree ((p.buildInputs or [ ]) ++ (p.propagatedBuildInputs or [ ])))
&& licenseFree p;
drivers = builtins.filter (
attrs: isFree attrs && (lib.meta.availableOn stdenv.hostPlatform attrs)
) (builtins.attrValues indi-3rdparty);
in
indi-with-drivers.override {
pname = "indi-full";
inherit (indilib) version;
extraDrivers = drivers;
}