21 Oct 2024 |
emily | for macOS, right? | 21:16:38 |
emily | perhaps https://github.com/nixie-dev/nixie, which I saw recently because it pinged the Darwin SDK rework PR. | 21:17:14 |
emily | In reply to @emilazy:matrix.org oh maybe libplacebo needs a newer SDK it's not that. this might be annoying. | 21:19:38 |
WeetHet | In reply to @emilazy:matrix.org perhaps https://github.com/nixie-dev/nixie, which I saw recently because it pinged the Darwin SDK rework PR. Yes, exactly, thanks! I stumbled upon that one day and forgot to save it anywhere | 21:20:47 |
emily | In reply to @reckenrode:matrix.org I have a workaround/hack for VS Code in my configs. I wonder if it can be generalized or if there is a pattern that can be used to better support copying. (what is it?) | 21:27:31 |
samasaur | I have a program that runs as a launch agent. I have it defined as a home-manager module, but every time I restart my computer it fails to run. I know the root cause is that the Nix store isn't mounted in time and that the solution is to use /bin/wait4path , but I also know that doing so will make the agent show up in System Settings as sh instead of the binary name (the current behavior) or an actual descriptive name (the ideal behavior). Does anyone know of a way to get useful information into System Settings for launch agents with Nix? | 22:10:34 |
samasaur | I suspect the answer is that it needs to be a launch agent bundled with a properly signed app, which may mean I'm SOL | 22:11:09 |
Randy Eckenrode | Nice descriptions require the launch agent to be in an app bundle. 🫤 | 22:11:11 |
samasaur | drat | 22:11:20 |
emily | doesn't have to be signed | 22:12:18 |
emily | we should merge a bundling thing happen in nix-darwin | 22:12:31 |
samasaur | but even if it were bundled, it would have to be copied out of the store, right? because we're really executing sh so that we can wait4path on the store | 22:14:08 |
samasaur | * but even if it were bundled, it would have to be copied out of the store, right? because we're really executing sh so that we can wait4path on the store? | 22:14:09 |
Randy Eckenrode | In reply to @emilazy:matrix.org (what is it?) https://github.com/reckenrode/nixos-configs/blob/03f15080f5ae7690631d892ad1ac61583ab8e412/common/darwin/home-manager/vscode.nix | 22:14:15 |
Randy Eckenrode | In reply to @samasaur:matrix.org but even if it were bundled, it would have to be copied out of the store, right? because we're really executing sh so that we can wait4path on the store? Having nix-darwin manage an /Applications/Nix Darwin Agents seems reasonable if it results in nicer-ish integration with System Settings (and the equivalent in Home Manager). | 22:15:20 |
Randy Eckenrode | These would be our bundles, so we can make them shells or whatever that references the store as long as that plays nicely with the rest of the integration. | 22:16:05 |
samasaur | that would be really nice | 22:16:22 |
Randy Eckenrode | I tried to make one manually though. It didn’t seem to work. | 22:16:35 |
Randy Eckenrode | I was trying to go by the documentation, which isn’t very good. I didn’t try creating a project in Xcode and using that as a template for my manual attempt. | 22:17:17 |
samasaur | The only things I remember hearing about it was that it had to be an app extension to an existing app. I could be (and hope I am) wrong, though | 22:19:11 |
Randy Eckenrode | I assume we’d create a bundle for the extension like (for example) OpenSSH Service.app that has the agents and shows up sensibly in the login items section of System Settings. | 22:20:22 |
samasaur | okay i just read through some of the docs | 22:48:00 |
samasaur | https://developer.apple.com/documentation/servicemanagement/updating-helper-executables-from-earlier-versions-of-macos#Connect-services-to-app-names-in-System-Settings | 22:48:53 |
samasaur | this might be possible to at least get agents not showing up as sh | 22:49:14 |
samasaur | we could have one stub Nix Darwin.app bundle and use the AssociatedBundleIdentifiers to make all nix-darwin installed agents and daemons show up with that as the name | 22:49:44 |
samasaur | (if i'm reading this right) | 22:49:55 |
Randy Eckenrode | Woo, all the CLI tests pass with rcodesign . Thanks antifuchs! This is what fixed it:
diff --git a/apple-codesign/src/cli/mod.rs b/apple-codesign/src/cli/mod.rs
index 53e9649271..82d4d061a6 100644
--- a/apple-codesign/src/cli/mod.rs
+++ b/apple-codesign/src/cli/mod.rs
@@ -2499,9 +2499,11 @@
_ => LevelFilter::Trace,
};
- let mut builder = env_logger::Builder::from_env(
- env_logger::Env::default().default_filter_or(log_level.as_str()),
- );
+ let mut builder = env_logger::Builder::new();
+
+ builder
+ .filter_level(log_level)
+ .parse_default_env();
// Disable log context except at higher log levels.
if log_level <= LevelFilter::Info {
| 23:03:57 |
Randy Eckenrode | Only one test fails, probably because it requires network access. | 23:04:08 |
antifuchs | Awesome, this looks way more reasonable I think | 23:08:12 |
22 Oct 2024 |
samasaur | In reply to @samasaur:matrix.org we could have one stub Nix Darwin.app bundle and use the AssociatedBundleIdentifiers to make all nix-darwin installed agents and daemons show up with that as the name okay this would not work because the executable needs to have the same team ID as the associated app and the executable would still be /bin/sh | 00:26:48 |