-
-
Notifications
You must be signed in to change notification settings - Fork 50
/
flake.nix
54 lines (47 loc) · 1.68 KB
/
flake.nix
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
{
description = "A minimal status bar for macOS";
inputs.nixpkgs.url = github:NixOS/nixpkgs/21.11;
inputs.flake-utils.url = github:numtide/flake-utils;
outputs = { self, nixpkgs, flake-utils }:
{
overlay = final: prev: { inherit (self.packages.${final.system}) spacebar; };
}
// flake-utils.lib.eachSystem [ "aarch64-darwin" "x86_64-darwin" ] (system:
let pkgs = nixpkgs.legacyPackages.${system}; in
rec {
packages = flake-utils.lib.flattenTree {
spacebar = pkgs.stdenv.mkDerivation rec {
pname = "spacebar";
version = "1.4.0";
src = self;
buildInputs = with pkgs.darwin.apple_sdk.frameworks; [
Carbon
Cocoa
ScriptingBridge
SkyLight
];
installPhase = ''
mkdir -p $out/bin
mkdir -p $out/share/man/man1/
cp ./bin/spacebar $out/bin/spacebar
cp ./doc/spacebar.1 $out/share/man/man1/spacebar.1
'';
meta = with pkgs.lib; {
description = "A minimal status bar for macOS";
homepage = "https://github.com/cmacrae/spacebar";
platforms = platforms.darwin;
maintainers = [ maintainers.cmacrae ];
license = licenses.mit;
};
};
};
defaultPackage = packages.spacebar;
apps.spacebar = flake-utils.lib.mkApp { drv = packages.spacebar; };
defaultApp = apps.spacebar;
devShell = pkgs.mkShell {
name = "spacebar";
inputsFrom = [ packages.spacebar ];
buildInputs = [ pkgs.asciidoctor ];
};
});
}