nix-community / nur-packages-template

A template for NUR repositories: [maintainer=@fgaz]
MIT License
113 stars 105 forks source link

Actions fail when running on self hosted github runner #102

Open ToyVo opened 3 weeks ago

ToyVo commented 3 weeks ago

I have been maintaining a package called nh_darwin, a fork of nh with support for nix-darwin. I have recently had an issue where a user was requesting a binary cache and helped write the build.yml file for github actions. Importantly I was using self hosed github runners as I own some mac minis for server purposes and it was a good fit to not have to pay 10x a linux runner.

Preamble out of the way, that single build.yml works for my self hosted runners and the github hosted runners equally well. But now I would like to export nh_darwin within my nur-packages I'm trying to setup.

aarch64-darwin: https://github.com/ToyVo/nur-packages/actions/runs/11632820895/job/32396712104 aarch64-linux: https://github.com/ToyVo/nur-packages/actions/runs/11632820894/job/32396712101 x86_64-darwin: https://github.com/ToyVo/nur-packages/actions/runs/11632820896/job/32396712063

basically, it seems like building for a specific nixpkgs ref in the matrix doesn't work on self hosted runners due to the restrict-eval setting.

Now obviously I could just build with nixpkgs-unstable from the flake, but I would like to get it building with all three refs with a single build script.

Removing restrict-eval doesn't fix it: https://github.com/ToyVo/nur-packages/actions/runs/11633280382/job/32398109279

It almost seems like I cannot set the nixpkgs ref on self hosted runners.

Mic92 commented 2 weeks ago

Interestingly the nix-instantiate command can resolve nixpkgs fine though.