diff options
| author | Pol Dellaiera <pol.dellaiera@protonmail.com> | 2023-07-31 09:43:40 +0200 |
|---|---|---|
| committer | Pol Dellaiera <pol.dellaiera@protonmail.com> | 2023-07-31 09:43:40 +0200 |
| commit | c1d8ad53ece0a509091529f1f89cc4c2ae67bc94 (patch) | |
| tree | bf1bbe20678b57889861802c2aac0cb7eddaf284 | |
| parent | sketchybar: 2.15.1 -> 2.15.2 (diff) | |
| download | nixpkgs-c1d8ad53ece0a509091529f1f89cc4c2ae67bc94.tar.gz | |
sketchybar: use `finalAttrs` pattern
| -rw-r--r-- | pkgs/os-specific/darwin/sketchybar/default.nix | 42 |
1 files changed, 30 insertions, 12 deletions
diff --git a/pkgs/os-specific/darwin/sketchybar/default.nix b/pkgs/os-specific/darwin/sketchybar/default.nix index b71528e138b1..b27390608a28 100644 --- a/pkgs/os-specific/darwin/sketchybar/default.nix +++ b/pkgs/os-specific/darwin/sketchybar/default.nix @@ -1,4 +1,13 @@ -{ lib, stdenv, fetchFromGitHub, Carbon, Cocoa, CoreWLAN, DisplayServices, MediaRemote, SkyLight }: +{ lib +, stdenv +, fetchFromGitHub +, Carbon +, Cocoa +, CoreWLAN +, DisplayServices +, MediaRemote +, SkyLight +}: let inherit (stdenv.hostPlatform) system; @@ -7,35 +16,44 @@ let "x86_64-darwin" = "x86"; }.${system} or (throw "Unsupported system: ${system}"); in - -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "sketchybar"; version = "2.15.2"; src = fetchFromGitHub { owner = "FelixKratz"; repo = "SketchyBar"; - rev = "v${version}"; - hash = "sha256-13wc+1IgplB+L0j1AbBr/MUjEo4W38ZgJwrAhbdOroE= -"; + rev = "v${finalAttrs.version}"; + hash = "sha256-13wc+1IgplB+L0j1AbBr/MUjEo4W38ZgJwrAhbdOroE="; }; - buildInputs = [ Carbon Cocoa CoreWLAN DisplayServices MediaRemote SkyLight ]; + buildInputs = [ + Carbon + Cocoa + CoreWLAN + DisplayServices + MediaRemote + SkyLight + ]; makeFlags = [ target ]; installPhase = '' + runHook preInstall + mkdir -p $out/bin cp ./bin/sketchybar $out/bin/sketchybar + + runHook postInstall ''; - meta = with lib; { + meta = { description = "A highly customizable macOS status bar replacement"; homepage = "https://github.com/FelixKratz/SketchyBar"; - platforms = platforms.darwin; - maintainers = with maintainers; [ azuwis khaneliman ]; - license = licenses.gpl3; + license = lib.licenses.gpl3; + maintainers = with lib.maintainers; [ azuwis khaneliman ]; + platforms = lib.platforms.darwin; }; -} +}) |
