workon/flake.nix

49 lines
1.3 KiB
Nix
Raw Normal View History

2021-12-08 18:21:15 -05:00
{
description = "Manage tmux for what you work on.";
inputs = {
2024-02-18 22:24:43 -05:00
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.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
};
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-02-18 22:24:43 -05:00
vendorHash = "sha256-tPW5oljrczYPQEK5gu8d8ao3Loz3/8aRi0xgVcJoqbU=";
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
};
}
);
}