-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix nix flake check
on macOS
#421
Conversation
(exposed.checks | ||
// (lib.mapAttrs' (name: value: lib.nameValuePair "stable-${name}" value) | ||
exposed-stable.checks)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two sets had the same names, so only the checks from the second set (exposed-stable
) were being built. This led to a confusing situation where nix flake check
would fail but building the corresponding package with nix build .#opam
would succeed.
tools = import ./call-tools.nix pkgs; | ||
run = pkgs.callPackage ./run.nix { inherit pkgs tools isFlakes gitignore-nix-src; }; | ||
in | ||
{ | ||
inherit tools run; | ||
# Flake style attributes | ||
packages = tools // { | ||
packages = (lib.filterAttrs (_name: value: value != null) tools) // { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nix flake check
complains if non-derivation values are present in packages
.
@@ -37,7 +38,10 @@ let | |||
specialArgs = { inherit pkgs; }; | |||
}; | |||
allHooks = config.config.hooks; | |||
allEntryPoints = pkgs.lib.mapAttrsToList (_: v: v.entry) allHooks; | |||
allEntryPoints = lib.pipe allHooks [ | |||
(lib.filterAttrs (_name: value: value.package != null)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't coerce null
to a string.
the-headache = | ||
(if headache != null then headache else ocamlPackages.headache).overrideAttrs (drv: { | ||
nativeBuildInputs = (drv.nativeBuildInputs or [ ]) ++ lib.optionals stdenv.isDarwin [ | ||
darwin.sigtool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing codesign
on nixpkgs-stable.
@@ -183,6 +174,9 @@ in | |||
chktex = tex; | |||
commitizen = commitizen.overrideAttrs (_: _: { doCheck = false; }); | |||
bats = if bats ? withLibraries then (bats.withLibraries (p: [ p.bats-support p.bats-assert p.bats-file ])) else bats; | |||
git-annex = if stdenv.isDarwin then null else git-annex; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting these to null
is kinda sketchy (meta.broken
would be better) but it's what the other derivations in this file do so I left it as-is.
This fixes
nix flake check
on macOS.