diff --git a/pkgs/os-specific/darwin/duti/default.nix b/pkgs/os-specific/darwin/duti/default.nix index 033591c1fec357..4d2e4afb4b5591 100644 --- a/pkgs/os-specific/darwin/duti/default.nix +++ b/pkgs/os-specific/darwin/duti/default.nix @@ -1,4 +1,10 @@ -{stdenv, lib, fetchFromGitHub, autoreconfHook, ApplicationServices}: +{ + stdenv, + lib, + fetchFromGitHub, + autoreconfHook, + apple-sdk_11, +}: stdenv.mkDerivation rec { pname = "duti"; @@ -10,15 +16,14 @@ stdenv.mkDerivation rec { sha256 = "1pg4i6ghpib2gy1sqpml7dbnhr1vbr43fs2pqkd09i4w3nmgpic9"; }; - nativeBuildInputs = [autoreconfHook]; - buildInputs = [ApplicationServices]; - configureFlags = [ - "--with-macosx-sdk=/homeless-shelter" + nativeBuildInputs = [ autoreconfHook ]; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin apple-sdk_11; - # needed to prevent duti from trying to guess our sdk - # NOTE: this is different than stdenv.hostPlatform.config! - "--host=x86_64-apple-darwin18" - ]; + # needed to prevent duti from trying to guess our sdk + # NOTE: this is different than stdenv.hostPlatform.config! + configureFlags = + lib.optionals stdenv.hostPlatform.isAarch64 [ "--host=aarch64-apple-darwin18" ] + ++ lib.optionals stdenv.hostPlatform.isx86_64 [ "--host=x86_64-apple-darwin18" ]; meta = with lib; { description = "Command-line tool to select default applications for document types and URL schemes on Mac OS X"; @@ -29,7 +34,7 @@ stdenv.mkDerivation rec { a Microsoft Word document has a UTI of com.microsoft.word.doc. Using duti, the user can change which application acts as the default handler for a given UTI. ''; - maintainers = with maintainers; [matthewbauer]; + maintainers = with maintainers; [ matthewbauer ]; platforms = platforms.darwin; license = licenses.publicDomain; homepage = "https://github.com/moretension/duti/"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7b6a0bee6a3b87..eb48dfde75fb0b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19070,9 +19070,7 @@ with pkgs; compressDrvWeb = callPackage ../build-support/compress-drv/web.nix { }; - duti = callPackage ../os-specific/darwin/duti { - inherit (darwin.apple_sdk.frameworks) ApplicationServices; - }; + duti = callPackage ../os-specific/darwin/duti { }; dnstracer = callPackage ../tools/networking/dnstracer { inherit (darwin) libresolv;