2021-12-08 18:21:15 -05:00
|
|
|
{
|
|
|
|
description = "Manage tmux for what you work on.";
|
|
|
|
|
|
|
|
inputs = {
|
2022-06-07 21:29:21 -04:00
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/release-22.05";
|
2021-12-08 18:21:15 -05:00
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
2022-06-27 19:30:40 -04:00
|
|
|
flake-compat = {
|
|
|
|
url = "github:edolstra/flake-compat";
|
|
|
|
flake = false;
|
|
|
|
};
|
2021-12-08 18:21:15 -05:00
|
|
|
};
|
|
|
|
|
2022-06-27 19:30:40 -04:00
|
|
|
outputs = { self, nixpkgs, flake-utils, ... }:
|
2021-12-08 18:21:15 -05:00
|
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
|
|
let pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
in
|
|
|
|
{
|
|
|
|
packages.workon = pkgs.buildGoModule {
|
2022-06-27 19:30:40 -04:00
|
|
|
pname = "workon";
|
2022-11-02 14:04:33 -04:00
|
|
|
version = "0.2.1";
|
2022-06-27 19:30:40 -04:00
|
|
|
src = ./.;
|
2022-06-07 21:29:21 -04:00
|
|
|
vendorSha256 = "sha256-ia0Z9yz2LrRAd9huncFtl/a6R3/gRpqbg6TdnauvEmQ=";
|
2022-10-27 20:14:59 -04:00
|
|
|
nativeBuildInputs = with pkgs; [
|
|
|
|
tmux
|
|
|
|
installShellFiles
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
for shell in bash fish zsh; do
|
|
|
|
$out/bin/workon completion $shell > workon.$shell
|
|
|
|
installShellCompletion --$shell workon.$shell
|
|
|
|
done
|
|
|
|
'';
|
2021-12-08 18:21:15 -05:00
|
|
|
};
|
|
|
|
|
2022-10-27 20:14:59 -04:00
|
|
|
packages.default = self.packages.${system}.workon;
|
2021-12-08 18:21:15 -05:00
|
|
|
|
2022-10-27 20:14:59 -04:00
|
|
|
devShells.default = pkgs.mkShell {
|
2021-12-08 18:21:15 -05:00
|
|
|
name = "workon";
|
2022-05-17 22:03:31 -04:00
|
|
|
buildInputs = with pkgs; [ go gopls ];
|
2021-12-08 18:21:15 -05:00
|
|
|
};
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|