Commit Graph

13 Commits

Author SHA1 Message Date
Motiejus Jakštys
26249b62fd compressDrv: fix a confusing comment 2024-08-21 21:52:00 +03:00
Sandro Jäckel
0505523e98
compress-drv: correct comment 2024-08-19 13:19:27 +02:00
Sandro Jäckel
0654f81d56
compress-drv: carry pname, version forward
This is required to overwrite to use a compressed version of nextcloud in services.nextcloud.package because the module accesses version
2024-08-19 13:17:05 +02:00
Sandro Jäckel
4cc5dee048
compress-drv: allow passing extra arguments to find
This is useful for eg. nextcloud to prevent compressing thousands of
later unused files which are actually not used by the web server.
2024-08-19 13:15:55 +02:00
Sandro Jäckel
0ca4bfa700
compress-drv: add zstd 2024-08-19 13:15:54 +02:00
Sandro Jäckel
9581a2bdca
compress-drv: misc cleanup 2024-08-19 13:15:54 +02:00
Sandro Jäckel
6449d32b0a
compress-drv: add htm, otf formats to default 2024-08-19 13:15:46 +02:00
Sandro Jäckel
7ebbf27832
compress-drv: sort formats 2024-08-19 13:15:46 +02:00
Motiejus Jakštys
1bd350449a gitea: fix passthru.data-compressed
Fixes two bugs:
- pass a forgotten `{}` to `compressDrv`.
- remove incorrect usage of `lndir` in `compressDrv`. I added a brief
  comment on why, see [this comment][1] for more details.

Tested with:

```
$ nix build .#legacyPackages.x86_64-linux.gitea.passthru.data-compressed
$ ls -lh result/public/assets/licenses.txt*
lrwxrwxrwx 1 root root  90 Jan  1  1970 result/public/assets/licenses.txt -> /nix/store/p21irsr57hckd3x3ym18aa0cr9zmm3an-gitea-1.22.1-data/./public/assets/licenses.txt
-r--r--r-- 1 root root 30K Jan  1  1970 result/public/assets/licenses.txt.br
-r--r--r-- 1 root root 82K Jan  1  1970 result/public/assets/licenses.txt.gz
```

[1]: https://github.com/NixOS/nixpkgs/pull/332752#discussion_r1721043286
2024-08-18 22:47:03 +03:00
Philip Taron
fcefb0a17c
Merge pull request #332558 from motiejus/compressDrv
compressDrv: get rid of unneeded extra params
2024-08-05 14:58:06 -07:00
Motiejus Jakštys
6b70cde244 compressDrv: get rid of unneeded extra params
This is a leftover from the original versions of #292324. Reduces the
API surface to not accept accidental arguments.
2024-08-05 23:26:17 +03:00
Johannes Kirschbauer
782c1eabe2
Docs: pkgs{compressDrv,compressDrvWeb} improve clarity 2024-08-05 14:16:54 +02:00
Motiejus Jakštys
bbd0655ae8 add compressDrv and compressDrvWeb
*compressDrv* compresses files in a given derivation.

*compressDrvWeb* compresses a derivation for a loosely-defined
pre-compressed "web server" usage.

This intends to replace the `passthru.data-compressed` derivations that
have accumulated in nixpkgs with something more reusable.
2024-08-04 10:10:16 +03:00