It does not work on multi-system projects
flake-to-gitlab-ci fails on any projects with more than one system. This is because nix flake show
is oblivious to the notion of "current system":
❯ nix flake show --allow-import-from-derivation --json
warning: Git tree '/Users/srid/code/flake-to-gitlab-ci' is dirty
error: a 'x86_64-linux' with features {} is required to build '/nix/store/sk7fddrs4lkd32k8nchz2w02924nm3zz-cabal2nix-flake-to-gitlab-ci.drv', but I am a 'aarch64-darwin' with features {benchmark, big-parallel, nixos-test}
(use '--show-trace' to show detailed location information)
I want my project to support both Linux and macOS systems, but this means I am prohibited from using flake-to-gitlab-ci
for it.
One hack I can use is to patch the flake.nix
using a regex replace tool to replace the systems
list.