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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
bitscope: init at 2017-12-28 #33148
bitscope: init at 2017-12-28 #33148
Conversation
}; | ||
in { | ||
dso = let | ||
name = "${toolName}_${version}"; |
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.
Tip: If package name and version is separated with a dash, Nix will know how to parse it. This currently uses underscore, so Nix will not know the version.
inherit name toolName version; | ||
|
||
meta.description = "Communications program designed to make it easy to talk to any model BitScope"; | ||
meta.longDescription = "BitScope Console is a communications program designed to make it easy to talk to any model BitScope via any supported communications link (serial, USB, LAN, Internet etc). Use it to interrogate the BitScope Virtual Machine to help write your own software for BitScope. It uses BitScope Link Library to facilitate communication. Note: you don't need the program to talk to most BitScopes, a simple terminal program will do but Console makes connection easier, uses the probe file specification and supports downstream communications to connected port adapters."; |
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.
If you use double single-quotes, you can create a multi-line string of this longDescription that wraps at 80 chars.
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.
Looks good. Just nitpicks:
- Use dash instead of underscore in derivation names, so that Nix can parse the version.
- Rewrite the branch to be two commits: (1) adding yourself to lib/maintainers.nix and (2) adding the bitscope packages.
fbea3e9
to
8dcb841
Compare
@bjornfor requests honored 馃槈 and force pushed |
@@ -0,0 +1,54 @@ | |||
{ stdenv, fetchurl, buildFHSUserEnv, makeWrapper, writeScriptBin, pkgs }: |
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.
Please list each dependency as function parameter instead of taking the whole 'pkgs' set.
I think you misunderstood what I meant about the maintainers commit. I meant to have one commit, the first, that only adds you to lib/maintainers.nix, followed by a commit that adds the bitscope package (with you as maintainer). Currently the separation I was looking for is not there -- both commits touch the bitscope package. Also, the new commit message for adding bitscope could use some cleanup:
Let me know if you'd like me to rebase / amend / edit commit messages before applying to master. |
8dcb841
to
24c38dd
Compare
Thanks for clarifying. I hope I wont cost you much more time due to confusion on my side or failure to get 馃挬 right. |
24c38dd
to
a9866d2
Compare
dpkg, | ||
fetchurl, | ||
gdk_pixbuf, | ||
glib, |
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.
One more nitpick! These parameters are commonly written in nixpkgs with comma-first style:
{ atk
, buildFHSUserEnv
, cairo
...
Thank you! I'm testing this on my NixOS machine and all tools have this startup error:
I also tried running with clean environment ( My system: NixOS 17.09, x86_64-linux. What system do you have? |
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'd like to know why I'm unable to run the tools. (Also, tiny coding style commented earlier.)
Dammit. I am costing you more time after all 馃槤. Anyways my systems is Post- |
a9866d2
to
bb94dc4
Compare
I managed to build all bitscope tools in the provided demo vm. @bjornfor, please advise on next steps. If I'm able to reproduce the problem I can at least attempt to fix the package. Otherwise I'm shooting blanks. Are there perhaps best-practices that I overlooked that could contribute to this? P.S.: I've taken care of the style-compliance issue @FRidh mentioned 馃槈 |
meta = with stdenv.lib; { | ||
homepage = http://bitscope.com/software/; | ||
license = licenses.unfree; | ||
platforms = [ "i686-linux" "x86_64-linux" ]; |
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.
We no longer support i686
. Are you sure you want to provide i686
packages?
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 just took it out. Not sure at all and if it isn't supported anymore I don't see the point keeping it there 馃槈. Thanks for pointing that out.
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.
so all the
else if stdenv.system == "i686-linux" then fetchurl
can be dropped as well then, right?
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.
A few minutes after the push it dawned upon me that I had those obsolete stdenv.system
checks in there. They're gone now. 馃槈
bb94dc4
to
06ab13b
Compare
06ab13b
to
14018b3
Compare
@bjornfor isn't this one of the problems Nix aims to eliminate? I'm really curious to know what's different on your box because packages should either build everywhere or fail everywhere, right? These packages may be worthless to you but if your curiosity every sparks you to explore this further at that other time give me a shout. This kind of bugs me out because it ruins the Nix dream for me. |
@vidbina: Yes, you are absolutely right about Nix. But no, these packages are not worthless to me. The thing is that Nix only cares about the build environment. I may have a different runtime environment than you, based on what packages and services I have on my system. The build worked just fine, it was the runtime that broke. As a quick test I did try to run one of the bitscope packages in a clean environment (env -i ...) but no success. I'll have bisect my config to find what causes the breakage. |
@bjornfor thanks for clearing that up. I'm slowly but surely getting a better hang of this. Wasn't too aware that Nix only guaranteed "buildability" across setups and not "runability". Also, when I run something in Perhaps there is something in the way in which I called |
Right. Except I think it still sources ~/.bashrc or something that is impure. (I think there is a bug about it but I didn't find it.) Yes, LD_LIBRARY_PATH is an example of a variable that can mess up a lot (at runtime). Btw, I tested this on two another NixOS 17.09 system of mine, one running KDE the other GNOME. No problem. So I must have some kind of impurity on my main system that I must find myself :-/ |
Motivation for this change
BitScope makes some pretty sweet and affordable scopes and logic analysers of which I own a unit that I needed to use recently. Sadly the source doesn't seem to be open (hence the submission with the unfree license), but they at least offer some reference schematics for the hardware.
Several deb and rpm packages, among other formats for other platforms, are available on their website so I figured it made sense to take the deb and package it for use in NixOS. I ended up using a FHS env to get everything up and running and mostly tested the additions with a combination of
which drops me in a shell where I have access to the executables, or
from within the nixpkgs directory, loading the whole shebang and inspecting the
bitscope
set.The added packages along with the executables they install are:
bitscope.chart
, 馃敆 accessible through the binarybitscope-chart
bitscope.console
, accessible through the binarybitscope-console
bitscope.display
, 馃敆 accessible through the binarybitscope-display
bitscope.dso
, 馃敆 accessible through the binarybitscope-dso
bitscope.logic
, 馃敆 accessible through the binarybitscope-logic
bitscope.meter
, 馃敆 accessible through the binarybitscope-meter
bitscope.proto
, accessible through the binarybitscope-proto
bitscope.server
馃敆, accessible through the binarybitscope-server
Every binary is pinned to the latest stable version as of 2017-12-28 and works on my setup.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)