There is also another solution if you use flake and want to install the package system-wide (useful to test the .desktop file for instance and integration, or to use it until it is made available): you can add an input in your flake.nix like:
and in your configuration.nix, you should be able to add
environment.systemPackages = with pkgs; [
# your other packages ...
inputs.mqttx-pr.legacyPackages.${system}.mqttx
];
in your list of installed packages. To make sure that system is well defined, you certainly need to also add system in the first line of your configuration.nix like:
{ inputs, config, pkgs, lib, system, ... }:
and change in flake.nix the specialArgs line like:
First of all it has to go through and it would be good if it didn’t write everywhere. Just like when compiling applications, where “sudo make install” first distributes files in the file system…
I don’t understand what you mean, if you don’t want to pollute your home directory with a clone of nixpkgs, you can clone it in /tmp. The clone is a choice of nixpkgs-review, mostly to avoid losing time when reviewing many packages (otherwise, each review would download the whole nixpkgs project, that is not so small).
The git config command they ask you to type is just some information that identify your git commits, so you can put any value here (just any time you do a git commit, it will add this information to your commit)
Actually, I’m thinking that you can even do a test without nixpkgs-review, by running simply:
$ nix run github:gaelreyrol/nixpkgs/mqttx-init-1.9.4#mqttx
and if you like it, you can even install it imperatively (see above for declarative instructions) with:
Hello
To be honest, I haven’t yet managed to see a tree view of the topics where i can then use the mouse to look at that one that interests me. The MQTT Explorer can do that ootb and the console application mqttui can also do something similar.
Btw. Yesterday i would like to program my hamradio transceiver with “EDITCP”, but that is not available. I think that i’m not the only one that needs that program. Makes it sense to do a request for it like described here: Package request
Sure, you can always submit a package request. I tried to package the binary, and it seems to work without any issue. To test it, just create a file editcp.nix containing:
# to load the udev rule, add me to services.udev.packages as well (I think you need both here and in
# environment.systemPackages), like:
# {
# environment.systemPackages = [
# # ...
# pkgs.libsForQt5.callPackage ./editcp.nix {}
# ];
# services.udev.packages = [
# pkgs.libsForQt5.callPackage ./editcp.nix {}
# ];
# }
#
{ lib
, stdenv
, fetchurl
, autoPatchelfHook
, wrapQtAppsHook
, libusb
}:
stdenv.mkDerivation rec {
pname = "editcp";
version = "1.0.31";
src = fetchurl {
url = "https://www.farnsworth.org/dale/codeplug/editcp/downloads/linux/editcp-${version}.tar.xz";
sha256 = "sha256-wxj+PMJBynVub+X4W525BkbqMpG4H0afwJPhxF8TFko=";
};
nativeBuildInputs = [ autoPatchelfHook wrapQtAppsHook ];
buildInputs = [ libusb ];
installPhase = ''
mkdir -p $out/bin
mkdir -p $out/lib/udev/rules.d/
cp editcp $out/bin
cp *.rules $out/lib/udev/rules.d/
'';
meta = with lib; {
homepage = "https://github.com/dalefarnsworth-dmr/editcp";
description = "";
longDescription = ''
'';
license = licenses.gpl3;
maintainers = with maintainers; [ tobiasBora ];
};
}
No, completely unrelated to flake here. nix-build is a legacy nix command. To install it systemwise, you just need to write the editcd.nix (the name does not really matter if you adapt the callPackage line) in /etc/nixos/editcd.nix and add the above configuration to your configuration.nix. You also put everything in a single file but it is less readable, hence my use of editcd.nix.
That looks like the line where i added my complete package “collection”, but with = with phks; above. Can i add that in addition , so there are two env…systempackages lines…
Yeah, that’s what I meant (I don’t even think it is legal to have this entry defined twice), just add (pkgs.libsForQt5.callPackage ./editcp.nix {}) in that list (actually, I forgot to add the parens above, make sure to add them. Also,with pkgs; just mean that you can remove the pkgs. if you want)
Great
I was not mentionning build time, but at run time since it might try to access hardware where you need root access or udev rules to allow access to them. If it works without, great. The error you got is just because you tried to run nix-build from the /etc/nixos folder, that is owned by root. But you can build with user rights in any folder owned by the user.
Well, if you don’t plan to run nix-build anymore but only nixos-rebuild switch, sure, you can remove it. If you want to debug this package further with nix-build, you can keep the default.nix: nix-build will just look for this file by default to know what to build; nixos-rebuild will look for other files (/etc/nixos/{flake.nix|configuration.nix}).