-
Notifications
You must be signed in to change notification settings - Fork 16
/
flake.nix
48 lines (46 loc) · 1.39 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
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
devPackages = [
(pkgs.bats.withLibraries (p: [ p.bats-support p.bats-assert ]))
pkgs.watchexec
];
plugin = pkgs.tmuxPlugins.mkTmuxPlugin {
pluginName = "session-wizard";
rtpFilePath = "session-wizard.tmux";
version = "unstable";
src = self;
nativeBuildInputs = [ pkgs.makeWrapper ];
postInstall = ''
ls -al $target && \
substituteInPlace $target/session-wizard.tmux \
--replace \$CURRENT_DIR/bin/t $target/bin/t
wrapProgram $target/bin/t \
--prefix PATH : ${with pkgs; lib.makeBinPath ([ fzf zoxide coreutils gnugrep gnused ])}
'';
};
in
{
packages.dev = (pkgs.symlinkJoin
{
name = "dev-environment";
paths = [
plugin
plugin.buildInputs
pkgs.tmux
pkgs.bashInteractive
pkgs.busybox
] ++ devPackages;
});
devShell = pkgs.mkShell {
buildInputs = devPackages;
};
}
);
}