I would just write `optional (!stdenv.isDarwin) libossp_uuid` and remove the check in all-packages.nix.