@ -149,25 +149,15 @@ rec {
} ) ;
/* R e t u r n a m o d i f i e d s t d e n v t h a t b u i l d s p a c k a g e s w i t h G C C ' s c o v e r a g e
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 " ' a d d C o v e r a g e I n s t r u m e n t a t i o n ' a d a p t e r i s d e p r e c a t e d a n d w i l l b e r e m o v e d b e f o r e 2 2 . 1 1 "
overrideInStdenv stdenv [ pkgs . enableGCOVInstrumentation pkgs . keepBuildTree ] ;
/* R e p l a c e t h e m e t a . m a i n t a i n e r s f i e l d o f a d e r i v a t i o n . T h i s i s u s e f u l
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 " ' r e p l a c e M a i n t a i n e r s F i e l d ' a d a p t e r i s d e p r e c a t e d a n d w i l l b e r e m o v e d b e f o r e 2 2 . 1 1 "
stdenv . override ( old : {
mkDerivationFromStdenv = overrideMkDerivationResult ( pkg :
lib . recursiveUpdate pkg { meta . maintainers = maintainers ; } ) ;
@ -193,22 +183,9 @@ rec {
} ) ;
/* A b o r t i f t h e l i c e n s e p r e d i c a t e i s n o t v e r i f i e d f o r a d e r i v a t i o n
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 != " n o n - f r e e " && license != " u n f r e e " ;
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 " ' v a l i d a t e L i c e n s e s ' a d a p t e r i s d e p r e c a t e d a n d w i l l b e r e m o v e d b e f o r e 2 2 . 1 1 "
stdenv . override ( old : {
mkDerivationFromStdenv = overrideMkDerivationResult ( pkg :
let