nixpkgs/pkgs/by-name/sw/swaycwd/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
909 B
Nix
Raw Normal View History

{ lib
2023-10-31 16:02:43 +00:00
, buildNimPackage
, fetchFromGitLab
2022-09-06 04:31:51 +00:00
, enableShells ? [ "bash" "zsh" "fish" "sh" "posh" "codium" ]
}:
2023-10-31 16:02:43 +00:00
buildNimPackage (finalAttrs: {
pname = "swaycwd";
2022-09-06 04:31:51 +00:00
version = "0.2.1";
src = fetchFromGitLab {
owner = "cab404";
2023-10-31 16:02:43 +00:00
repo = finalAttrs.pname;
rev = "v${finalAttrs.version}";
2022-09-06 04:31:51 +00:00
hash = "sha256-R/LnojbA0vBQVivGLaoM0+M4qVJ7vjf4kggB59i896w=";
};
preConfigure = ''
{
echo 'let enabledShells: seq[string] = @${builtins.toJSON enableShells}'
echo 'export enabledShells'
} > src/shells.nim
'';
nimFlags = [ "--opt:speed" ];
meta = with lib; {
homepage = "https://gitlab.com/cab404/swaycwd";
description = "Returns cwd for shell in currently focused sway window, or home directory if cannot find shell";
maintainers = with maintainers; [ cab404 ];
platforms = platforms.linux;
license = licenses.gpl3Only;
2023-11-27 01:17:53 +00:00
mainProgram = "swaycwd";
};
2023-10-31 16:02:43 +00:00
})