Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

indi-full: Indi 3rdparty refactor #306650

Merged
merged 2 commits into from
Aug 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17332,6 +17332,12 @@
githubId = 5265630;
name = "Michael Köppl";
};
returntoreality = {
email = "[email protected]";
github = "retuntoreality";
githubId = 255667;
name = "Linus Karl";
};
revol-xut = {
email = "[email protected]";
name = "Tassilo Tanneberger";
Expand Down
4 changes: 4 additions & 0 deletions nixos/doc/manual/release-notes/rl-2411.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,10 @@

- `programs.vim.defaultEditor` now only works if `programs.vim.enable` is enabled.

- The `indi-full` package no longer contains non-free drivers.
To get the old collection of drivers use `indi-full-nonfree` or create your own collection of drivers by overriding indi-with-drivers.
E.g.: `pkgs.indi-with-drivers.override {extraDrivers = with pkgs.indi-3rdparty; [indi-gphoto];}`

- `/share/vim-plugins` now only gets linked if `programs.vim.enable` is enabled

- The `tracy` package no longer works on X11, since it's moved to Wayland
Expand Down
15 changes: 15 additions & 0 deletions pkgs/by-name/in/indi-full-nonfree/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
lib,
stdenv,
indi-3rdparty,
indilib,
indi-with-drivers,
}:

indi-with-drivers.override {
pname = "indi-full-nonfree";
inherit (indilib) version;
extraDrivers = builtins.filter (attrs: lib.meta.availableOn stdenv.hostPlatform attrs) (
builtins.attrValues indi-3rdparty
);
}
23 changes: 23 additions & 0 deletions pkgs/by-name/in/indi-full/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
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;
}
24 changes: 24 additions & 0 deletions pkgs/by-name/in/indi-with-drivers/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
lib,
buildEnv,
makeBinaryWrapper,
indilib ? indilib,
pname ? "indi-with-drivers",
version ? indilib.version,
extraDrivers ? [ ],
}:

buildEnv {
name = "${pname}-${version}";

paths = [ indilib ] ++ extraDrivers;

nativeBuildInputs = [ makeBinaryWrapper ];

postBuild = lib.optionalString (extraDrivers != [ ]) ''
rm $out/bin/indiserver
makeBinaryWrapper ${indilib}/bin/indiserver $out/bin/indiserver --set-default INDIPREFIX $out
'';

inherit (indilib) meta;
}
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ stdenv.mkDerivation (finalAttrs: {
description = "Implementation of the INDI protocol for POSIX operating systems";
changelog = "https://github.com/indilib/indi/releases/tag/v${finalAttrs.version}";
license = licenses.lgpl2Plus;
maintainers = with maintainers; [ hjones2199 sheepforce ];
maintainers = with maintainers; [ hjones2199 sheepforce returntoreality ];
platforms = platforms.unix;
};
})
Loading