forked from mirrors/nixpkgs
stdenv: deprecate unused adapters
stdenv: deprecate addCoverageInstrumentation adapter this used to be used in nixos/tests but it hasn't been used in nixpkgs for years stdenv: deprecate replaceMaintainersField adapter it was added in 2009 in01e98e49b1
by nbp there are no uses of it in nixpkgs now stdenv: deprecate validateLicenses adapter it was added in 2009 inb29073af25
unfreePredicate is now handled in ./pkgs/stdenv/generic/check-meta.nix so this is unnecessary
This commit is contained in:
parent
cce50c11ef
commit
2d019e0931
|
@ -149,25 +149,15 @@ rec {
|
|||
});
|
||||
|
||||
|
||||
/* Return a modified stdenv that builds packages with GCC's coverage
|
||||
instrumentation. The coverage note files (*.gcno) are stored in
|
||||
$out/.build, along with the source code of the package, to enable
|
||||
programs like lcov to produce pretty-printed reports.
|
||||
*/
|
||||
# remove after 22.05 and before 22.11
|
||||
addCoverageInstrumentation = stdenv:
|
||||
builtins.trace "'addCoverageInstrumentation' adapter is deprecated and will be removed before 22.11"
|
||||
overrideInStdenv stdenv [ pkgs.enableGCOVInstrumentation pkgs.keepBuildTree ];
|
||||
|
||||
|
||||
/* Replace the meta.maintainers field of a derivation. This is useful
|
||||
when you want to fork to update some packages without disturbing other
|
||||
developers.
|
||||
|
||||
e.g.: in all-packages.nix:
|
||||
|
||||
# remove all maintainers.
|
||||
defaultStdenv = replaceMaintainersField allStdenvs.stdenv pkgs [];
|
||||
*/
|
||||
# remove after 22.05 and before 22.11
|
||||
replaceMaintainersField = stdenv: pkgs: maintainers:
|
||||
builtins.trace "'replaceMaintainersField' adapter is deprecated and will be removed before 22.11"
|
||||
stdenv.override (old: {
|
||||
mkDerivationFromStdenv = overrideMkDerivationResult (pkg:
|
||||
lib.recursiveUpdate pkg { meta.maintainers = maintainers; });
|
||||
|
@ -193,22 +183,9 @@ rec {
|
|||
});
|
||||
|
||||
|
||||
/* Abort if the license predicate is not verified for a derivation
|
||||
declared with mkDerivation.
|
||||
|
||||
One possible predicate to avoid all non-free packages can be achieved
|
||||
with the following function:
|
||||
|
||||
isFree = license: with builtins;
|
||||
if license == null then true
|
||||
else if isList license then lib.all isFree license
|
||||
else license != "non-free" && license != "unfree";
|
||||
|
||||
This adapter can be defined on the defaultStdenv definition. You can
|
||||
use it by patching the all-packages.nix file or by using the override
|
||||
feature of ~/.config/nixpkgs/config.nix .
|
||||
*/
|
||||
# remove after 22.05 and before 22.11
|
||||
validateLicenses = licensePred: stdenv:
|
||||
builtins.trace "'validateLicenses' adapter is deprecated and will be removed before 22.11"
|
||||
stdenv.override (old: {
|
||||
mkDerivationFromStdenv = overrideMkDerivationResult (pkg:
|
||||
let
|
||||
|
|
Loading…
Reference in a new issue