Add booster add-on configuration #4
5
README
5
README
@ -8,3 +8,8 @@
|
||||
* sudo nixos-rebuild boot
|
||||
* sudo nix-collect-garbage -d
|
||||
* history clear
|
||||
|
||||
Add-on for Boosters:
|
||||
* copy `booster` to the /opt
|
||||
* mkdir -p ~/.config/nixpkgs && echo '{permittedInsecurePackages = ["electron-9*"];}' > ~/.config/nixpkgs/config.nix
|
||||
* echo 'For Booster-related apps, use `nix-shell /opt/booster/booster_shell.nix`' > ~/README.md
|
27
booster/booster_shell.nix
Normal file
27
booster/booster_shell.nix
Normal file
@ -0,0 +1,27 @@
|
||||
let
|
||||
|
||||
pkgs = import <nixpkgs> { };
|
||||
|
||||
mqtt-explorer = pkgs.callPackage /opt/booster/mqtt-explorer.nix {} ;
|
||||
gmqtt = pkgs.callPackage /opt/booster/gmqtt.nix {};
|
||||
miniconf = pkgs.callPackage /opt/booster/miniconf.nix {};
|
||||
|
||||
|
||||
in
|
||||
pkgs.mkShell {
|
||||
buildInputs = [
|
||||
(pkgs.python3.withPackages(ps: [
|
||||
ps.numpy
|
||||
ps.setuptools
|
||||
ps.matplotlib
|
||||
gmqtt
|
||||
miniconf
|
||||
]))
|
||||
pkgs.libtool
|
||||
sb10q
commented
What would one need libtool for? What would one need libtool for?
|
||||
pkgs.libusb1
|
||||
pkgs.mosquitto
|
||||
pkgs.libftdi
|
||||
pkgs.cutecom
|
||||
mqtt-explorer
|
||||
];
|
||||
}
|
||||
|
32
booster/gmqtt.nix
Normal file
32
booster/gmqtt.nix
Normal 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" ;
|
||||
sb10q
commented
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";
|
||||
};
|
||||
}
|
22
booster/miniconf.nix
Normal file
22
booster/miniconf.nix
Normal file
@ -0,0 +1,22 @@
|
||||
{ stdenv, lib, python3Packages, callPackage, fetchgit, makeWrapper }:
|
||||
|
||||
let
|
||||
gmqtt = callPackage /opt/booster/gmqtt.nix {};
|
||||
in
|
||||
sb10q
commented
indentation indentation
|
||||
python3Packages.buildPythonPackage rec {
|
||||
pname = "miniconf";
|
||||
version = "0.1.0";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/quartiq/miniconf";
|
||||
rev = "01caac4adb3f81cbcd34d8a48087f5df962c096f";
|
||||
sha256 = "sha256-ssRV4FtdMehPA4+mKQ4Ub+wtEakpKX5jXRubFtHpanA=";
|
||||
};
|
||||
prePatch = ''
|
||||
cd py/miniconf-mqtt
|
||||
'';
|
||||
doCheck = false;
|
||||
propagatedBuildInputs = [
|
||||
# Specify dependencies
|
||||
gmqtt
|
||||
];
|
||||
}
|
20
booster/mqtt-explorer.nix
Normal file
20
booster/mqtt-explorer.nix
Normal file
@ -0,0 +1,20 @@
|
||||
{ stdenv, lib, fetchurl, appimageTools, electron_9, makeWrapper }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
sb10q
commented
stdenvNoCC? stdenvNoCC?
|
||||
pname = "MQTT-Explorer";
|
||||
version = "0.4.0-beta1";
|
||||
src = appimageTools.extract {
|
||||
name = pname;
|
||||
src = fetchurl {
|
||||
url = "https://github.com/thomasnordquist/${pname}/releases/download/0.0.0-${version}/${pname}-${version}.AppImage";
|
||||
sha256 = "0x9ava13hn1nkk2kllh5ldi4b3hgmgwahk08sq48yljilgda4ppn";
|
||||
};
|
||||
};
|
||||
buildInputs = [ makeWrapper ];
|
||||
installPhase = ''
|
||||
install -m 444 -D resources/app.asar $out/libexec/app.asar
|
||||
install -m 444 -D mqtt-explorer.png $out/share/icons/mqtt-explorer.png
|
||||
install -m 444 -D mqtt-explorer.desktop $out/share/applications/mqtt-explorer.desktop
|
||||
sb10q
commented
Does this work? Does this work?
|
||||
makeWrapper ${electron_9}/bin/electron $out/bin/mqtt-explorer --add-flags $out/libexec/app.asar
|
||||
sb10q
commented
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?
esavkin
commented
Not sure about recommended way, but changed to appimage-run Not sure about recommended way, but changed to appimage-run
|
||||
'';
|
||||
}
|
Loading…
Reference in New Issue
Block a user
Use relative paths.