Skip to content

Commit 5f1656b

Browse files
committed
XXX: debug logging on unpack source script
1 parent d9f9781 commit 5f1656b

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

modules/source.nix

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,12 @@ let
188188
in mkIf (mountPoints != [])
189189
((lib.concatMapStringsSep "\n" (mountPoint: "mkdir -p ${mountPoint}") mountPoints) + "\n");
190190

191-
unpackScript = (lib.optionalString config.enable ''
191+
unpackScript = ''
192+
#
193+
# ${config.src}${config.relpath}
194+
#
195+
''
196+
+ (lib.optionalString config.enable ''
192197
mkdir -p ${config.relpath}
193198
${pkgs.utillinux}/bin/mount --bind ${config.src} ${config.relpath}
194199
'')
@@ -269,7 +274,14 @@ in
269274
inherit (config.source.manifest) rev sha256;
270275
});
271276

272-
unpackScript = lib.concatMapStringsSep "\n" (d: d.unpackScript) (lib.attrValues config.source.dirs);
277+
unpackScript = ''
278+
(
279+
PS4=" $ "
280+
set -x
281+
'' + lib.concatMapStringsSep "\n" (d: d.unpackScript) (lib.attrValues config.source.dirs)
282+
+ ''
283+
)
284+
'';
273285
};
274286

275287
config.build = {

0 commit comments

Comments
 (0)