b450903751
GitOrigin-RevId: 74a1793c659d09d7cf738005308b1f86c90cb59b
33 lines
854 B
Nix
33 lines
854 B
Nix
{ lib
|
|
, nimPackages
|
|
, fetchFromGitLab
|
|
, enableShells ? [ "bash" "zsh" "fish" "sh" "posh" "codium" ]
|
|
}:
|
|
nimPackages.buildNimPackage rec{
|
|
pname = "swaycwd";
|
|
version = "0.2.1";
|
|
|
|
src = fetchFromGitLab {
|
|
owner = "cab404";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
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;
|
|
};
|
|
}
|