diff options
author | toastal <toastal@posteo.net> | 2024-03-18 14:08:46 +0700 |
---|---|---|
committer | toastal <toastal@posteo.net> | 2024-04-11 08:26:35 +0700 |
commit | 94d3c3c65c57d46f7561e5d718537c8b52aad3ef (patch) | |
tree | ef286821995154b37941f6baebc0048c85adddd3 /pkgs/by-name/mo | |
parent | 7439b139aa54a5f2df7ae483cff86994099c9c7d (diff) |
movim: add bin script helper
Diffstat (limited to 'pkgs/by-name/mo')
-rw-r--r-- | pkgs/by-name/mo/movim/package.nix | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/pkgs/by-name/mo/movim/package.nix b/pkgs/by-name/mo/movim/package.nix index 600af837b1071..0fb4851aa1092 100644 --- a/pkgs/by-name/mo/movim/package.nix +++ b/pkgs/by-name/mo/movim/package.nix @@ -1,5 +1,6 @@ { lib , fetchFromGitHub +, dash , php , phpCfg ? null , withPgsql ? true # “strongly recommended” according to docs @@ -34,10 +35,24 @@ php.buildComposerProject (finalAttrs: { vendorHash = "sha256-PBoJbVuF0Qy7nNlL4yx446ivlZpPYNIai78yC0wWkCM="; + postInstall = '' + mkdir -p $out/bin + echo "#!${lib.getExe dash}" > $out/bin/movim + echo "${lib.getExe finalAttrs.php} $out/share/php/${finalAttrs.pname}/daemon.php \"\$@\"" >> $out/bin/movim + chmod +x $out/bin/movim + + mkdir -p $out/share/{bash-completion/completion,fish/vendor_completions.d,zsh/site-functions} + $out/bin/movim completion bash | sed "s/daemon.php/movim/g" > $out/share/bash-completion/completion/movim.bash + $out/bin/movim completion fish | sed "s/daemon.php/movim/g" > $out/share/fish/vendor_completions.d/movim.fish + $out/bin/movim completion zsh | sed "s/daemon.php/movim/g" > $out/share/zsh/site-functions/_movim + chmod +x $out/share/{bash-completion/completion/movim.bash,fish/vendor_completions.d/movim.fish,zsh/site-functions/_movim} + ''; + meta = { description = "a federated blogging & chat platform that acts as a web front end for the XMPP protocol"; homepage = "https://movim.eu"; license = lib.licenses.agpl3Plus; maintainers = with lib.maintainers; [ toastal ]; + mainProgram = "movim"; }; }) |