Skip to content

Commit

Permalink
duti: update to new darwin SDK pattern
Browse files Browse the repository at this point in the history
Signed-off-by: Nicholas Hassan <[email protected]>
  • Loading branch information
n-hass committed Nov 23, 2024
1 parent 7eb0c19 commit 928f763
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
28 changes: 18 additions & 10 deletions pkgs/os-specific/darwin/duti/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{stdenv, lib, fetchFromGitHub, autoreconfHook, ApplicationServices}:
{
stdenv,
lib,
fetchFromGitHub,
autoreconfHook,
}:

stdenv.mkDerivation rec {
pname = "duti";
Expand All @@ -10,15 +15,15 @@ stdenv.mkDerivation rec {
sha256 = "1pg4i6ghpib2gy1sqpml7dbnhr1vbr43fs2pqkd09i4w3nmgpic9";
};

nativeBuildInputs = [autoreconfHook];
buildInputs = [ApplicationServices];
configureFlags = [
"--with-macosx-sdk=/homeless-shelter"
nativeBuildInputs = [ autoreconfHook ];

# needed to prevent duti from trying to guess our sdk
# NOTE: this is different than stdenv.hostPlatform.config!
"--host=x86_64-apple-darwin18"
];
preConfigure = ''
configureFlagsArray+=(
"--with-macosx-sdk=$SDKROOT"
"--with-macosx-deployment-target=$MACOSX_DEPLOYMENT_TARGET"
"--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";
Expand All @@ -29,7 +34,10 @@ 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 n-hass];
maintainers = with maintainers; [
matthewbauer
n-hass
];
platforms = platforms.darwin;
license = licenses.publicDomain;
homepage = "https://github.com/moretension/duti/";
Expand Down
4 changes: 1 addition & 3 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19010,9 +19010,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;
Expand Down

0 comments on commit 928f763

Please sign in to comment.