3
0
Fork 0
forked from mirrors/nixpkgs

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>
This commit is contained in:
seb314 2021-04-30 10:24:49 +02:00 committed by GitHub
parent 65126243e6
commit 3f2f7d3296
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 44 additions and 0 deletions

View file

@ -0,0 +1,42 @@
{ stdenv, lib, fetchFromGitHub, cacert, python3 }:
stdenv.mkDerivation {
pname = "matrix-commander";
version = "unstable-2021-04-18";
src = fetchFromGitHub {
owner = "8go";
repo = "matrix-commander";
rev = "3e89a5f4c98dd191880ae371cc63eb9282d7d91f";
sha256 = "08nwwszp1kv5b7bgf6mmfn42slxkyhy98x18xbn4pglc4bj32iql";
};
buildInputs = [
cacert
(python3.withPackages(ps: with ps; [
matrix-nio
magic
markdown
pillow
urllib3
aiofiles
]))];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp $src/matrix-commander.py $out/bin/matrix-commander
chmod +x $out/bin/matrix-commander
runHook postInstall
'';
meta = with lib; {
description = "Simple but convenient CLI-based Matrix client app for sending and receiving";
homepage = "https://github.com/8go/matrix-commander";
license = licenses.gpl3Only;
platforms = platforms.linux;
maintainers = [ maintainers.seb314 ];
};
}

View file

@ -24525,6 +24525,8 @@ in
canonicaljson;
};
matrix-commander = callPackage ../applications/networking/instant-messengers/matrix-commander { };
matrix-dl = callPackage ../applications/networking/instant-messengers/matrix-dl { };
matrix-recorder = callPackage ../applications/networking/instant-messengers/matrix-recorder {};