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

editline: init at 1.15.3 #41950

Merged
merged 1 commit into from Jun 18, 2018
Merged

editline: init at 1.15.3 #41950

merged 1 commit into from Jun 18, 2018

Conversation

dtzWill
Copy link
Member

@dtzWill dtzWill commented Jun 13, 2018

Not sure why I didn't submit this earlier!

Anyway, generally useful library and may be used in Nix one day.

NixOS/nix#2228

Distinct from the libedit package, apparently :).

  • 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/)
  • Fits CONTRIBUTING.md.

@Mic92
Copy link
Member

Mic92 commented Jun 13, 2018

@GrahamcOfBorg build editline

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: editline

Partial log (click to expand)

 /nix/store/yrlzm8nkyzs5bwy7dhb1vhfzx936p6zn-coreutils-8.29/bin/mkdir -p '/nix/store/cmgh9qlry9ycpmzy209v7gcgbg85s4r9-editline-1.15.3/lib/pkgconfig'
 /nix/store/yrlzm8nkyzs5bwy7dhb1vhfzx936p6zn-coreutils-8.29/bin/install -c -m 644 libeditline.pc '/nix/store/cmgh9qlry9ycpmzy209v7gcgbg85s4r9-editline-1.15.3/lib/pkgconfig'
make[2]: Leaving directory '/private/tmp/nix-build-editline-1.15.3.drv-0/source'
make[1]: Leaving directory '/private/tmp/nix-build-editline-1.15.3.drv-0/source'
post-installation fixup
gzipping man pages under /nix/store/cmgh9qlry9ycpmzy209v7gcgbg85s4r9-editline-1.15.3/share/man/
strip is /nix/store/yyak5sjv68n9vdgnkd2cb5djk1l9sqj5-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/cmgh9qlry9ycpmzy209v7gcgbg85s4r9-editline-1.15.3/lib
patching script interpreter paths in /nix/store/cmgh9qlry9ycpmzy209v7gcgbg85s4r9-editline-1.15.3
/nix/store/cmgh9qlry9ycpmzy209v7gcgbg85s4r9-editline-1.15.3

@Mic92
Copy link
Member

Mic92 commented Jun 13, 2018

Looks good to me.
To improve closure size different outputs could be used, if it is supposed to be used in nix:

/nix/store/7yq7ffj7rsgg4x7lym7bcnja0c01p5mi-editline-1.15.3
/nix/store/7yq7ffj7rsgg4x7lym7bcnja0c01p5mi-editline-1.15.3/include
/nix/store/7yq7ffj7rsgg4x7lym7bcnja0c01p5mi-editline-1.15.3/include/editline.h
/nix/store/7yq7ffj7rsgg4x7lym7bcnja0c01p5mi-editline-1.15.3/lib
/nix/store/7yq7ffj7rsgg4x7lym7bcnja0c01p5mi-editline-1.15.3/lib/libeditline.so
/nix/store/7yq7ffj7rsgg4x7lym7bcnja0c01p5mi-editline-1.15.3/lib/libeditline.la
/nix/store/7yq7ffj7rsgg4x7lym7bcnja0c01p5mi-editline-1.15.3/lib/libeditline.so.0.0.0
/nix/store/7yq7ffj7rsgg4x7lym7bcnja0c01p5mi-editline-1.15.3/lib/libeditline.so.0
/nix/store/7yq7ffj7rsgg4x7lym7bcnja0c01p5mi-editline-1.15.3/lib/pkgconfig
/nix/store/7yq7ffj7rsgg4x7lym7bcnja0c01p5mi-editline-1.15.3/lib/pkgconfig/libeditline.pc
/nix/store/7yq7ffj7rsgg4x7lym7bcnja0c01p5mi-editline-1.15.3/lib/libeditline.a
/nix/store/7yq7ffj7rsgg4x7lym7bcnja0c01p5mi-editline-1.15.3/share
/nix/store/7yq7ffj7rsgg4x7lym7bcnja0c01p5mi-editline-1.15.3/share/doc
/nix/store/7yq7ffj7rsgg4x7lym7bcnja0c01p5mi-editline-1.15.3/share/doc/editline
/nix/store/7yq7ffj7rsgg4x7lym7bcnja0c01p5mi-editline-1.15.3/share/doc/editline/README.md
/nix/store/7yq7ffj7rsgg4x7lym7bcnja0c01p5mi-editline-1.15.3/share/doc/editline/LICENSE
/nix/store/7yq7ffj7rsgg4x7lym7bcnja0c01p5mi-editline-1.15.3/share/man
/nix/store/7yq7ffj7rsgg4x7lym7bcnja0c01p5mi-editline-1.15.3/share/man/man3
/nix/store/7yq7ffj7rsgg4x7lym7bcnja0c01p5mi-editline-1.15.3/share/man/man3/editline.3.gz

We do not need the static library.

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: editline

Partial log (click to expand)

make[1]: Leaving directory '/build/source'
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/7yq7ffj7rsgg4x7lym7bcnja0c01p5mi-editline-1.15.3
shrinking /nix/store/7yq7ffj7rsgg4x7lym7bcnja0c01p5mi-editline-1.15.3/lib/libeditline.so.0.0.0
gzipping man pages under /nix/store/7yq7ffj7rsgg4x7lym7bcnja0c01p5mi-editline-1.15.3/share/man/
strip is /nix/store/21ymadblbmsbb2bk4q7gl4kjasp8zmgd-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/7yq7ffj7rsgg4x7lym7bcnja0c01p5mi-editline-1.15.3/lib
patching script interpreter paths in /nix/store/7yq7ffj7rsgg4x7lym7bcnja0c01p5mi-editline-1.15.3
checking for references to /build in /nix/store/7yq7ffj7rsgg4x7lym7bcnja0c01p5mi-editline-1.15.3...
/nix/store/7yq7ffj7rsgg4x7lym7bcnja0c01p5mi-editline-1.15.3

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: editline

Partial log (click to expand)

make[1]: Leaving directory '/build/source'
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/9x777lz2lc0mzfgf26j5znr94pap2m8y-editline-1.15.3
shrinking /nix/store/9x777lz2lc0mzfgf26j5znr94pap2m8y-editline-1.15.3/lib/libeditline.so.0.0.0
gzipping man pages under /nix/store/9x777lz2lc0mzfgf26j5znr94pap2m8y-editline-1.15.3/share/man/
strip is /nix/store/qg2agrqkf240s656d207zqhipl0bc2id-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/9x777lz2lc0mzfgf26j5znr94pap2m8y-editline-1.15.3/lib
patching script interpreter paths in /nix/store/9x777lz2lc0mzfgf26j5znr94pap2m8y-editline-1.15.3
checking for references to /build in /nix/store/9x777lz2lc0mzfgf26j5znr94pap2m8y-editline-1.15.3...
/nix/store/9x777lz2lc0mzfgf26j5znr94pap2m8y-editline-1.15.3

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: editline

Partial log (click to expand)

/nix/store/7yq7ffj7rsgg4x7lym7bcnja0c01p5mi-editline-1.15.3

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: editline

Partial log (click to expand)

/nix/store/9x777lz2lc0mzfgf26j5znr94pap2m8y-editline-1.15.3

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: editline

Partial log (click to expand)

 /nix/store/yrlzm8nkyzs5bwy7dhb1vhfzx936p6zn-coreutils-8.29/bin/mkdir -p '/nix/store/cmgh9qlry9ycpmzy209v7gcgbg85s4r9-editline-1.15.3/lib/pkgconfig'
 /nix/store/yrlzm8nkyzs5bwy7dhb1vhfzx936p6zn-coreutils-8.29/bin/install -c -m 644 libeditline.pc '/nix/store/cmgh9qlry9ycpmzy209v7gcgbg85s4r9-editline-1.15.3/lib/pkgconfig'
make[2]: Leaving directory '/private/tmp/nix-build-editline-1.15.3.drv-0/source'
make[1]: Leaving directory '/private/tmp/nix-build-editline-1.15.3.drv-0/source'
post-installation fixup
gzipping man pages under /nix/store/cmgh9qlry9ycpmzy209v7gcgbg85s4r9-editline-1.15.3/share/man/
strip is /nix/store/yyak5sjv68n9vdgnkd2cb5djk1l9sqj5-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/cmgh9qlry9ycpmzy209v7gcgbg85s4r9-editline-1.15.3/lib
patching script interpreter paths in /nix/store/cmgh9qlry9ycpmzy209v7gcgbg85s4r9-editline-1.15.3
/nix/store/cmgh9qlry9ycpmzy209v7gcgbg85s4r9-editline-1.15.3

@dtzWill
Copy link
Member Author

dtzWill commented Jun 17, 2018

I was trying to remember why I included dontDisableStatic; I think it's because of this from the debian README included:

This is packaged in typical Debian form with a shared library version and
a static library version. It will be a rare package that wishes to
use the shared library form, the static one is only adds about 12.5kb
to your program.

Not sure if that's how we'd want to use it, or how it's used in general today (since we don't seem to have users in-tree unless they bundle it).

I'll look into multiple outputs...

@dtzWill
Copy link
Member Author

dtzWill commented Jun 17, 2018

Hmm, not sure how to best do what you're asking.

On the other hand the output is only ~160K total so doesn't seem in dire need of being split?

@xeji
Copy link
Contributor

xeji commented Jun 17, 2018

The static lib on my x64_64-linux box is 50K. Don't think it's worth splitting.

@matthewbauer
Copy link
Member

This is already in Nixpkgs (https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/libedit/default.nix) as libedit. If the upstream src has changed we should reuse that expression (not sure if @troglobit is a better maintainer than @JessThrysoee but I don't want to have both of them in Nixpkgs). Eventually I want to replace it with netbsd.libedit but haven't gotten that far. So if we prefer this version, can we remove libedit as well?

@troglobit
Copy link

@matthewbauer editline is not the same as libedit. Maybe once they shared a common ancestry but Jess' version stems from NetBSD and "mine" from the original usenet posting by @richsalz, which I picked up from Minix 2, back in the day.

@matthewbauer
Copy link
Member

matthewbauer commented Jun 18, 2018

Ah... okay I misunderstood. Avoiding libtermcap is definitely a nice feature & probably would make it easier to become a part of Nix.

@troglobit Are they roughly compatible though? For instance could we use editline for things that traditionally require libedit like OpenSSH & LLVM tools?

@richsalz
Copy link

Nice to see old classics still around :) Editline is here: https://github.com/richsalz/editline Biggest limitation is no linewrap, really only handles 80char lines. But it's like 17K object.

@troglobit
Copy link

@matthewbauer Nope, it's really limited, sorry.

It has been extended here and there over time since @richsalz original (cheers mate :), by Minix, then Debian, and then I picked it up and merged patches I'd found spread all over the Internet. If you want something complete then there's FSF Readline, or Jess' libedit, but if you want something really small and standalone this is it.

Copy link
Member

@matthewbauer matthewbauer left a comment

Choose a reason for hiding this comment

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

Okay looks good! The name could definitely be confusing because of libedit & such but this happens with pretty much any Unixy library that has tons of versions between Linux, Darwin, NetBSD, forks, etc.

@dtzWill dtzWill merged commit 42a88a4 into NixOS:master Jun 18, 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

7 participants