7 ms·
When anything hits the network, there is nothing to do besides - disabling the code that hits the network, whether by patching or by configuration ("--disable-
by AndersonTorres 4y ago
When anything hits the network, there is nothing to do besides
- disabling the code that hits the network, whether by patching or by configuration ("--disable-downloads" or anything similar)
- or emulating it; e.g. if the script downloads a file, we can `fetchurl` it and move the downloaded file to its expected place. 9Of course, it works when the script does not override the downloaded file; otherwise, go to the previous option)
Two examples came to my mind:
- Arcan vendoring required patching its cmake scripts, because cmake does not honor the cache and tries to download things anyway:
https://github.com/NixOS/nixpkgs/blob/901978e1fd43753d56299a3b4f549b66ea77a744/pkgs/desktops/arcan/arcan/default.nix#L116 https://github.com/NixOS/nixpkgs/blob/901978e1fd43753d56299a...
- cardboard didn't require it because meson honors the cache (and Nixpkgs configures Meson to not download anything):
https://github.com/NixOS/nixpkgs/blob/901978e1fd43753d56299a3b4f549b66ea77a744/pkgs/applications/window-managers/cardboard/default.nix#L95 https://github.com/NixOS/nixpkgs/blob/901978e1fd43753d56299a...