-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
gitea: fix passthru.data-compressed #335670
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,4 @@ | ||
| { | ||
| lib, | ||
| xorg, | ||
| runCommand, | ||
| }: | ||
| { lib, runCommand }: | ||
| /** | ||
| Compresses files of a given derivation, and returns a new derivation with | ||
| compressed files | ||
|
|
@@ -72,7 +68,11 @@ let | |
| in | ||
| runCommand "${drv.name}-compressed" { } '' | ||
| mkdir $out | ||
| (cd $out; ${xorg.lndir}/bin/lndir ${drv}) | ||
|
|
||
| # cannot use lndir here, because it also symlinks directories, | ||
| # which we do not need; we only need to symlink files. | ||
| (cd ${drv}; find -L -type d -exec mkdir -p $out/{} ';') | ||
| (cd ${drv}; find -L -type f -exec ln -s ${drv}/{} $out/{} ';') | ||
|
Comment on lines
+72
to
+75
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I also just find this so much easier to reason about than
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is just how lndir functions, that it doesn't recurse into other symlinks. Probably mainly to avoid symlink loops? |
||
|
|
||
| ${lib.concatStringsSep "\n\n" (lib.mapAttrsToList mkCmd compressors)} | ||
| '' | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That comment is wrong. lndir never symlinks directories directly. Only if they are a symlink and then the input file is technically not a directory but a symlink to a directory.