From c743b9e53c4dfe2a39409c8bd01f373ce86b8e06 Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 16 Nov 2020 21:37:03 +0100 Subject: ma pkgs.droidcam: init software + kernel module --- makefu/5pkgs/droidcam/default.nix | 55 ++++++++++++++++++++++++++++++++ makefu/5pkgs/v4l2loopback-dc/default.nix | 36 +++++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 makefu/5pkgs/droidcam/default.nix create mode 100644 makefu/5pkgs/v4l2loopback-dc/default.nix (limited to 'makefu/5pkgs') diff --git a/makefu/5pkgs/droidcam/default.nix b/makefu/5pkgs/droidcam/default.nix new file mode 100644 index 000000000..d30fb01a6 --- /dev/null +++ b/makefu/5pkgs/droidcam/default.nix @@ -0,0 +1,55 @@ +{ stdenv, fetchFromGitHub +, pkg-config +, alsaLib +, libjpeg_turbo +, ffmpeg +, libusbmuxd +, speex +, gtk3 +, libappindicator-gtk3 +}: + +stdenv.mkDerivation rec { + pname = "droidcam"; + version = "1.6"; + + src = fetchFromGitHub { + owner = "aramg"; + repo = "droidcam"; + rev = "v${version}"; + sha256 = "1d9qpnmqa3pfwsrpjnxdz76ipk4w37bbxyrazchh4vslnfc886fx"; + }; + + sourceRoot = "source/linux"; + + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ + alsaLib + libjpeg_turbo + ffmpeg + libusbmuxd + speex + gtk3 + libappindicator-gtk3 + ]; + + buildPhase = '' + runHook preBuild + make JPEG_DIR="" JPEG_INCLUDE="" JPEG_LIB="" JPEG="$(pkg-config --libs --cflags libturbojpeg)" + ''; + installPhase = '' + runHook preInstall + install -Dm755 "droidcam" "$out/bin/droidcam" + install -Dm755 "droidcam-cli" "$out/bin/droidcam-cli" + install -Dm644 icon2.png "$out/share/pixmaps/droidcam.png" + install -Dm644 README.md "$out/share/licenses/droidcam/LICENSE" + ''; + + meta = with stdenv.lib; { + description = "A kernel module to create V4L2 loopback devices"; + homepage = "https://github.com/aramg/droidcam"; + license = licenses.gpl2; + maintainers = [ maintainers.makefu ]; + platforms = platforms.linux; + }; +} diff --git a/makefu/5pkgs/v4l2loopback-dc/default.nix b/makefu/5pkgs/v4l2loopback-dc/default.nix new file mode 100644 index 000000000..2bb9d3d0b --- /dev/null +++ b/makefu/5pkgs/v4l2loopback-dc/default.nix @@ -0,0 +1,36 @@ +{ stdenv, fetchFromGitHub, kernel, kmod }: + +stdenv.mkDerivation rec { + name = "v4l2loopback-dc-${version}-${kernel.version}"; + version = "1.6"; + + src = fetchFromGitHub { + owner = "aramg"; + repo = "droidcam"; + rev = "v${version}"; + sha256 = "1d9qpnmqa3pfwsrpjnxdz76ipk4w37bbxyrazchh4vslnfc886fx"; + }; + + sourceRoot = "source/linux/v4l2loopback"; + + buildTargets = "v4l2loopback-dc"; + hardeningDisable = [ "pic" ]; + + nativeBuildInputs = kernel.moduleBuildDependencies; + buildInputs = [ kmod ]; + + + makeFlags = [ + "KERNELRELEASE=${kernel.modDirVersion}" + "KERNEL_DIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" + "INSTALL_MOD_PATH=$(out)" + ]; + + meta = with stdenv.lib; { + description = "A kernel module to create V4L2 loopback devices"; + homepage = "https://github.com/aramg/droidcam"; + license = licenses.gpl2; + maintainers = [ maintainers.makefu ]; + platforms = platforms.linux; + }; +} -- cgit v1.2.3 From e824baec5ed0f42b6002632295ab241e9c7a80c7 Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 16 Nov 2020 21:37:51 +0100 Subject: ma pkgs.kalauerbot: use patched matrix-client --- makefu/5pkgs/kalauerbot/badsync.patch | 14 ++++++++++++++ makefu/5pkgs/kalauerbot/default.nix | 7 ++++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 makefu/5pkgs/kalauerbot/badsync.patch (limited to 'makefu/5pkgs') diff --git a/makefu/5pkgs/kalauerbot/badsync.patch b/makefu/5pkgs/kalauerbot/badsync.patch new file mode 100644 index 000000000..842129b94 --- /dev/null +++ b/makefu/5pkgs/kalauerbot/badsync.patch @@ -0,0 +1,14 @@ +diff --git a/matrix_client/client.py b/matrix_client/client.py +index af0e08f..f848c4f 100644 +--- a/matrix_client/client.py ++++ b/matrix_client/client.py +@@ -471,7 +471,7 @@ class MatrixClient(object): + self._sync(timeout_ms) + + def listen_forever(self, timeout_ms=30000, exception_handler=None, +- bad_sync_timeout=5): ++ bad_sync_timeout=61): + """ Keep listening for events forever. + + Args: + diff --git a/makefu/5pkgs/kalauerbot/default.nix b/makefu/5pkgs/kalauerbot/default.nix index 2cecbc3f2..ee90fdeec 100644 --- a/makefu/5pkgs/kalauerbot/default.nix +++ b/makefu/5pkgs/kalauerbot/default.nix @@ -8,7 +8,12 @@ rev = "08d98aa"; sha256 = "017hh61smgq4zsxd10brgwmykwgwabgllxjs31xayvs1hnqmkv2v"; }; propagatedBuildInputs = with python3.pkgs;[ - (callPackage ./python-matrixbot.nix {}) + (callPackage ./python-matrixbot.nix { + matrix-client = (stdenv.lib.overrideDerivation matrix-client (self: { + patches = [ ./badsync.patch ]; + })); + }) + (stdenv.lib.overrideDerivation googletrans (self: { patches = [ ./translate.patch ]; })) -- cgit v1.2.3 From 414358df3cb25d004600628bd62be88c412f30d4 Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 16 Nov 2020 22:41:58 +0100 Subject: ma pkgs.navi: rip --- makefu/5pkgs/navi/default.nix | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 makefu/5pkgs/navi/default.nix (limited to 'makefu/5pkgs') diff --git a/makefu/5pkgs/navi/default.nix b/makefu/5pkgs/navi/default.nix deleted file mode 100644 index 1e8274f80..000000000 --- a/makefu/5pkgs/navi/default.nix +++ /dev/null @@ -1,37 +0,0 @@ -# via https://git.ingolf-wagner.de/palo/nixos-config/src/master/pkgs/navi/default.nix - -{ rustPlatform, fetchFromGitHub, stdenv, fzf, makeWrapper, openssl, pkgconfig }: - -rustPlatform.buildRustPackage rec { - pname = "navi"; - version = "2.1.1"; - - src = fetchFromGitHub { - owner = "denisidoro"; - repo = "navi"; - rev = "v${version}"; - #rev = "${version}"; - sha256 = "1195f7c3ij2mkv0k1h9fwn6jkyjb01w0p6mj2xc39w5f6i0c0hwp"; - }; - - cargoSha256 = "0ks25w0dncaiw3ma05r8jrng3cczancrynnpgdksbvgz49lg3wjw"; - - postInstall = '' - mkdir -p $out/share/navi/ - mv shell $out/share/navi/ - - wrapProgram "$out/bin/navi" \ - --suffix "PATH" : "${fzf}/bin" - ''; - buildInputs = [ openssl ]; - nativeBuildInputs = [ makeWrapper pkgconfig ]; - - meta = with stdenv.lib; { - description = "An interactive cheatsheet tool for the command-line"; - homepage = "https://github.com/denisidoro/navi"; - license = licenses.asl20; - platforms = platforms.unix; - maintainers = with maintainers; [ mrVanDalo ]; - }; -} - -- cgit v1.2.3 From c5a1724aa6332a31113ee1a9f0b3bc4741b966b2 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 18 Nov 2020 23:49:07 +0100 Subject: ma pkgs.hactool: rip --- makefu/5pkgs/hactool/default.nix | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 makefu/5pkgs/hactool/default.nix (limited to 'makefu/5pkgs') diff --git a/makefu/5pkgs/hactool/default.nix b/makefu/5pkgs/hactool/default.nix deleted file mode 100644 index 0bdaeb4be..000000000 --- a/makefu/5pkgs/hactool/default.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ lib, stdenv, fetchFromGitHub -}: -stdenv.mkDerivation rec { - pname = "hactool"; - name = "${pname}-${version}"; - version = "1.4.0"; - - src = fetchFromGitHub { - owner = "SciresM"; - repo = "hactool"; - rev = version; - sha256 = "0305ngsnwm8npzgyhyifasi4l802xnfz19r0kbzzniirmcn4082d"; - }; - preBuild = '' - cp config.mk.template config.mk - ''; - installPhase = '' - install -D hactool $out/bin/hactool - ''; - buildInputs = [ ]; - nativeBuildInputs = [ ]; - - meta = { - description = "tool to view information about, decrypt, and extract common file formats for the Nintendo Switch, especially Nintendo Content Archives"; - homepage = https://github.com/SciresM/hactool; - license = stdenv.lib.licenses.isc; - platforms = stdenv.lib.platforms.linux; - maintainers = with stdenv.lib.maintainers; [ makefu ]; - }; -} -- cgit v1.2.3