MacOS filesystem is not case sensitive and file collisions break
hash, this should fix that problem.
Co-authored-by: eljamm <fedi.jamoussi@protonmail.ch>
We apparently don't need older versions, only install what we need.
Keep it configurable for now but we might remove older versions from
onlyoffice_versions and remove the old installation method if there
would be no reason to install older versions
(older versions are no longer tested so would eventually become
outdated, even if they should not change much as the older versions
don't evolve)
This fixes a broken symlink after install; there probably is a better
way to do it but that'll work and ideally new test will catch this
breaking again.
Fixes: #404114
This reverts commit 65a333600d.
This wasn't tested for correctness with something like fodwatch [0],
and should not have been (self-)merged so quickly, especially without
further review.
It also resulted in the breakage of at least one package [1] (and that's
the one we know of and was caught).
A few packages that were updated in between this commit and this revert
were not reverted back to using `rev`, but other than that, this is a
1:1 revert.
[0]: https://codeberg.org/raphaelr/fodwatch
[1]: https://github.com/NixOS/nixpkgs/pull/396904 / 758551e458
With this change, I saw the following when I built cryptpad:
```
$ nix build .#cryptpad
...
> v1 was up to date
> v2b was up to date
> v4 was up to date
> v5 was up to date
> v6 was up to date
> Wrong commit of /nix/store/1m2d8c4fppfav7n2s4fvali3iira2ky2-cryptpad-2024.9.1/lib/node_modules/cryptpad/www/common/onlyoffice/dist/v7 found. Expected: e1267803. Actual: 9d8b914a
```
This reproduces the issue @martinetd noticed in
<https://github.com/NixOS/nixpkgs/pull/365126#discussion_r1885015234>.
I then addressed these issue by fixing the commit we use for `v7` of
OnlyOffice.
This dependency is necessary for cryptpad to convert between various
document formats. I ran into this when trying to import a `.xlsx` file
into cryptpad.
This code was inspired by the [`install_x2t` function in upstream's
`install-onlyoffice.sh` script](https://github.com/cryptpad/cryptpad/blob/2024.9.1/install-onlyoffice.sh#L37).