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

saleae-logic: 1.2.10 -> 1.2.28 #53844

Merged
merged 1 commit into from May 15, 2019
Merged

Conversation

RostakaGmfun
Copy link

Motivation for this change

The older 1.2.10 version does not support new Saleae devices well, like Saleae Logic Pro 16.

Things done

i686 platform was removed because Saleae stopped providing 32-bit
builds since 1.2.11.

  • 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)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

];

in

assert stdenv.system == "x86_64-linux";
Copy link
Contributor

Choose a reason for hiding this comment

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

stdenv.system is deprecated since NixOS 18.09 (e.g. see 2c2f1e3). Here we should replace it with stdenv.hostPlatform.system.

Copy link
Author

Choose a reason for hiding this comment

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

Done

@@ -91,7 +92,7 @@ stdenv.mkDerivation rec {
description = "Software for Saleae logic analyzers";
homepage = http://www.saleae.com/;
license = licenses.unfree;
platforms = [ "x86_64-linux" "i686-linux" ];
platforms = subtractLists platforms.i686 platforms.linux;
Copy link
Contributor

Choose a reason for hiding this comment

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

I hadn't seen this before, so I evaluated it in nix repl. Turns out that platforms.i686 is of a different type than platforms.linux, so nothing gets subtracted:

$ nix repl '<nixpkgs>'
nix-repl> (lib.subtractLists lib.platforms.i686 lib.platforms.linux) == lib.platforms.linux
true

Actually, I'm confused about platforms.linux no longer being a simple list of strings (["x86_64-linux" ...]). (I'm not that active in nixpkgs development.)

I guess I'd just do platforms = [ "x86_64-linux" ] for now, unless someone can tell us what the proper way to limit to 64-bit linux with platforms.* attribute.

Copy link
Contributor

Choose a reason for hiding this comment

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

With the "x86_64-linux" assert at the top of the expression, I guess using "platforms = platforms.linux" is fine as well.

Copy link
Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor

@bjornfor bjornfor left a comment

Choose a reason for hiding this comment

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

See inline comments. Otherwise, looks good.

@aanderse
Copy link
Member

@RostakaGmfun are you able to address the comments mentioned above?

@RostakaGmfun
Copy link
Author

Apologies for the delay and thank you for the review! @bjornfor, please re-review the patch.

@ofborg ofborg bot requested a review from bjornfor May 15, 2019 09:39
@bjornfor
Copy link
Contributor

It fails to start for me:

/nix/store/qii77f2aqakzgdb6i1wlmsflp1k8qllr-saleae-logic-1.2.28/Logic: error while loading shared libraries: libGL.so.1: cannot open shared object file: No such file or directory

(Doing the same on master branch works fine.)

Copy link
Contributor

@bjornfor bjornfor left a comment

Choose a reason for hiding this comment

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

$ nix-build -A saleae-logic && ./result/bin/saleae-logic
/nix/store/qii77f2aqakzgdb6i1wlmsflp1k8qllr-saleae-logic-1.2.28
/nix/store/qii77f2aqakzgdb6i1wlmsflp1k8qllr-saleae-logic-1.2.28/Logic: error while loading shared libraries: libGL.so.1: cannot open shared object file: No such file or directory

@RostakaGmfun
Copy link
Author

RostakaGmfun commented May 15, 2019

@bjornfor, it's great you have noticed this. Turns out my LD_LIBRARY_PATH contains /run/opengl-driver/lib:/run/opengl-driver-32/lib paths, which apparently is an effect of hardware.opengl.enable = true; present in my NixOS configuration.

I have added the libGL to library paths, and verified that I am able to run the binary with LD_LIBRARY_PATH set to "".

The older 1.2.10 version does not support new Saleae devices well.

i686 platform was removed because Saleae stopped providing 32-bit
builds since 1.2.11.
@bjornfor
Copy link
Contributor

@RostakaGmfun: I also have /run/opengl-driver/lib:/run/opengl-driver-32/lib in $LD_LIBRARY_PATH on my NixOS, but neither directory has the missing libGL.so.1 file in it. (There are other libGL* files there though.) Anyway, your updated PR works. Thanks!

@bjornfor bjornfor merged commit 91872f5 into NixOS:master May 15, 2019
@RostakaGmfun
Copy link
Author

Thank you @bjornfor!

@bjornfor bjornfor mentioned this pull request May 16, 2019
10 tasks
@bjornfor
Copy link
Contributor

@RostakaGmfun: Hi, I found that the .28 version is a beta version. The latest stable is .18. I made a PR to use the latest stable version. (I feel more comfortable backporting this to 19.03 if we use stable version.)

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

6 participants