From 2640519d63e5a8dd13ef1320a891b57d4e7fbb01 Mon Sep 17 00:00:00 2001 From: figsoda Date: Tue, 8 Jun 2021 20:05:14 -0400 Subject: [PATCH] freshfetch: fix darwin build --- pkgs/tools/misc/freshfetch/default.nix | 20 +++++++++++++++++++- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/freshfetch/default.nix b/pkgs/tools/misc/freshfetch/default.nix index 7ed33436035..b9d671f224e 100644 --- a/pkgs/tools/misc/freshfetch/default.nix +++ b/pkgs/tools/misc/freshfetch/default.nix @@ -1,4 +1,14 @@ -{ fetchFromGitHub, fetchurl, lib, rustPlatform }: +{ lib +, stdenv +, fetchFromGitHub +, fetchurl +, rustPlatform +, AppKit +, CoreFoundation +, DiskArbitration +, Foundation +, IOKit +}: rustPlatform.buildRustPackage rec { pname = "freshfetch"; @@ -22,6 +32,14 @@ rustPlatform.buildRustPackage rec { # freshfetch depends on rust nightly features RUSTC_BOOTSTRAP = 1; + buildInputs = lib.optionals stdenv.isDarwin [ + AppKit + CoreFoundation + DiskArbitration + Foundation + IOKit + ]; + meta = with lib; { description = "A fresh take on neofetch"; homepage = "https://github.com/k4rakara/freshfetch"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 453c4758ae4..64a089f2492 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4841,7 +4841,9 @@ in frescobaldi = python3Packages.callPackage ../misc/frescobaldi {}; - freshfetch = callPackage ../tools/misc/freshfetch { }; + freshfetch = callPackage ../tools/misc/freshfetch { + inherit (darwin.apple_sdk.frameworks) AppKit CoreFoundation DiskArbitration Foundation IOKit; + }; frostwire = callPackage ../applications/networking/p2p/frostwire { }; frostwire-bin = callPackage ../applications/networking/p2p/frostwire/frostwire-bin.nix { };