From b80a8e34c7cd6e6432d4567d2fad1f22fbf354b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanis=C5=82aw=20Pitucha?= Date: Mon, 17 Oct 2022 21:26:56 +1100 Subject: [PATCH] fondu: fix darwin build --- pkgs/tools/misc/fondu/default.nix | 8 +++++++- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/fondu/default.nix b/pkgs/tools/misc/fondu/default.nix index 092d33b2e819..9435d0487b76 100644 --- a/pkgs/tools/misc/fondu/default.nix +++ b/pkgs/tools/misc/fondu/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl }: +{ lib, stdenv, fetchurl, CoreServices }: stdenv.mkDerivation rec { version = "060102"; @@ -9,6 +9,12 @@ stdenv.mkDerivation rec { sha256 = "152prqad9jszjmm4wwqrq83zk13ypsz09n02nrk1gg0fcxfm7fr2"; }; + postConfigure = lib.optionalString stdenv.isDarwin '' + substituteInPlace Makefile --replace /System/Library/Frameworks/CoreServices.framework/CoreServices "-framework CoreServices" + ''; + + buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ]; + makeFlags = [ "DESTDIR=$(out)" ]; hardeningDisable = [ "fortify" ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ac51b9fcc46b..5e052e009ed6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4003,7 +4003,9 @@ with pkgs; jdk = openjdk8; }; - fondu = callPackage ../tools/misc/fondu { }; + fondu = callPackage ../tools/misc/fondu { + inherit (darwin.apple_sdk.frameworks) CoreServices; + }; fpp = callPackage ../tools/misc/fpp { };