!lheuhImcToQZYTQTuI:nixos.org

Nix on macOS

952 Members
“There are still many issues with the Darwin platform but most of it is quite usable.” — http://yves.gnu-darwin.org155 Servers

Load older messages


SenderMessageTime
21 Oct 2024
@emilazy:matrix.orgemilyfor macOS, right?21:16:38
@emilazy:matrix.orgemilyperhaps https://github.com/nixie-dev/nixie, which I saw recently because it pinged the Darwin SDK rework PR.21:17:14
@emilazy:matrix.orgemily
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:catgirl.cloudWeetHet
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
@emilazy:matrix.orgemily
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:matrix.orgsamasaur 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:matrix.orgsamasaurI suspect the answer is that it needs to be a launch agent bundled with a properly signed app, which may mean I'm SOL22:11:09
@reckenrode:matrix.orgRandy EckenrodeNice descriptions require the launch agent to be in an app bundle. 🫤22:11:11
@samasaur:matrix.orgsamasaurdrat22:11:20
@emilazy:matrix.orgemilydoesn't have to be signed22:12:18
@emilazy:matrix.orgemilywe should merge a bundling thing happen in nix-darwin22:12:31
@samasaur:matrix.orgsamasaur 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:matrix.orgsamasaur * 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
@reckenrode:matrix.orgRandy 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
@reckenrode:matrix.orgRandy 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
@reckenrode:matrix.orgRandy EckenrodeThese 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:matrix.orgsamasaurthat would be really nice22:16:22
@reckenrode:matrix.orgRandy EckenrodeI tried to make one manually though. It didn’t seem to work.22:16:35
@reckenrode:matrix.orgRandy EckenrodeI 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:matrix.orgsamasaurThe 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, though22:19:11
@reckenrode:matrix.orgRandy 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:matrix.orgsamasaurokay i just read through some of the docs22:48:00
@samasaur:matrix.orgsamasaurhttps://developer.apple.com/documentation/servicemanagement/updating-helper-executables-from-earlier-versions-of-macos#Connect-services-to-app-names-in-System-Settings22:48:53
@samasaur:matrix.orgsamasaur this might be possible to at least get agents not showing up as sh 22:49:14
@samasaur:matrix.orgsamasaur 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:matrix.orgsamasaur(if i'm reading this right)22:49:55
@reckenrode:matrix.orgRandy 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
@reckenrode:matrix.orgRandy EckenrodeOnly one test fails, probably because it requires network access.23:04:08
@antifuchs:asf.computerantifuchsAwesome, this looks way more reasonable I think23:08:12
22 Oct 2024
@samasaur:matrix.orgsamasaur
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

There are no newer messages yet.


Back to Room ListRoom Version: 6