2021-12-08 18:21:15 -05:00
|
|
|
{
|
|
|
|
description = "Manage tmux for what you work on.";
|
|
|
|
|
|
|
|
inputs = {
|
2024-06-24 12:55:27 -04:00
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.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, ... }:
|
2023-07-27 14:52:21 -04:00
|
|
|
{
|
|
|
|
overlays.default = final: prev: {
|
|
|
|
inherit (self.packages.${prev.system}) workon;
|
|
|
|
};
|
|
|
|
} // flake-utils.lib.eachDefaultSystem (system:
|
2021-12-08 18:21:15 -05:00
|
|
|
let pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
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-06-24 12:55:27 -04:00
|
|
|
vendorHash = "sha256-s2HCpKQ718q6L17wnJWf9yHkrcB1LZ6D185XX8MNt1Q=";
|
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
|
|
|
};
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|