-
Notifications
You must be signed in to change notification settings - Fork 86
Expand file tree
/
Copy pathflake.nix
More file actions
34 lines (32 loc) · 1.15 KB
/
flake.nix
File metadata and controls
34 lines (32 loc) · 1.15 KB
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
{
description = "Parallel development in tmux with git worktrees";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
outputs = { self, nixpkgs }:
let
forAllSystems = f: nixpkgs.lib.genAttrs
[ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]
(system: f nixpkgs.legacyPackages.${system});
in {
packages = forAllSystems (pkgs: {
default = pkgs.rustPlatform.buildRustPackage {
pname = "workmux";
version = self.shortRev or self.dirtyShortRev or "dev";
src = ./.;
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"crossterm-0.29.0" = "sha256-rfAaqGylDaxx3bjmofifnzSh7Hmh21BzHp5fS/w2Z6I=";
};
};
nativeBuildInputs = [ pkgs.installShellFiles pkgs.git ];
postInstall = ''
export HOME=$TMPDIR
installShellCompletion --cmd workmux \
--bash <($out/bin/workmux completions bash) \
--fish <($out/bin/workmux completions fish) \
--zsh <($out/bin/workmux completions zsh)
'';
};
});
};
}