summaryrefslogtreecommitdiffstats
path: root/makefu
diff options
context:
space:
mode:
Diffstat (limited to 'makefu')
-rw-r--r--makefu/2configs/stats/telegraf/default.nix19
-rw-r--r--makefu/2configs/stats/telegraf/hamstats.nix60
-rw-r--r--makefu/5pkgs/debmirror/default.nix2
-rw-r--r--makefu/5pkgs/dex2jar/default.nix48
-rw-r--r--makefu/5pkgs/git-xlsx-textconv/default.nix3
-rw-r--r--makefu/5pkgs/shiori/default.nix4
-rw-r--r--makefu/5pkgs/soldat/default.nix118
-rw-r--r--makefu/5pkgs/youtube-dl2kodi/default.nix11
8 files changed, 192 insertions, 73 deletions
diff --git a/makefu/2configs/stats/telegraf/default.nix b/makefu/2configs/stats/telegraf/default.nix
index c60539c71..5a81e2749 100644
--- a/makefu/2configs/stats/telegraf/default.nix
+++ b/makefu/2configs/stats/telegraf/default.nix
@@ -12,13 +12,18 @@ in {
urls = [ url ];
database = "telegraf";
}];
- mqtt = [{
- servers = [ mqtt_server ];
- topic_prefix = "/telegraf";
- data_format = "json";
- qos = 0;
- batch = false;
- }];
+ #file = [{ # debugging
+ # files = [ "stdout" ];
+ # data_format = "influx";
+ #}];
+
+ #mqtt = [{
+ # servers = [ mqtt_server ];
+ # topic_prefix = "/telegraf";
+ # data_format = "json";
+ # qos = 0;
+ # batch = false;
+ #}];
};
};
};
diff --git a/makefu/2configs/stats/telegraf/hamstats.nix b/makefu/2configs/stats/telegraf/hamstats.nix
index 88c1b6d5d..0b1723062 100644
--- a/makefu/2configs/stats/telegraf/hamstats.nix
+++ b/makefu/2configs/stats/telegraf/hamstats.nix
@@ -1,28 +1,60 @@
-{ pkgs, ...}:
+{ pkgs, lib, ...}:
let
- genTopic = name: topic: tags: {
+ genTopic_zigbee = name: tags: {
servers = [ "tcp://localhost:1883" ];
username = "stats";
- password = builtins.readFile <secrets/mqtt/stats>;
+ password = lib.removeSuffix "\n" (builtins.readFile <secrets/mqtt/stats>);
qos = 0;
connection_timeout = "30s";
- topics = [ topic ];
- tags = tags;
+ topics = [ "/ham/zigbee/${name}" ];
+ inherit tags;
persistent_session = false;
- name_override = name;
+ name_override = "zigbee ${tags.room} ${name}";
data_format = "json";
+ json_string_fields = [ "linkquality" "temperature" "humidity" "pressure" "battery" "contact" ];
+ # json_name_key = <filed which defines the name>
+
+ };
+ genTopic_plain = name: topic: tags: {
+ servers = [ "tcp://localhost:1883" ];
+ username = "stats";
+ password = lib.removeSuffix "\n" (builtins.readFile <secrets/mqtt/stats>);
+ qos = 0;
+ connection_timeout = "30s";
+ topics = [ topic ];
+ inherit tags;
+ persistent_session = false;
+ name_override = tags.sensor;
+ data_type = "float";
+ data_format = "value";
# json_query = tags.sensor; #TODO?
};
- hamStat = host:
- sensor:
- (genTopic sensor
- "/ham/${host}/${sensor}/tele/SENSOR"
- {"host" = host;
+ esensor = room: name: sensor:
+ (genTopic_plain sensor ''/ham/${room}/${name}/sensor/${sensor}/state''
+ { inherit room sensor name;
+ "scope" = "ham";
+ } );
+ zsensor = room: name:
+ (genTopic_zigbee name
+ { inherit room name;
"scope" = "ham";
- "sensor" = sensor;
} );
- bme = host: [(hamStat host "BME280")];
+ zigbee_temphum = room: name: [
+ (zsensor room name)
+ ];
+ esphome_temphum = room: name: [
+ (esensor room name ''${room}_${name}_temperature'')
+ (esensor room name ''${room}_${name}_humidity'')
+ (esensor room name ''${room}_${name}_pressure'')
+ ];
in {
- services.telegraf.extraConfig.inputs.mqtt_consumer = (bme "schlafzimmer");
+ services.telegraf.extraConfig.inputs.mqtt_consumer =
+ (zigbee_temphum "Wohnzimmer" "temp1")
+ ++ (zigbee_temphum "Badezimmer" "temp2")
+ ++ (zigbee_temphum "Kinderzimmer" "temp3")
+ ++ (esphome_temphum "arbeitszimmer" "box")
+ ++ (esphome_temphum "schlafzimmer" "plug")
+ ++ (esphome_temphum "wohnzimmer" "plug")
+ ++ (esphome_temphum "terrasse" "plug");
}
diff --git a/makefu/5pkgs/debmirror/default.nix b/makefu/5pkgs/debmirror/default.nix
index 67b34b6ee..d1f007de6 100644
--- a/makefu/5pkgs/debmirror/default.nix
+++ b/makefu/5pkgs/debmirror/default.nix
@@ -1,7 +1,7 @@
{ stdenv, pkgs, fetchgit }:
pkgs.perlPackages.buildPerlPackage rec {
- name = "debmirror-${version}";
+ pname = "debmirror";
version = "2.25";
enableParallelBuilding = true;
diff --git a/makefu/5pkgs/dex2jar/default.nix b/makefu/5pkgs/dex2jar/default.nix
deleted file mode 100644
index 76557ce67..000000000
--- a/makefu/5pkgs/dex2jar/default.nix
+++ /dev/null
@@ -1,48 +0,0 @@
-{ stdenv, lib, pkgs, fetchurl, jre, makeWrapper, unzip }:
-stdenv.mkDerivation rec {
- name = "${packageName}-${version}";
- packageName = "dex2jar";
- version = "2.0";
-
- src = fetchurl {
- url = "mirror://sourceforge/${packageName}/${name}.zip";
- sha256 = "1g3mrbyl8sdw1nhp17z23qbfzqpa0w2yxrywgphvd04jdr6yn1vr";
- };
-
- nativeBuildInputs = [ makeWrapper unzip ];
-
- unpackPhase = ''
- unzip $src
- cd ${name}
- '';
-
- configurePhase = ":";
-
- buildPhase = ''
- rm *.bat
- chmod +x *.sh
- '';
-
- installPhase = ''
- f=$out/lib/dex2jar/
- bin=$out/bin
-
- mkdir -p $f $bin
-
- # fixup path to java
- sed -i 's#^java#${pkgs.jre}/bin/java#' d2j_invoke.sh
-
- mv * $f
- for i in $f/*.sh; do
- n=$(basename ''${i%.sh})
- makeWrapper $i $bin/$n
- done
- '';
- fixupPhase = ":";
-
- meta = {
- homepage = https://sourceforge.net/projects/dex2jar/;
- description = "Tools to work with android .dex and java .class files";
- license = lib.licenses.asl20;
- };
-}
diff --git a/makefu/5pkgs/git-xlsx-textconv/default.nix b/makefu/5pkgs/git-xlsx-textconv/default.nix
index 66dde76ef..ffb9b003c 100644
--- a/makefu/5pkgs/git-xlsx-textconv/default.nix
+++ b/makefu/5pkgs/git-xlsx-textconv/default.nix
@@ -27,4 +27,5 @@ in
sha256 = "055f3caj1y8v7sc2pz9q0dfyi2ij77d499pby4sjfvm5kjy9msdi";
};
propagatedBuildInputs = [ go-xlsx ];
-}).bin
+ #meta.broken = true;
+})
diff --git a/makefu/5pkgs/shiori/default.nix b/makefu/5pkgs/shiori/default.nix
index c604fbbde..ee4aa9304 100644
--- a/makefu/5pkgs/shiori/default.nix
+++ b/makefu/5pkgs/shiori/default.nix
@@ -1,6 +1,6 @@
-{ go_1_12, buildGoPackage, fetchFromGitHub }:
+{ go_1_14, buildGoPackage, fetchFromGitHub }:
let
- builder = buildGoPackage.override { go = go_1_12; };
+ builder = buildGoPackage.override { go = go_1_14; };
in
builder rec {
name = "shiori-${version}";
diff --git a/makefu/5pkgs/soldat/default.nix b/makefu/5pkgs/soldat/default.nix
new file mode 100644
index 000000000..7518ddee5
--- /dev/null
+++ b/makefu/5pkgs/soldat/default.nix
@@ -0,0 +1,118 @@
+{ stdenv,fpc,zip, fetchFromGitHub, autoPatchelfHook, callPackage,
+freetype,openal,x11,SDL2,physfs_2, protobuf, openssl, cmake, ninja,
+meson,pkgconfig, makeWrapper }:
+
+let
+ GameNetworkingSockets = stdenv.mkDerivation rec {
+ pname = "GameNetworkingSockets";
+ version = "2020-02-27";
+
+ src = fetchFromGitHub {
+ sha256 = "1vlrqjpqmdv1gphj2bkqg0bljqxfv75say6vrcnk9z14irih9a24";
+ owner = "ValveSoftware";
+ repo = pname;
+ rev = "36d41513e9a25d7ad4c2b37826d6594aaf185374";
+ };
+
+ mesonFlags = [ "-Dlight_tests=true" ];
+
+ buildInputs = [ protobuf openssl ];
+ nativeBuildInputs = [ pkgconfig meson cmake ninja ];
+ installPhase = ''
+ mkdir -p $out/lib $out/include; find .
+ cp src/libGameNetworkingSockets.so $out/lib/
+ cp -r ../include $out/
+ '';
+
+
+ #outputs = [ "out" "dev" "lib" ];
+
+ meta = with stdenv.lib; {
+ description = "WebDav server implementation and library using libsoup";
+ homepage = "https://wiki.gnome.org/phodav";
+ license = licenses.lgpl21;
+ maintainers = with maintainers; [ gnidorah ];
+ platforms = platforms.linux;
+ };
+ };
+ base = stdenv.mkDerivation {
+ pname = "soldat-base";
+ version = "1.0.0";
+ src = fetchFromGitHub {
+ repo = "base";
+ owner = "soldat";
+ rev = "3c002b9";
+ sha256 = "1wc1cmdavf6ng05wfcpxn124n23vivx4nn06irqmar6jmrklrbq0";
+ };
+ buildInputs = [ zip ];
+ buildPhase = ''
+ sh ./create_smod.sh
+ '';
+ installPhase = ''
+ install -D soldat.smod $out/soldat.smod
+ install -D client/play-regular.ttf $out/play-regular.ttf
+ '';
+ };
+ src = fetchFromGitHub {
+ repo = "soldat";
+ owner = "soldat";
+ rev = "6dee4d0";
+ sha256 = "0jjgdxprlvyf5kh2mb48vrp5nxk3h3jbaxmy7xmna80ssx4bjhxf";
+ };
+ stb = stdenv.mkDerivation {
+ pname = "soldat";
+ version = "1.0.0";
+ inherit src;
+ # makeFlags = [ "CFLAGS='-Fl${openal}/lib'" ];
+ buildPhase = ''
+ cd client
+ mkdir -p build/linux
+ make -C libs/stb/
+ '';
+ installPhase = ''
+ install -D build/libstb.so $out/lib/libstb.so
+ '';
+
+ buildInputs = [ ];
+ };
+in
+stdenv.mkDerivation {
+ pname = "soldat";
+ version = "1.0.0";
+ inherit src;
+ # makeFlags = [ "CFLAGS='-Fl${openal}/lib'" ];
+ buildPhase = ''
+ cd client
+ mkdir -p build/linux
+ make -C libs/stb/
+ make linux_x86_64
+ cd ../server
+ mkdir -p build/linux
+ make linux_x86_64
+ cd ..
+ '';
+
+ # TODO: soldatserver still needs to be copied out of the derivation to somewhere writeable
+ installPhase = ''
+ share=$out/share/soldat
+ bin=$out/bin
+ mkdir -p $share $bin
+
+ install ${base}/soldat.smod $share/soldat.smod
+ install ${base}/play-regular.ttf $share/play-regular.ttf;
+
+ install -m755 client/build/soldat_x64 $share/soldat_x64
+ install client/media/soldat.ico $share/soldat.ico
+
+ install -m755 server/build/soldatserver_x64 $share/soldatserver_x64
+
+ makeWrapper $share/soldat_x64 $bin/soldat --add-flags '-fs_portable 0'
+ makeWrapper $share/soldatserver_x64 $bin/soldatserver --add-flags '-fs_userpath ~/.local/share/Soldat/Soldat'
+ '';
+
+ nativeBuildInputs = [ autoPatchelfHook makeWrapper ];
+ buildInputs = [
+ fpc freetype openal x11 SDL2 physfs_2 GameNetworkingSockets stb
+ ];
+}
+
diff --git a/makefu/5pkgs/youtube-dl2kodi/default.nix b/makefu/5pkgs/youtube-dl2kodi/default.nix
new file mode 100644
index 000000000..dfaab97cb
--- /dev/null
+++ b/makefu/5pkgs/youtube-dl2kodi/default.nix
@@ -0,0 +1,11 @@
+{ writeScriptBin, fetchFromGitHub, python3 }:
+let
+ src = fetchFromGitHub {
+ owner = "makefu";
+ repo = "youtube-dl2kodi";
+ rev = "88abe687842309d7bda0b7ba65b64e8058b855d6";
+ sha256 = "18csv2ighwgdgsm66hvw7fanv1pz522p24q59q2cwqy86fpg9y03";
+ };
+in writeScriptBin "youtube-dl2kodi" ''
+ ${python3}/bin/python ${src}/youtube-dl2kodi.py "$@"
+''