Unverified Commit a47b7965 authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

autokbisw: init at 2.0.1 (#390096)

parents 53c96175 c6ade62f
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -5020,6 +5020,12 @@
    githubId = 6470493;
    name = "Craige McWhirter";
  };
  craigf = {
    email = "craig@craigfurman.dev";
    github = "craigfurman";
    githubId = 4772216;
    name = "Craig Furman";
  };
  cransom = {
    email = "cransom@hubns.net";
    github = "cransom";
+7 −0
Original line number Diff line number Diff line
# This file was generated by swiftpm2nix.
{
  workspaceStateFile = ./workspace-state.json;
  hashes = {
    "swift-argument-parser" = "sha256-FSIi4jDX7R35jDHkKzQFJLl4K0Hdx9UWgwxJbHVpsYU=";
  };
}
+25 −0
Original line number Diff line number Diff line
{
  "object": {
    "artifacts": [],
    "dependencies": [
      {
        "basedOn": null,
        "packageRef": {
          "identity": "swift-argument-parser",
          "kind": "remoteSourceControl",
          "location": "https://github.com/apple/swift-argument-parser",
          "name": "swift-argument-parser"
        },
        "state": {
          "checkoutState": {
            "revision": "e1465042f195f374b94f915ba8ca49de24300a0d",
            "version": "1.0.2"
          },
          "name": "sourceControlCheckout"
        },
        "subpath": "swift-argument-parser"
      }
    ]
  },
  "version": 6
}
+45 −0
Original line number Diff line number Diff line
{
  fetchFromGitHub,
  lib,
  swift,
  swiftPackages,
  swiftpm,
  swiftpm2nix,
}:
let
  # Nix dir generated by running `swiftpm2nix` in the upstream project
  generated = swiftpm2nix.helpers ./nix;
in
swiftPackages.stdenv.mkDerivation rec {
  pname = "autokbisw";
  version = "2.0.1";
  src = fetchFromGitHub {
    owner = "ohueter";
    repo = "autokbisw";
    tag = version;
    hash = "sha256-xNXXgDLWW8pdik3STmhpZATf9REd+8IGeoX/oxGg4vc=";
  };
  nativeBuildInputs = [
    swift
    swiftpm
  ];
  configurePhase = generated.configure;
  installPhase = ''
    runHook preInstall

    mkdir -p $out/bin
    cp $(swiftpmBinPath)/autokbisw $out/bin/

    runHook postInstall
  '';

  meta = {
    description = "Automatic keyboard input language switching for macOS";
    homepage = "https://github.com/ohueter/autokbisw";
    changelog = "https://github.com/ohueter/autokbisw/releases/tag/${version}";
    license = lib.licenses.asl20;
    mainProgram = "autokbisw";
    maintainers = with lib.maintainers; [ craigf ];
    platforms = lib.platforms.darwin;
  };
}