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

bashdb: 4.4-0.94 -> 4.4-1.0.0 #49754

Merged
merged 4 commits into from Nov 15, 2018
Merged

bashdb: 4.4-0.94 -> 4.4-1.0.0 #49754

merged 4 commits into from Nov 15, 2018

Conversation

nthorne
Copy link
Contributor

@nthorne nthorne commented Nov 4, 2018

Updated to latest version.

Motivation for this change
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.

Updated to latest version.
@Mic92
Copy link
Member

Mic92 commented Nov 4, 2018

How do I test this? When I run:

$ echo 'echo foo' > foo.sh
$ bashdb ./foo.sh

it just hangs

@nthorne
Copy link
Contributor Author

nthorne commented Nov 4, 2018

@Mic92 really? Given a file test.sh containing

#!/usr/bin/env bash
echo "One"
echo "Two"
echo "Three"

I get

$ ./result/bin/bashdb test.sh
bash debugger, bashdb, release 4.4-1.0.0

Copyright 2002-2004, 2006-2012, 2014, 2016-2018 Rocky Bernstein
This is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.

....
 
(/home/nthorne/repos/nixpkgs/pkgs/development/tools/misc/bashdb/test.sh:3):
3:      echo "One"
bashdb<0> n
One
(/home/nthorne/repos/nixpkgs/pkgs/development/tools/misc/bashdb/test.sh:4):
4:      echo "Two"
bashdb<1> n
Two
(/home/nthorne/repos/nixpkgs/pkgs/development/tools/misc/bashdb/test.sh:5):
5:      echo "Three"
bashdb<2> n
Three
(/home/nthorne/repos/nixpkgs/pkgs/development/tools/misc/bashdb/result/bin/bashdb:1):
1:      #!/nix/store/r47p5pzx52m3n34vdgqpk5rvqgm0m24m-bash-4.4-p23/bin/bash
bashdb<3> q
bashdb: That's all, folks...

so I can step through the source code as expected.

@nthorne
Copy link
Contributor Author

nthorne commented Nov 4, 2018

.. a shell script with the shebang only should at least give you the copyright blurb.. What do you get if you run

$ bash -x bashdb ./foo.sh

@Mic92
Copy link
Member

Mic92 commented Nov 4, 2018

I had to also bring python3.pkgs.pygments in my nix-shell scope for this to work. Is this a hard dependency?

@nthorne
Copy link
Contributor Author

nthorne commented Nov 4, 2018

Really? I don't have that on my system afaik, and I did a sandbox build when updating the derivation, so I wonder why i had no issues.. I'll look into it. Thanks for the thorough testing!

@nthorne
Copy link
Contributor Author

nthorne commented Nov 4, 2018

@Mic92 nope; ran in a pure shell, and works just fine for me. Here's how I tested; please let me know if I'm doing something wrong here:

$ nix-build <NIXPKGS PATH> -A bashdb
$ nix-shell -E "with import <nixpkgs> {}; callPackage $PWD/default.nix {}"
$ cd result/bin
$ ./bashdb -c ls

I can't figure out why you end up requiring pygments whereas I'm not.. I do see that there's a -S option (which is not working for me) that will pull in the python parts for highlighting support, so perhaps I should go ahead and add it as a propagatedBuildInputs anyways..

Added pygments dependency.
@@ -1,13 +1,17 @@
{ stdenv, fetchurl }:
{ stdenv, fetchurl, python36Packages }:
Copy link
Member

Choose a reason for hiding this comment

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

Is this particularly tied to python 3.6? If not, I'd suggest using python3Packages here.

Copy link
Member

Choose a reason for hiding this comment

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

Agreed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea. Fixed that.

nthorne and others added 2 commits November 15, 2018 15:00
@Mic92 Mic92 merged commit dd569da into NixOS:master Nov 15, 2018
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

4 participants