nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 42 lines 970 B view raw
1{ 2 lib, 3 swiftPackages, 4 fetchFromGitHub, 5}: 6 7let 8 inherit (swiftPackages) stdenv swift; 9 arch = if stdenv.hostPlatform.isAarch64 then "arm64" else "x86_64"; 10in 11stdenv.mkDerivation { 12 pname = "openwith"; 13 version = "unstable-2022-10-28"; 14 15 src = fetchFromGitHub { 16 owner = "jdek"; 17 repo = "openwith"; 18 rev = "a8a99ba0d1cabee7cb470994a1e2507385c30b6e"; 19 hash = "sha256-lysleg3qM2MndXeKjNk+Y9Tkk40urXA2ZdxY5KZNANo="; 20 }; 21 22 nativeBuildInputs = [ swift ]; 23 24 makeFlags = [ "openwith_${arch}" ]; 25 26 installPhase = '' 27 runHook preInstall 28 install openwith_${arch} -D $out/bin/openwith 29 runHook postInstall 30 ''; 31 32 meta = with lib; { 33 description = "Utility to specify which application bundle should open specific file extensions"; 34 homepage = "https://github.com/jdek/openwith"; 35 license = licenses.unlicense; 36 maintainers = with maintainers; [ zowoq ]; 37 platforms = [ 38 "aarch64-darwin" 39 "x86_64-darwin" 40 ]; 41 }; 42}