Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[24.11] duti: update to new darwin SDK pattern and add n-hass maintainer #358321

Open
wants to merge 2 commits into
base: release-24.11
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15560,6 +15560,13 @@
githubId = 399535;
name = "Niklas Hambüchen";
};
n-hass = {
email = "[email protected]";
github = "n-hass";
githubId = 72363381;
name = "n-hass";
keys = [ { fingerprint = "FDEE 6116 DBA7 8840 7323 4466 A371 5973 2728 A6A6"; } ];
};
nhnn = {
matrix = "@nhnn:nhnn.dev";
github = "thenhnn";
Expand Down
31 changes: 31 additions & 0 deletions pkgs/os-specific/darwin/duti/buildConfigure.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
diff --git a/Makefile.in b/Makefile.in
index d5c9fda..a596462 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -14,10 +14,7 @@ DUTI_BUILD_DATE=@build_date@

CC= @CC@
FRAMEWORKS= -framework ApplicationServices -framework CoreFoundation
-OPTOPTS= -isysroot @macosx_sdk@ \
- @macosx_arches@ \
- -mmacosx-version-min=@macosx_dep_target@ \
- @OPTOPTS@
+OPTOPTS= @OPTOPTS@

LIBS= @LIBS@
LDFLAGS= @LDFLAGS@ ${LIBS}
diff --git a/configure.ac b/configure.ac
index 815f395..05caaed 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,8 +15,8 @@ AC_PROG_CC
AC_PROG_INSTALL

AC_CANONICAL_SYSTEM
-DUTI_CHECK_SDK
-DUTI_CHECK_DEPLOYMENT_TARGET
+#DUTI_CHECK_SDK
+#DUTI_CHECK_DEPLOYMENT_TARGET

# function checks
AC_CHECK_FUNC(strlcpy,have_strlcpy=yes,)
24 changes: 14 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,16 +15,12 @@ stdenv.mkDerivation rec {
sha256 = "1pg4i6ghpib2gy1sqpml7dbnhr1vbr43fs2pqkd09i4w3nmgpic9";
};

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

# needed to prevent duti from trying to guess our sdk
# NOTE: this is different than stdenv.hostPlatform.config!
"--host=x86_64-apple-darwin18"
patches = [
./buildConfigure.patch
];

nativeBuildInputs = [ autoreconfHook ];

meta = with lib; {
description = "Command-line tool to select default applications for document types and URL schemes on Mac OS X";
longDescription = ''
Expand All @@ -29,7 +30,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];
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 @@ -19100,9 +19100,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
Loading