picocrypt{,-ng}: fix build on darwin

This commit is contained in:
Ryan Omasta
2026-07-11 14:45:13 -06:00
parent 9ccbbb9c9a
commit 53bd18aca0
2 changed files with 22 additions and 4 deletions
+11 -2
View File
@@ -12,6 +12,7 @@
pkg-config,
wrapGAppsHook3,
writableTmpDirAsHomeHook,
llvmPackages,
}:
buildGoModule (finalAttrs: {
@@ -49,7 +50,9 @@ buildGoModule (finalAttrs: {
pkg-config
wrapGAppsHook3
writableTmpDirAsHomeHook
];
]
# TODO: Remove once #536365 reaches this branch
++ lib.optional stdenv.hostPlatform.isDarwin llvmPackages.lld;
# git ls-files doesn't work as source is not a git repo
checkFlags =
@@ -61,7 +64,13 @@ buildGoModule (finalAttrs: {
in
[ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ];
env.CGO_ENABLED = 1;
env = {
CGO_ENABLED = 1;
}
// lib.optionalAttrs stdenv.hostPlatform.isDarwin {
# TODO: Remove once #536365 reaches this branch
NIX_CFLAGS_LINK = "-fuse-ld=lld";
};
postInstall = ''
mv $out/bin/picocrypt $out/bin/picocrypt-ng-gui
+11 -2
View File
@@ -11,6 +11,7 @@
gtk3,
pkg-config,
wrapGAppsHook3,
llvmPackages,
}:
buildGoModule (finalAttrs: {
@@ -46,9 +47,17 @@ buildGoModule (finalAttrs: {
copyDesktopItems
pkg-config
wrapGAppsHook3
];
]
# TODO: Remove once #536365 reaches this branch
++ lib.optional stdenv.hostPlatform.isDarwin llvmPackages.lld;
env.CGO_ENABLED = 1;
env = {
CGO_ENABLED = 1;
}
// lib.optionalAttrs stdenv.hostPlatform.isDarwin {
# TODO: Remove once #536365 reaches this branch
NIX_CFLAGS_LINK = "-fuse-ld=lld";
};
postInstall = ''
mv $out/bin/Picocrypt $out/bin/picocrypt-gui