about summary refs log tree commit diff
path: root/pkgs/by-name/ja/jankyborders/package.nix
blob: 1f1e06697aa6bf4f34c04692d1daac6b1d5f2bd8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
{ lib
, fetchFromGitHub
, pkg-config
, pkgs
, overrideSDK
, darwin
, testers
, nix-update-script
}:
let
  stdenv = overrideSDK pkgs.stdenv "11.0";
in
stdenv.mkDerivation (finalAttrs: {
  pname = "JankyBorders";
  version = "1.6.0";

  src = fetchFromGitHub {
    owner = "FelixKratz";
    repo = "JankyBorders";
    rev = "v${finalAttrs.version}";
    hash = "sha256-DX1d228UCOI+JU+RxenhiGyn3AiqpsGe0aCtr091szs=";
  };

  nativeBuildInputs = [
    pkg-config
  ];

  buildInputs = with darwin.apple_sdk.frameworks; [
    AppKit
    ApplicationServices
    CoreFoundation
    CoreGraphics
    SkyLight
  ];

  installPhase = ''
    runHook preInstall

    mkdir -p $out/bin
    cp ./bin/borders $out/bin/borders

    runHook postInstall
  '';

  passthru = {
    tests.version = testers.testVersion {
      package = finalAttrs.finalPackage;
      version = "borders-v${finalAttrs.version}";
    };

    updateScript = nix-update-script { };
  };

  meta = {
    description = "JankyBorders is a lightweight tool designed to add colored borders to user windows on macOS 14.0+";
    longDescription = "It enhances the user experience by visually highlighting the currently focused window without relying on the accessibility API, thereby being faster than comparable tools.";
    homepage = "https://github.com/FelixKratz/JankyBorders";
    license = lib.licenses.gpl3;
    mainProgram = "borders";
    maintainers = with lib.maintainers; [ khaneliman ];
    platforms = lib.platforms.darwin;
  };
})