From 8c7bd519adccf2feb7f8ea022909ee3126458b06 Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Fri, 28 Nov 2025 20:15:56 +1000 Subject: [PATCH] openwith: move to by-name, use darwinArch --- .../default.nix => by-name/op/openwith/package.nix} | 6 +++--- pkgs/top-level/darwin-aliases.nix | 1 + pkgs/top-level/darwin-packages.nix | 2 -- 3 files changed, 4 insertions(+), 5 deletions(-) rename pkgs/{os-specific/darwin/openwith/default.nix => by-name/op/openwith/package.nix} (83%) diff --git a/pkgs/os-specific/darwin/openwith/default.nix b/pkgs/by-name/op/openwith/package.nix similarity index 83% rename from pkgs/os-specific/darwin/openwith/default.nix rename to pkgs/by-name/op/openwith/package.nix index e0b559af2836..ef5ffa15875f 100644 --- a/pkgs/os-specific/darwin/openwith/default.nix +++ b/pkgs/by-name/op/openwith/package.nix @@ -6,7 +6,7 @@ let inherit (swiftPackages) stdenv swift; - arch = if stdenv.hostPlatform.isAarch64 then "arm64" else "x86_64"; + inherit (stdenv.hostPlatform) darwinArch; in stdenv.mkDerivation { pname = "openwith"; @@ -21,11 +21,11 @@ stdenv.mkDerivation { nativeBuildInputs = [ swift ]; - makeFlags = [ "openwith_${arch}" ]; + makeFlags = [ "openwith_${darwinArch}" ]; installPhase = '' runHook preInstall - install openwith_${arch} -D $out/bin/openwith + install openwith_${darwinArch} -D $out/bin/openwith runHook postInstall ''; diff --git a/pkgs/top-level/darwin-aliases.nix b/pkgs/top-level/darwin-aliases.nix index cb0f6d7c6d47..2d4608cc2201 100644 --- a/pkgs/top-level/darwin-aliases.nix +++ b/pkgs/top-level/darwin-aliases.nix @@ -138,6 +138,7 @@ stubs ### O ### opencflite = pkgs.opencflite; # added 2024-05-02 + openwith = pkgs.openwith; # added 2025-11-28 ### P ### postLinkSignHook = throw "'darwin.postLinkSignHook' has been removed because it is obsolete"; # added 2025-02-23 diff --git a/pkgs/top-level/darwin-packages.nix b/pkgs/top-level/darwin-packages.nix index 39e6be57b96d..3bf0437b183f 100644 --- a/pkgs/top-level/darwin-packages.nix +++ b/pkgs/top-level/darwin-packages.nix @@ -116,8 +116,6 @@ makeScopeWithSplicing' { lsusb = callPackage ../os-specific/darwin/lsusb { }; - openwith = callPackage ../os-specific/darwin/openwith { }; - trash = callPackage ../os-specific/darwin/trash { }; inherit (self.file_cmds) xattr;