matrix-commander: init at unstable-2021-04-18 (#119895)

* matrix-commander: init

* matrix-commander: cleanups & potential dep fixes

apply most SuperSandro2000's review comments;

used python3.withPackages -- this might be the correct
way to get runtime python dependencies to work even
when matrix-commander is a dependency of another packages
(as opposed to testing in nix-shell). I'm not sure though.

aiofiles seemed to be a missing runtime dependency when called
from another (nix-packaged, jvm-based) app -- there was an
import error without it.

cacerts might require explicit pinning, as described here:
https://gist.github.com/CMCDragonkai/1ae4f4b5edeb021ca7bb1d271caca999
(relevant snippet: wrapProgram $out/bin/program \
--set SSL_CERT_FILE "${cacert}/etc/ssl/certs/ca-bundle.crt"
)

* add runHook {pre,post}Install

(suggested by r-rmcgibbo)

* add link to github issue re gpl3{Only,Plus}

* Update pkgs/applications/networking/instant-messengers/matrix-commander/default.nix

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>

authored by

seb314
Sandro
and committed by
GitHub
3f2f7d32 65126243

+44
+42
pkgs/applications/networking/instant-messengers/matrix-commander/default.nix
··· 1 + { stdenv, lib, fetchFromGitHub, cacert, python3 }: 2 + 3 + stdenv.mkDerivation { 4 + pname = "matrix-commander"; 5 + version = "unstable-2021-04-18"; 6 + 7 + src = fetchFromGitHub { 8 + owner = "8go"; 9 + repo = "matrix-commander"; 10 + rev = "3e89a5f4c98dd191880ae371cc63eb9282d7d91f"; 11 + sha256 = "08nwwszp1kv5b7bgf6mmfn42slxkyhy98x18xbn4pglc4bj32iql"; 12 + }; 13 + 14 + buildInputs = [ 15 + cacert 16 + (python3.withPackages(ps: with ps; [ 17 + matrix-nio 18 + magic 19 + markdown 20 + pillow 21 + urllib3 22 + aiofiles 23 + ]))]; 24 + 25 + installPhase = '' 26 + runHook preInstall 27 + 28 + mkdir -p $out/bin 29 + cp $src/matrix-commander.py $out/bin/matrix-commander 30 + chmod +x $out/bin/matrix-commander 31 + 32 + runHook postInstall 33 + ''; 34 + 35 + meta = with lib; { 36 + description = "Simple but convenient CLI-based Matrix client app for sending and receiving"; 37 + homepage = "https://github.com/8go/matrix-commander"; 38 + license = licenses.gpl3Only; 39 + platforms = platforms.linux; 40 + maintainers = [ maintainers.seb314 ]; 41 + }; 42 + }
+2
pkgs/top-level/all-packages.nix
··· 24525 24525 canonicaljson; 24526 24526 }; 24527 24527 24528 + matrix-commander = callPackage ../applications/networking/instant-messengers/matrix-commander { }; 24529 + 24528 24530 matrix-dl = callPackage ../applications/networking/instant-messengers/matrix-dl { }; 24529 24531 24530 24532 matrix-recorder = callPackage ../applications/networking/instant-messengers/matrix-recorder {};