Why does configuration.nix compile while nix-shell uses a prebuilt binary? - configuration

I'm using NixOS as the distro on WSL (via the excellent setup provided by Trundle: https://github.com/Trundle/NixOS-WSL) and I'd like to install the racket package. If I run nix-shell -p racket, it dutifully downloads (or uses the previously downloaded) the pre-built binary and I can use it just fine. But if I add racket to the environment.systemPackages list in configuration.nix and try to nixos-rebuild test, it starts trying to build things from source. It fails when it gets to gtk (presumably because WSL2 doesn't yet support graphical applications).
Why the difference in behavior? Is there a way I can convince NixOS to use the pre-built racket when filling out the systemPackages? Happy to post my configuration.nix if it would help the diagnosis, though it's really not much of a departure from Trundle's.

Related

How to install FEATool on Octave (Ubuntu 18.04)?

I want to install FEATool on Octave 4.2.2. Therefore, I went through these steps:
Downloading it.
Trying pkg install FEATool-Multiphysic.tar.gz in Octave command-line interface.
Octave returns this error:
COPYING file missing.
Neither GitHub nor FEATool provides any installation file for Octave or instructions about doing it.
Therefore, the question is:
How to install FEATool on Octave (Ubuntu 18.04)?
Following a quick preliminary check, it seems that the FEATool is no longer available or compatible with Octave since FEATool v1.10.
While there was no explicit announcement for this either on their blog or changelogs, according to the main author of the software (as elicited below), this seems to relate to overhead involved in supporting Octave on top of Matlab. Furthermore, as the company seems to have effectively chosen (for their own good reasons, I'm sure) to intentionally follow a direction that explicitly breaks Octave functionality, it cannot be expected to work on this platform even as unsupported software. Therefore the answer to your question is that "no you can no longer install this tool on octave (ubuntu or otherwise)".
Evidence that this software is no longer available for, or compatible with Octave:
Mentions to Octave in the documentation from v1.8 have now disappeared and are exclusive to Matlab (with extra effort towards Matlab backwards compatibily)
The .tar.gz package is no longer an Octave-compatible package.
The main code relies on .p files, which obfuscate the code and are unsupported in Octave
Past releases and source code have disappeared and are no longer available for download, both from sourceforge, official website, and github. Therefore it is not possible to download the octave-compatible v1.8 of the tool either.

Running Expect script on windows

I've the expect script running on linux which I want to run it on windows. I've added
#!/bin/sh
# \
exec tclsh "$0" ${1+"$#"}
package require Expect
lines as well at the start. I'm getting 'can't find package Expect' error. where can I get that?
Expect for Windows is done by ActiveState as part of ActiveTcl (no charge for the 32-bit version), which is highly recommended as the definitive batteries-included build of Tcl on the Windows platform. (I'm not sure if Expect for Windows is part of the Community Edition; I'm on a different platform so checking is a little awkward.)
Be aware that there are some substantial differences between Unix and Windows under the covers, and Expect is an extension package that gets very deep into the details. It hides nearly all the horrible differences, but not all; advanced scripts may need quite a bit of extra work to port. Also, some Windows executables (notably telnet.exe) can't be wrapped by Expect because they're marked as special system files, and GUI apps can't be wrapped at all. There are often good alternatives for subordinate processes though.

Is there an implementation of ZMQ in Octave

After googling a bit, I did not find anything that stroke as really useful.
I was wondering if there was any ZMQ interface implemented for Octave, I know there is something in Matlab, but I have not tried it yet.
I just put together a port of the matlab version which works great in octave (under ubuntu). So far it's working great for what I need:
https://github.com/esromneb/zeromq-octave
The library has a few limitations (for instance publish always connects out and subscribe always binds to a port) but if you can live with that it's great!
There is a zeromq package available from octave forge which works in octave under linux and windows.
You should be able to install it in octave by running:
pkg install -forge zeromq
(assuming you also have the zeromq library installed)
It supports most of the socket types, including pub/sub, req/rep, push/pull.
Details of the package can be found here: http://octave.sourceforge.net/zeromq/

How do I install a program that involves make, configure, and build?

I knew this day would come, so I guess it is here. (P.S. I am on windows XP).
I am trying to use this program here. I installed it fine, but it doesnt seem to work when I type in equations. So I went back to the site and it says I need JRE version 5.0 or above, (check). Then it also says I need dvipng, which I dont think I have.
So I went to the site it tells me to, (here), and I downloaded the most recent one, "dvipng-1.14.tar.gz". I unzipped it and I have it all sitting in one directory.
Ok... now what?
Im afraid I need guidance on exactly how to proceed here. The readme and installation instructions say to run "./configure", then "make", etc, I opened the command prompt and did all that but doesnt recognize. I have never had to build in this way, I always used an IDE for compiling C++ programs that I write myself. (Anyway, why am I even having to make an exe why dont they just make one and let us download that?)
Very confused as to what I need to do here, appreciate some step by step help.
Thank you
Even though Mohammad's problem was solved in the comments, I'll have a go at answering his question:
To run a build system that uses ./configure, you need something that can run shell scripts, as well as the usual suite of unix tools that the script expects, plus a compiler that behaves in the standard sort of way.
The two projects that I know of that do this are cygwin and MSYS. cygwin is aimed at creating a full POSIX environment on windows, while MSYS is an add-on to MinGW that aims to provide just the parts needed to run a ./configure script and build a program.

Tcpdump on openwrt

I'm looking for a tcpdump binary that runs on openwrt. The website only shows source code that must be built. Anybody point me to a location that contains a prebuild binary? Thanks.
I suggest to set up a working repository, i.e.:
https://downloads.openwrt.org/chaos_calmer/15.05-rc2/x86/generic/packages/base/
You can put the url on your OpenWRT system under /etc/opkg.conf.
Using opkg you do not have to deal with all the dependencies.
opkg update
opkg install tcpdump
If there is no internet connection on the Openwrt system, and there is no local repository deployed, the solution above works as well, but it is more painful and consumes more time.
You find binaries at
http://downloads.openwrt.org/snapshots/trunk/
but you have to use the right one for your hardware plattform
e.g for x86
http://downloads.openwrt.org/snapshots/trunk/x86/packages/tcpdump_4.2.1-1_x86.ipk
The prefered method is to use opkg to install the package