base16-schemes: unstable-2024-06-21 -> unstable-2024-11-12
[NixPkgs.git] / pkgs / by-name / sw / swaycwd / package.nix
blob50568b3215520374cf5890b484f5ee63a03ff141
1 { lib
2 , buildNimPackage
3 , fetchFromGitLab
4 , enableShells ? [ "bash" "zsh" "fish" "sh" "posh" "codium" ]
5 }:
7 buildNimPackage (finalAttrs: {
8   pname = "swaycwd";
9   version = "0.2.1";
11   src = fetchFromGitLab {
12     owner = "cab404";
13     repo = "swaycwd";
14     rev = "v${finalAttrs.version}";
15     hash = "sha256-R/LnojbA0vBQVivGLaoM0+M4qVJ7vjf4kggB59i896w=";
16   };
18   preConfigure = ''
19     {
20       echo 'let enabledShells: seq[string] = @${builtins.toJSON enableShells}'
21       echo 'export enabledShells'
22     } > src/shells.nim
23   '';
25   nimFlags = [ "--opt:speed" ];
27   meta = with lib; {
28     homepage = "https://gitlab.com/cab404/swaycwd";
29     description = "Returns cwd for shell in currently focused sway window, or home directory if cannot find shell";
30     maintainers = with maintainers; [ cab404 ];
31     platforms = platforms.linux;
32     license = licenses.gpl3Only;
33     mainProgram = "swaycwd";
34   };