mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 11:45:45 +03:00
modules/image/repart: Fix stripNixStorePrefix
It seems it wasn't working
This commit is contained in:
parent
fbff555535
commit
3eb0214551
1 changed files with 2 additions and 2 deletions
|
@ -53,7 +53,7 @@ def add_closure_to_definition(
|
||||||
|
|
||||||
source = Path(line.strip())
|
source = Path(line.strip())
|
||||||
target = str(source.relative_to("/nix/store/"))
|
target = str(source.relative_to("/nix/store/"))
|
||||||
target = f":{target}" if strip_nix_store_prefix else ""
|
target = f":/{target}" if strip_nix_store_prefix else ""
|
||||||
|
|
||||||
copy_files_lines.append(f"CopyFiles={source}{target}\n")
|
copy_files_lines.append(f"CopyFiles={source}{target}\n")
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ def main() -> None:
|
||||||
add_contents_to_definition(definition, contents)
|
add_contents_to_definition(definition, contents)
|
||||||
|
|
||||||
closure = config.get("closure")
|
closure = config.get("closure")
|
||||||
strip_nix_store_prefix = config.get("stripStorePaths")
|
strip_nix_store_prefix = config.get("stripNixStorePrefix")
|
||||||
add_closure_to_definition(definition, closure, strip_nix_store_prefix)
|
add_closure_to_definition(definition, closure, strip_nix_store_prefix)
|
||||||
|
|
||||||
print(target_dir.absolute())
|
print(target_dir.absolute())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue