darwin.openwith: init at unstable-2022-10-28
This commit is contained in:
parent
cd3c4f00f7
commit
eceae845cd
36
pkgs/os-specific/darwin/openwith/default.nix
Normal file
36
pkgs/os-specific/darwin/openwith/default.nix
Normal file
|
@ -0,0 +1,36 @@
|
|||
{ lib, stdenv, fetchFromGitHub, swift, AppKit, Foundation, UniformTypeIdentifiers }:
|
||||
|
||||
let
|
||||
arch = if stdenv.isAarch64 then "arm64" else "x86_64";
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "openwith";
|
||||
version = "unstable-2022-10-28";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jdek";
|
||||
repo = "openwith";
|
||||
rev = "a8a99ba0d1cabee7cb470994a1e2507385c30b6e";
|
||||
hash = "sha256-lysleg3qM2MndXeKjNk+Y9Tkk40urXA2ZdxY5KZNANo=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ swift ];
|
||||
|
||||
buildInputs = [ AppKit Foundation UniformTypeIdentifiers ];
|
||||
|
||||
makeFlags = [ "openwith_${arch}" ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
install openwith_${arch} -D $out/bin/openwith
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Utility to specify which application bundle should open specific file extensions";
|
||||
homepage = "https://github.com/jdek/openwith";
|
||||
license = licenses.unlicense;
|
||||
maintainers = with maintainers; [ zowoq ];
|
||||
platforms = [ "aarch64-darwin" "x86_64-darwin" ];
|
||||
};
|
||||
}
|
|
@ -170,6 +170,10 @@ impure-cmds // appleSourcePackages // chooseLibs // {
|
|||
|
||||
opencflite = callPackage ../os-specific/darwin/opencflite { };
|
||||
|
||||
openwith = pkgs.darwin.apple_sdk_11_0.callPackage ../os-specific/darwin/openwith {
|
||||
inherit (apple_sdk_11_0.frameworks) AppKit Foundation UniformTypeIdentifiers;
|
||||
};
|
||||
|
||||
stubs = pkgs.callPackages ../os-specific/darwin/stubs { };
|
||||
|
||||
trash = callPackage ../os-specific/darwin/trash { };
|
||||
|
|
Loading…
Reference in a new issue