@ -1,5 +1,7 @@
with import ./release-lib.nix { supportedSystems = [ builtins . currentSystem ] ; } ;
let
lib = import ../../lib ;
nativePlatforms = linux ;
/* B a s i c l i s t o f p a c k a g e s t o c r o s s - b u i l d */
@ -22,6 +24,40 @@ let
in
{
# These `nativeDrv`s should be identical to their vanilla ones --- cross
# compiling should not affect the native derivation.
ensureUnaffected = let
# Absurd values are fine here, as we are not building anything. In fact,
# there probably a good idea to try to be "more parametric" --- i.e. avoid
# any special casing.
crossSystem = {
config = " f o o s y s " ;
libc = " f o o l i b c " ;
} ;
# Converting to a string (drv path) before checking equality is probably a
# good idea lest there be some irrelevant pass-through debug attrs that
# cause false negatives.
testEqualOne = path : system : let
f = attrs : builtins . toString ( lib . getAttrFromPath path ( allPackages attrs ) ) ;
in assert f { inherit system ; } == f { inherit system crossSystem ; } ; true ;
testEqual = path : systems : forAllSupportedSystems systems ( testEqualOne path ) ;
mapTestEqual = lib . mapAttrsRecursive testEqual ;
in mapTestEqual {
boehmgc = nativePlatforms ;
libffi = nativePlatforms ;
libiconv = nativePlatforms ;
libtool = nativePlatforms ;
zlib = nativePlatforms ;
readline = nativePlatforms ;
libxml2 = nativePlatforms ;
guile = nativePlatforms ;
} ;
/* T e s t s o m e c r o s s b u i l d s t o t h e S h e e v a p l u g */
crossSheevaplugLinux = let
crossSystem = {