Add booster add-on configuration #4

Open
esavkin wants to merge 2 commits from esavkin/defenestrate:booster-addon into master
6 changed files with 82 additions and 0 deletions

2
README
View File

@ -8,3 +8,5 @@
* sudo nixos-rebuild boot * sudo nixos-rebuild boot
* sudo nix-collect-garbage -d * sudo nix-collect-garbage -d
* history clear * history clear
Add-on for Boosters: uncomment packages in configuration.nix before auto-install.

32
booster/gmqtt.nix Normal file
View File

@ -0,0 +1,32 @@
{ stdenv, lib, python3Packages, fetchFromGitHub, fetchgit, makeWrapper, pkgs }:
python3Packages.buildPythonPackage rec {
name = "gmqtt";
version = "v0.6.12";
src = fetchFromGitHub {
owner = "wialon";
Outdated
Review

inconsistent indentation

inconsistent indentation
repo = "gmqtt";
rev = "190d12156890efcfc5099fea0f7ef3ce072c4a27";
sha256 = "sha256-lhvRRZsrJy2U7b705GTlquAP/LwKEmInuVC4zzivmKk=";
};
buildInputs = [
(pkgs.python3.withPackages (ps: [
ps.codecov
ps.pytest-asyncio
ps.pytest
ps.pytestcov
ps.six
ps.uvloop
ps.more-itertools
ps.atomicwrites
]))
];
propagatedBuildInputs = with pkgs.python3Packages; [ setproctitle ];
meta = {
homepage = "https://github.com/wialon/gmqtt";
description = "gmqtt";
};
}

20
booster/miniconf.nix Normal file
View File

@ -0,0 +1,20 @@
{ stdenv, lib, python3Packages, callPackage, fetchgit, makeWrapper }:
let gmqtt = callPackage ./gmqtt.nix { };
in python3Packages.buildPythonPackage rec {
pname = "miniconf";
Outdated
Review

indentation

indentation
version = "0.1.0";
src = fetchgit {
url = "https://github.com/quartiq/miniconf";
rev = "01caac4adb3f81cbcd34d8a48087f5df962c096f";
sha256 = "sha256-Gco56sl2mQ2y+M1evzLhtuFvrhJZbAvbIq7N6J9uiFE=";
};
prePatch = ''
cd py/miniconf-mqtt
'';
doCheck = false;
propagatedBuildInputs = [
# Specify dependencies
gmqtt
];
}

18
booster/mqtt-explorer.nix Normal file
View File

@ -0,0 +1,18 @@
{ stdenvNoCC, lib, fetchurl, appimage-run, makeWrapper, symlinkJoin }:
let
Outdated
Review

stdenvNoCC?

stdenvNoCC?
pname = "MQTT-Explorer";
version = "0.4.0-beta1";
mqtt-explorer = fetchurl {
url ="https://github.com/thomasnordquist/${pname}/releases/download/0.0.0-${version}/${pname}-${version}.AppImage";
sha256 = "0x9ava13hn1nkk2kllh5ldi4b3hgmgwahk08sq48yljilgda4ppn";
};
in symlinkJoin {
name = "mqtt-explorer";
paths = [ appimage-run ];
buildInputs = [ makeWrapper ];
postBuild = ''
mv $out/bin/appimage-run $out/bin/mqtt-explorer
wrapProgram $out/bin/mqtt-explorer --add-flags "${mqtt-explorer}"
'';
Outdated
Review

Does this work?

Does this work?
}
Outdated
Review

Isn't the electron bloatware already included in the appimage binary? Is using the nixpkgs version instead the recommended way?

Isn't the electron bloatware already included in the appimage binary? Is using the nixpkgs version instead the recommended way?

Not sure about recommended way, but changed to appimage-run

Not sure about recommended way, but changed to appimage-run

View File

@ -40,6 +40,7 @@ let
mount /dev/disk/by-label/boot /mnt/boot mount /dev/disk/by-label/boot /mnt/boot
nixos-generate-config --root /mnt nixos-generate-config --root /mnt
cp ${./final}/* /mnt/etc/nixos cp ${./final}/* /mnt/etc/nixos
cp ${./booster}/* /mnt/etc/nixos/
nixos-install --no-root-password --flake /mnt/etc/nixos#artiq nixos-install --no-root-password --flake /mnt/etc/nixos#artiq
''; '';

View File

@ -55,6 +55,9 @@
pyserial pyserial
spyder spyder
artiq.packages.x86_64-linux.artiq artiq.packages.x86_64-linux.artiq
## Booster python packages:
# (callPackage ./gmqtt.nix { })
# (callPackage ./miniconf.nix { })
])) ]))
artiq.packages.x86_64-linux.openocd-bscanspi artiq.packages.x86_64-linux.openocd-bscanspi
texlive.combined.scheme-full texlive.combined.scheme-full
@ -69,6 +72,12 @@
gnome3.gnome-tweaks gnome3.gnome-tweaks
libreoffice-fresh libreoffice-fresh
vscode vscode
## Booster packages:
# mosquitto
# libftdi
# libusb1
# cutecom
# (pkgs.callPackage ./mqtt-explorer.nix { })
]; ];
programs.wireshark.enable = true; programs.wireshark.enable = true;
programs.wireshark.package = pkgs.wireshark; programs.wireshark.package = pkgs.wireshark;