2021-12-08 18:21:15 -05:00
|
|
|
{
|
|
|
|
description = "Manage tmux for what you work on.";
|
|
|
|
|
|
|
|
inputs = {
|
2024-12-14 22:49:59 -05:00
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
|
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
|
|
|
};
|
|
|
|
|
2024-12-14 22:49:59 -05:00
|
|
|
outputs =
|
|
|
|
{
|
|
|
|
self,
|
|
|
|
nixpkgs,
|
|
|
|
flake-utils,
|
|
|
|
...
|
|
|
|
}:
|
2023-07-27 14:52:21 -04:00
|
|
|
{
|
|
|
|
overlays.default = final: prev: {
|
|
|
|
inherit (self.packages.${prev.system}) workon;
|
|
|
|
};
|
2024-12-14 22:49:59 -05:00
|
|
|
}
|
|
|
|
// flake-utils.lib.eachDefaultSystem (
|
|
|
|
system:
|
|
|
|
let
|
|
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
2021-12-08 18:21:15 -05:00
|
|
|
in
|
|
|
|
{
|
|
|
|
packages.workon = pkgs.buildGoModule {
|
2022-06-27 19:30:40 -04:00
|
|
|
pname = "workon";
|
2023-11-04 13:01:15 -04:00
|
|
|
version = "0.2.3";
|
2022-06-27 19:30:40 -04:00
|
|
|
src = ./.;
|
2024-12-14 22:49:59 -05:00
|
|
|
vendorHash = "sha256-Nm5EqzzU235RCnqVfisonzObQaWMlAP6/W2RboWTKIQ=";
|
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";
|
2024-12-14 22:49:59 -05:00
|
|
|
buildInputs = with pkgs; [
|
|
|
|
go
|
|
|
|
gopls
|
|
|
|
];
|
2021-12-08 18:21:15 -05:00
|
|
|
};
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|