forked from NixOS/nixpkgs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request NixOS#306650 from returntoreality/indi-3rdparty-re…
…factor indi-full: Indi 3rdparty refactor
- Loading branch information
Showing
11 changed files
with
1,132 additions
and
218 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17418,6 +17418,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"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.