Hi,
I am currently trying to build a derivation that uses a darwin application (the ones with the .app extension).
The derivation is pretty straightforward:
pkgs.stdenv.mkDerivation {
name = "cypress";
unpackPhase = "unzip $src -d $out > /dev/null";
buildInputs = [pkgs.unzip];
src = pkgs.fetchurl {
url = "https://cdn.cypress.io/desktop/13.10.0/darwin-arm64/cypress.zip";
sha256 = "sha256-mEaNNblRwcmEeQR8VV+0zbRCPtzxxUEyT5ktSg/x6UU=";
};
}
After building I end up with the following binary:
$ ls -la /nix/store/cr2qvy5zinjlc7h1rfz8m50dav34492v-cypress/Cypress.app/Contents/MacOS/Cypress
-r-xr-xr-x 1 root wheel 69536 Dec 31 1969 /nix/store/cr2qvy5zinjlc7h1rfz8m50dav34492v-cypress/Cypress.app/Contents/MacOS/Cypress
When I try to execute it on my machine, I am getting the following error:
I suspect this error is caused by the fact that all files within the nix store have a epoch=1
, which triggers the OS antivirus.
So here’s the question: Is there a way to make files in the nix store have a different epoch so the darwin antivirus does not trigger when it tries to execute them?
Any extra information on how to build darwin .app
packages would be greatly appreciated.
Thanks!