1 { lib, swiftPackages, fetchFromGitHub }:
4 inherit (swiftPackages) apple_sdk stdenv swift;
5 arch = if stdenv.hostPlatform.isAarch64 then "arm64" else "x86_64";
7 stdenv.mkDerivation rec {
9 version = "unstable-2022-10-28";
11 src = fetchFromGitHub {
14 rev = "a8a99ba0d1cabee7cb470994a1e2507385c30b6e";
15 hash = "sha256-lysleg3qM2MndXeKjNk+Y9Tkk40urXA2ZdxY5KZNANo=";
18 nativeBuildInputs = [ swift ];
20 buildInputs = with apple_sdk.frameworks; [ AppKit Foundation UniformTypeIdentifiers ];
22 makeFlags = [ "openwith_${arch}" ];
26 install openwith_${arch} -D $out/bin/openwith
31 description = "Utility to specify which application bundle should open specific file extensions";
32 homepage = "https://github.com/jdek/openwith";
33 license = licenses.unlicense;
34 maintainers = with maintainers; [ zowoq ];
35 platforms = [ "aarch64-darwin" "x86_64-darwin" ];