Skip to content

Commit fd4c550

Browse files
authored
Merge pull request #4 from karol-broda/fix/darwin-support
2 parents c95a5eb + df6fd31 commit fd4c550

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ jobs:
4444
steps:
4545
- uses: actions/checkout@v4
4646

47-
- uses: DeterminateSystems/nix-installer-action@main
47+
- uses: DeterminateSystems/nix-installer-action@v17
4848

49-
- uses: DeterminateSystems/magic-nix-cache-action@main
49+
- uses: DeterminateSystems/magic-nix-cache-action@v9
5050

5151
- name: nix flake check
5252
run: nix flake check

flake.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
description = "snitch - a friendlier ss/netstat for humans";
33

4-
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
4+
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
55

66
outputs = { self, nixpkgs }:
77
let
@@ -48,9 +48,9 @@
4848
let
4949
rev = self.shortRev or self.dirtyShortRev or "unknown";
5050
version = "nix-${rev}";
51+
isDarwin = pkgs.stdenv.isDarwin;
5152
go = mkGo125 pkgs;
5253
buildGoModule = pkgs.buildGoModule.override { inherit go; };
53-
isDarwin = pkgs.stdenv.isDarwin;
5454
in
5555
buildGoModule {
5656
pname = "snitch";
@@ -60,9 +60,8 @@
6060
# darwin requires cgo for libproc, linux uses pure go with /proc
6161
env.CGO_ENABLED = if isDarwin then "1" else "0";
6262
env.GOTOOLCHAIN = "local";
63-
# go 1.25 crypto/x509 uses SecTrustCopyCertificateChain (macOS 12+)
64-
env.MACOSX_DEPLOYMENT_TARGET = pkgs.lib.optionalString isDarwin "12.0";
65-
# nixpkgs 25.05+ uses system SDK directly, no explicit framework buildInputs needed
63+
# darwin: use macOS 15 SDK for SecTrustCopyCertificateChain (Go 1.25 crypto/x509)
64+
buildInputs = pkgs.lib.optionals isDarwin [ pkgs.apple-sdk_15 ];
6665
ldflags = [
6766
"-s"
6867
"-w"

0 commit comments

Comments
 (0)