New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
matrix-commander: init at unstable-2021-04-18 #119895
Conversation
Result of 1 package built successfully:
2 suggestions:
Result of 1 package built successfully:
2 suggestions:
|
LGTM. Builds on my machine and runs (I haven't actually tried connecting to a matrix server though). |
{ pkgs, fetchFromGitHub, lib }: | ||
|
||
pkgs.stdenv.mkDerivation { | ||
name = "matrix-commander"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name = "matrix-commander"; | |
pname = "matrix-commander"; | |
version = "unstable-XXXX-XX-XX" |
replace XXXX-XX-XX with the date of the commit.
propagatedBuildInputs = [ | ||
pkgs.cacert ] ++ | ||
(with pkgs.python38Packages; [ | ||
matrix-nio | ||
magic | ||
markdown | ||
pillow | ||
urllib3 | ||
]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
propagatedBuildInputs = [ | |
pkgs.cacert ] ++ | |
(with pkgs.python38Packages; [ | |
matrix-nio | |
magic | |
markdown | |
pillow | |
urllib3 | |
]); | |
propagatedBuildInputs = [ cacert ] | |
++ (with python3Packages; [ | |
matrix-nio | |
magic | |
markdown | |
pillow | |
urllib3 | |
]); |
@@ -0,0 +1,36 @@ | |||
{ pkgs, fetchFromGitHub, lib }: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{ pkgs, fetchFromGitHub, lib }: | |
{ lib, fetchFromGitHub, cacert, python3Packages }: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also added stdenv in order to get mkDerivation -- or is there a better way to do that?
pkgs/applications/networking/instant-messengers/matrix-commander/default.nix
Show resolved
Hide resolved
meta = { | ||
description = "Simple but convenient CLI-based Matrix client app for sending and receiving"; | ||
homepage = "https://github.com/8go/matrix-commander"; | ||
license = lib.licenses.gpl3; | ||
platforms = lib.platforms.linux; | ||
maintainers = [ lib.maintainers.seb314 ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
meta = { | |
description = "Simple but convenient CLI-based Matrix client app for sending and receiving"; | |
homepage = "https://github.com/8go/matrix-commander"; | |
license = lib.licenses.gpl3; | |
platforms = lib.platforms.linux; | |
maintainers = [ lib.maintainers.seb314 ]; | |
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.gpl3; | |
platforms = platforms.linux; | |
maintainers = [ maintainers.seb314 ]; |
gpl3Only or gpl3Plus?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pkgs/top-level/all-packages.nix
Outdated
@@ -23946,6 +23946,8 @@ in | |||
canonicaljson; | |||
}; | |||
|
|||
matrix-commander = callPackage ../applications/networking/instant-messengers/matrix-commander {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
matrix-commander = callPackage ../applications/networking/instant-messengers/matrix-commander {}; | |
matrix-commander = callPackage ../applications/networking/instant-messengers/matrix-commander { }; |
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" )
thanks for the review! In addition to applying most of your suggestions (see comments), I did some changes that I hope will be more correct regarding runtime dependencies (it seems that while the original commit worked fine from nix-shell, it resulted in an import error when I tried using matrix commander as a dependency from another nix-packaged app (jvm-based). The new version works locally from nix shell (as before) and avoids the import error when called from the other program. Hovewer, when called from my other app, actuall sending still doesn't work -- but that might be a problem on the other program/package's side... |
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.gpl3; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gpl3Plus or gpl3Only?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't find any mentions about that in the matrix-commander repo, so I asked on github, but there's no answer yet.
Should we wait, infer gpl3Only, or keep gpl3 for now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think keeping it gpl3 for now and adding a link to the issue is the best way to handle this. Then it's easy to change in the future if / when an answer comes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, added a note in 1331ee3
(suggested by r-rmcgibbo)
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
) (tested the python script in bin/matrix-commander, sending messages works)nix path-info -S
before and after)