From e22014ed4fe262250bc9350a78368dea884a3dee Mon Sep 17 00:00:00 2001 From: ash Date: Tue, 5 Oct 2021 21:47:06 +0100 Subject: [PATCH 1/2] maintainers: add sersorrel --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index e34f9e823e1f..613283beea61 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -10122,6 +10122,12 @@ githubId = 307899; name = "Gurkan Gur"; }; + sersorrel = { + email = "ash@sorrel.sh"; + github = "sersorrel"; + githubId = 9433472; + name = "ash"; + }; servalcatty = { email = "servalcat@pm.me"; github = "servalcatty"; From 0b4c16d22904738640cb7b8b5d7330c2d4749f2e Mon Sep 17 00:00:00 2001 From: ash Date: Tue, 5 Oct 2021 21:59:19 +0100 Subject: [PATCH 2/2] hushboard: init at unstable-2021-03-17 --- pkgs/applications/audio/hushboard/default.nix | 73 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 75 insertions(+) create mode 100644 pkgs/applications/audio/hushboard/default.nix diff --git a/pkgs/applications/audio/hushboard/default.nix b/pkgs/applications/audio/hushboard/default.nix new file mode 100644 index 000000000000..e9d88d1f236f --- /dev/null +++ b/pkgs/applications/audio/hushboard/default.nix @@ -0,0 +1,73 @@ +{ lib +, buildPythonApplication +, fetchFromGitHub +, gobject-introspection +, gtk3 +, libappindicator +, libpulseaudio +, librsvg +, pycairo +, pygobject3 +, six +, wrapGAppsHook +, xlib +}: + +buildPythonApplication { + pname = "hushboard"; + version = "unstable-2021-03-17"; + + src = fetchFromGitHub { + owner = "stuartlangridge"; + repo = "hushboard"; + rev = "c16611c539be111891116a737b02c5fb359ad1fc"; + sha256 = "06jav6j0bsxhawrq31cnls8zpf80fpwk0cak5s82js6wl4vw2582"; + }; + + nativeBuildInputs = [ + wrapGAppsHook + ]; + + buildInputs = [ + gobject-introspection + gtk3 + libappindicator + libpulseaudio + ]; + + propagatedBuildInputs = [ + pycairo + pygobject3 + six + xlib + ]; + + postPatch = '' + substituteInPlace hushboard/_pulsectl.py \ + --replace "ctypes.util.find_library('libpulse') or 'libpulse.so.0'" "'${libpulseaudio}/lib/libpulse.so.0'" + substituteInPlace snap/gui/hushboard.desktop \ + --replace "\''${SNAP}/hushboard/icons/hushboard.svg" "hushboard" + ''; + + postInstall = '' + # Fix tray icon, see e.g. https://github.com/NixOS/nixpkgs/pull/43421 + wrapProgram $out/bin/hushboard \ + --set GDK_PIXBUF_MODULE_FILE "${librsvg.out}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache" + + mkdir -p $out/share/applications $out/share/icons/hicolor/{scalable,512x512}/apps + cp snap/gui/hushboard.desktop $out/share/applications + cp hushboard/icons/hushboard.svg $out/share/icons/hicolor/scalable/apps + cp hushboard-512.png $out/share/icons/hicolor/512x512/apps/hushboard.png + ''; + + # There are no tests + doCheck = false; + + meta = with lib; { + homepage = "https://kryogenix.org/code/hushboard/"; + license = licenses.mit; + description = "Mute your microphone while typing"; + platforms = platforms.linux; + maintainers = with maintainers; [ sersorrel ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7fce4f1836af..4a4a4192553b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -25207,6 +25207,8 @@ with pkgs; go-org = callPackage ../applications/misc/go-org { }; + hushboard = python3.pkgs.callPackage ../applications/audio/hushboard { }; + hydrogen = qt5.callPackage ../applications/audio/hydrogen { }; hydrogen_0 = callPackage ../applications/audio/hydrogen/0.nix { }; # Old stable, has GMKit.