nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 fetchzip,
3 gitUpdater,
4 installShellFiles,
5 lib,
6 stdenv,
7 versionCheckHook,
8}:
9
10let
11 appName = "AeroSpace.app";
12 version = "0.20.2-Beta";
13in
14stdenv.mkDerivation {
15 pname = "aerospace";
16
17 inherit version;
18
19 src = fetchzip {
20 url = "https://github.com/nikitabobko/AeroSpace/releases/download/v${version}/AeroSpace-v${version}.zip";
21 sha256 = "sha256-PyWHtM38XPNkkEZ0kACPia0doR46FRpmSoNdsOhU4uw=";
22 };
23
24 nativeBuildInputs = [ installShellFiles ];
25
26 installPhase = ''
27 runHook preInstall
28 mkdir -p $out/Applications
29 mv ${appName} $out/Applications
30 cp -R bin $out
31 mkdir -p $out/share
32 runHook postInstall
33 '';
34
35 postInstall = ''
36 installManPage manpage/*
37 installShellCompletion --bash shell-completion/bash/aerospace
38 installShellCompletion --fish shell-completion/fish/aerospace.fish
39 installShellCompletion --zsh shell-completion/zsh/_aerospace
40 '';
41
42 doInstallCheck = true;
43 nativeInstallCheckInputs = [
44 versionCheckHook
45 ];
46
47 passthru.updateScript = gitUpdater {
48 url = "https://github.com/nikitabobko/AeroSpace.git";
49 rev-prefix = "v";
50 };
51
52 meta = {
53 license = lib.licenses.mit;
54 mainProgram = "aerospace";
55 homepage = "https://github.com/nikitabobko/AeroSpace";
56 description = "i3-like tiling window manager for macOS";
57 platforms = lib.platforms.darwin;
58 maintainers = with lib.maintainers; [ alexandru0-dev ];
59 sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
60 };
61}