Skip to content
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

nncp: 8.8.0 -> 8.8.1 #198701

Merged
merged 1 commit into from
Nov 8, 2022
Merged

nncp: 8.8.0 -> 8.8.1 #198701

merged 1 commit into from
Nov 8, 2022

Conversation

ehmry
Copy link
Contributor

@ehmry ehmry commented Oct 30, 2022

Description of changes

The main improvements are:

  • Fixed "nncp-daemon" failing with unauthenticated connection and
    enabled "-autotoss".
  • Updated dependencies.
Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.11 Release Notes (or backporting 22.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@viraptor
Copy link
Contributor

On darwin/intel:

       > In file included from /nix/store/qlri4s3662flhy1y3lzq8j1hpvnf8xnp-apple-framework-Foundation-11.0.0/Library/Frameworks/Foundation.framework/Headers/Foundation.h:87:
       > In file included from /nix/store/qlri4s3662flhy1y3lzq8j1hpvnf8xnp-apple-framework-Foundation-11.0.0/Library/Frameworks/Foundation.framework/Headers/NSURLCredential.h:9:
       > In file included from /nix/store/a3wz3bgl85yy9g0l2nlys7y05z76lgbg-apple-framework-Security-11.0.0/Library/Frameworks/Security.framework/Headers/Security.h:87:
       > /nix/store/a3wz3bgl85yy9g0l2nlys7y05z76lgbg-apple-framework-Security-11.0.0/Library/Frameworks/Security.framework/Headers/SecCode.h:35:10: fatal error: 'xpc/xpc.h' file not found
       > #include <xpc/xpc.h>
       >          ^~~~~~~~~~~
       > 1 error generated.
       > redo      bin/nncp-ack (exit 2)
       > redo    bin/all (exit 1)
       > redo  install (exit 1)

@viraptor
Copy link
Contributor

Changing the entry in all-packages.nix to:

nncp = darwin.apple_sdk_11_0.callPackage ../tools/misc/nncp { };

fixes the darwin build.

@ehmry
Copy link
Contributor Author

ehmry commented Oct 31, 2022

@viraptor does 60d425b0a590cfcb8c974d79d13735b90ea97cb0 work for you?

@viraptor
Copy link
Contributor

Nope. Same issue (https://github.com/NixOS/nixpkgs/pull/198701/checks?check_run_id=9193516054)

It's not about the security framework itself, but rather weirdness with xpc which was fixed in the newer sdk.

@ehmry ehmry force-pushed the nncp branch 2 times, most recently from aa006e3 to 82d023f Compare October 31, 2022 03:14
@ehmry
Copy link
Contributor Author

ehmry commented Oct 31, 2022

Okay. I know nothing of such things.

Comment on lines +30481 to +30484
nncp = (
if stdenv.isDarwin
then darwin.apple_sdk_11_0.callPackage
else callPackage) ../tools/misc/nncp { };
Copy link
Contributor

@viraptor viraptor Oct 31, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works for all systems, but affects darwin only. It's safe to use unconditionally.

Suggested change
nncp = (
if stdenv.isDarwin
then darwin.apple_sdk_11_0.callPackage
else callPackage) ../tools/misc/nncp { };
nncp = darwin.apple_sdk_11_0.callPackage ../tools/misc/nncp { };

It's not the best solution ever 🤷 but it's necessary for some packages. (see others like _7zz or mlterm in this file)

The sdk comes from #176661 if you want the gory details.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A look at doc/stdenv/platform-notes.chapter.md and the definition of even go itself in all-packages.nix seems to confirm this. So if this fixes the darwin build and if the linux build is still fine, go for it.

Copy link
Contributor

@divanorama divanorama Nov 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry to jump in, in #200033 I was looking at a different package with same error and this didn't help

diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 51a52a44915..9d74ffcd8dd 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -16353,7 +16353,7 @@ with pkgs;
 
   bazel-remote = callPackage ../development/tools/build-managers/bazel/bazel-remote { };
 
-  bazel-watcher = callPackage ../development/tools/bazel-watcher {
+  bazel-watcher = (if stdenv.isDarwin then darwin.apple_sdk_11_0.callPackage else callPackage) ../development/tools/bazel-watcher {
     go = go_1_18;
   };

on x86_64-darwin it still gets

In file included from /nix/store/gvz6j31hm9hg44xiwb503rbv2gc1x0nw-apple-framework-Security-11.0.0/Library/Frameworks/Security.framework/Headers/Security.h:87:
/nix/store/gvz6j31hm9hg44xiwb503rbv2gc1x0nw-apple-framework-Security-11.0.0/Library/Frameworks/Security.framework/Headers/SecCode.h:35:10: fatal error: 'xpc/xpc.h' file not found
#include <xpc/xpc.h>
         ^~~~~~~~~~~
1 error generated.
compilepkg: error running subcommand external/go_sdk/pkg/tool/darwin_amd64/cgo: exit status 2
Target //ibazel:ibazel failed to build

any hints?

Copy link
Member

@SuperSandro2000 SuperSandro2000 Nov 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't have been merged like this. darwin.apple_sdk_11_0.callPackage is a noop for linux. Going to fix it up right now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I'm not using darwin and I don't want my packages fed through darwin functions.

Copy link
Member

@SuperSandro2000 SuperSandro2000 Nov 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then the apple 11 sdk usage must be removed instead. Plotting conditionals around the callPackage use is not necessary and unnecessary.

Comment on lines +30481 to +30484
nncp = (
if stdenv.isDarwin
then darwin.apple_sdk_11_0.callPackage
else callPackage) ../tools/misc/nncp { };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A look at doc/stdenv/platform-notes.chapter.md and the definition of even go itself in all-packages.nix seems to confirm this. So if this fixes the darwin build and if the linux build is still fine, go for it.

@ehmry ehmry merged commit 76b655e into NixOS:master Nov 8, 2022
@divanorama divanorama mentioned this pull request Nov 8, 2022
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants