the nix store may contain hardlinks: derivations may output them
directly, or users may be using store optimization which automatically
hardlinks identical files in the nix store.
The presence of these links are intended to be a 'transparent'
optimization. However, when creating a squashfs image, the image
will be different depending on whether hard links were present
on the filesystem, leading to reproducibility problems.
By passing '-no-hardlinks' to mksquashfs the files are stored
as duplicates in the squashfs image. Since squashfs has support
for duplicate files this does not lead to a larger image.
For more details see
https://github.com/NixOS/nixpkgs/issues/114331
'gcloud sql connect' command allows to connect to a CloudSQL instance
from a local machine. In order to do so, it starts local
'cloud_sdk_proxy' instance. google-cloud-sdk expects to find one in SDK
root (installed by 'gcloud components') or on the PATH, if SDK is not
correctly installed ('.install' directory is missing).
Since google-cloud-sdk on NixOS is properly installed 'gcloud sql
connect' never looks for 'cloud_sql_proxy' on the PATH and simply
doesn't work at all.
The patch slightly modifies the check by looking not only for
'.install' directory, but for actual 'cloud_sql_proxy' binary before
falling back to the search on the PATH.
With this patch it's now possible to use 'gcloud sql connect' on NixOS,
provided that 'cloud_sql_proxy' is available either in user or system
enviroment (available in nixpkgs).
I started out by copying the `tigervnc` derivation, which
does things like re-using `xorg.xorgserver.buildInputs`
(given that these VNC servers are all forks of Xorg),
but then removed that and all the dependencies that did not
appear to be needed or checked for in the CMake output.
The custom installPhase got broken as the rust build scripts only
provide $releaseDir in postInstall hooks. The default rust installPhase
installs the same files, so the custom one is unnecessary.