workon/flake.nix
James Walker d1a53691a8
All checks were successful
continuous-integration/drone/push Build is passing
⬆ bump dependencies
2024-02-18 22:24:43 -05:00

49 lines
1.3 KiB
Nix

{
description = "Manage tmux for what you work on.";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
flake-utils.url = "github:numtide/flake-utils";
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
};
outputs = { self, nixpkgs, flake-utils, ... }:
{
overlays.default = final: prev: {
inherit (self.packages.${prev.system}) workon;
};
} // flake-utils.lib.eachDefaultSystem (system:
let pkgs = nixpkgs.legacyPackages.${system};
in
{
packages.workon = pkgs.buildGoModule {
pname = "workon";
version = "0.2.3";
src = ./.;
vendorHash = "sha256-tPW5oljrczYPQEK5gu8d8ao3Loz3/8aRi0xgVcJoqbU=";
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
'';
};
packages.default = self.packages.${system}.workon;
devShells.default = pkgs.mkShell {
name = "workon";
buildInputs = with pkgs; [ go gopls ];
};
}
);
}