Skip to content
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

termtosvg: init at 0.3.0 #43069

Merged
merged 1 commit into from Jul 6, 2018
Merged

termtosvg: init at 0.3.0 #43069

merged 1 commit into from Jul 6, 2018

Conversation

Ma27
Copy link
Member

@Ma27 Ma27 commented Jul 5, 2018

Motivation for this change

termtosvg makes screencasts and writes them into a SVG file. The app
can be used on CLI entirely.

Closes #42921

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@Ma27 Ma27 requested a review from FRidh as a code owner July 5, 2018 13:04
@Ma27
Copy link
Member Author

Ma27 commented Jul 5, 2018

/cc @Jumblemuddle

@adisbladis
Copy link
Member

This doesn't look like a library and does not belong in pythonPackages.
./pkgs/tools/misc/ is probably the correct location.

@@ -0,0 +1,29 @@
{ lib, buildPythonPackage, fetchFromGitHub, svgwrite, pyte, mock, unittest2, isPy3k }:

buildPythonPackage rec {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since it's a standalone app, buildPythonApplication fits better.

version = "0.3.0";

# tests broken on Python 2, standalone app that should be fine with Python 3
disable = !isPy3k;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you use buildPythonApplication above, you can use python3 as input and get rid of this.

postCheck = "unset HOME";

meta = with lib; {
homepage = https://pypi.org/project/termtosvg/;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be https://github.com/nbedos/termtosvg and the description is missing.

@@ -0,0 +1,26 @@
{ lib, buildPythonApplication, fetchFromGitHub, svgwrite, pyte, mock, unittest2 }:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please pass only lib, python3 and fetchFromGitHub as arguments so that the Python package set can be easily overriden.

@@ -18413,6 +18413,10 @@ with pkgs;
vte = gnome3.vte-ng;
};

termtosvg = callPackage ../tools/misc/termtosvg {
inherit (python3Packages) buildPythonApplication svgwrite pyte mock unittest2;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop this line.

Copy link
Member

@dotlambda dotlambda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't forget to remove the python3Packages prefix from your commit message.

@Ma27 Ma27 changed the title python3Packages.termtosvg: init at 0.3.0 termtosvg: init at 0.3.0 Jul 5, 2018
@Ma27
Copy link
Member Author

Ma27 commented Jul 5, 2018

ack, will work through the review %)

@Ma27
Copy link
Member Author

Ma27 commented Jul 5, 2018

ok, this history looks wrong %)

@@ -18413,6 +18413,8 @@ with pkgs;
vte = gnome3.vte-ng;
};

termtosvg = callPackage ../tools/misc/termtosvg { };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use python3Packages.callPackage and list all packages as input to the function instead.
You can look at aws_shell for an example.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought that callPackage is fine in this case if I understand threads like this correctly: #38028 (comment)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah you are right. Sorry for the noise.

@xeji
Copy link
Contributor

xeji commented Jul 6, 2018

Please remove the debootstrap commit and fix eval (missing meta.homepage).

`termtosvg` makes screencasts and writes them into a SVG file. The app
can be used on CLI entirely.

Closes NixOS#42921
@xeji
Copy link
Contributor

xeji commented Jul 6, 2018

@GrahamcOfBorg build termtosvg

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: termtosvg

Partial log (click to expand)

test__record (tests.test_term.TestTerm) ... ok
test_get_terminal_size (tests.test_term.TestTerm) ... ok
test_record (tests.test_term.TestTerm) ... ok
test_replay (tests.test_term.TestTerm) ... ok

----------------------------------------------------------------------
Ran 19 tests in 4.648s

OK
/nix/store/0jvhs4mhw7gqrs9hzazqmh5mpbw3mz3s-termtosvg-0.3.0

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: termtosvg

Partial log (click to expand)

Recording started, enter "exit" command or Control-D to end
Recording ended, SVG animation is /build/termtosvg_cv24fc9l.svg
ok
test_parse (tests.test___main__.TestMain) ... ok

----------------------------------------------------------------------
Ran 19 tests in 6.270s

OK
/nix/store/dal1168wq2mkanr04ldn4k88ql3s2mm4-termtosvg-0.3.0

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: termtosvg

Partial log (click to expand)

Recording started, enter "exit" command or Control-D to end
Recording ended, SVG animation is /build/termtosvg_33je_f2j.svg
ok
test_parse (tests.test___main__.TestMain) ... ok

----------------------------------------------------------------------
Ran 19 tests in 7.272s

OK
/nix/store/0qshvmmmj1d5brc9ycrq91qknvqd2p2i-termtosvg-0.3.0

@xeji xeji merged commit e331236 into NixOS:master Jul 6, 2018
@xeji
Copy link
Contributor

xeji commented Jul 6, 2018

Don't forget to remove the python3Packages prefix from your commit message.

Done in the merge.

@Ma27 Ma27 deleted the package-termtosvg branch July 6, 2018 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants