mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 07:23:20 +00:00
nixos/etc: fix using etc overlay on cross-compiled systems
We need to run tooling from the build platform when generating the EROFS.
This commit is contained in:
parent
3664857c48
commit
560cd874a3
@ -64,14 +64,6 @@ let
|
||||
|
||||
etcHardlinks = filter (f: f.mode != "symlink" && f.mode != "direct-symlink") etc';
|
||||
|
||||
build-composefs-dump = pkgs.buildPackages.runCommand "build-composefs-dump.py"
|
||||
{
|
||||
buildInputs = [ pkgs.buildPackages.python3 ];
|
||||
} ''
|
||||
install ${./build-composefs-dump.py} $out
|
||||
patchShebangs --host $out
|
||||
'';
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
@ -295,10 +287,12 @@ in
|
||||
system.build.etcMetadataImage =
|
||||
let
|
||||
etcJson = pkgs.writeText "etc-json" (builtins.toJSON etc');
|
||||
etcDump = pkgs.runCommand "etc-dump" { } "${build-composefs-dump} ${etcJson} > $out";
|
||||
etcDump = pkgs.runCommand "etc-dump" { } ''
|
||||
${lib.getExe pkgs.buildPackages.python3} ${./build-composefs-dump.py} ${etcJson} > $out
|
||||
'';
|
||||
in
|
||||
pkgs.runCommand "etc-metadata.erofs" {
|
||||
nativeBuildInputs = [ pkgs.composefs pkgs.erofs-utils ];
|
||||
nativeBuildInputs = with pkgs.buildPackages; [ composefs erofs-utils ];
|
||||
} ''
|
||||
mkcomposefs --from-file ${etcDump} $out
|
||||
fsck.erofs $out
|
||||
|
Loading…
Reference in New Issue
Block a user