From dc92294a289c9f48c9aa02944dc83920858a4292 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 7 Jun 2015 20:51:34 +0200 Subject: version bump in trivmix --- bragi.nix | 29 ++++++++++++++++++++++++++--- customized/trivmix.nix | 7 ++++--- 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/bragi.nix b/bragi.nix index a64b7fda..1ca3e605 100644 --- a/bragi.nix +++ b/bragi.nix @@ -1,6 +1,16 @@ { config, pkgs, ... }: - -{ +let + makemix = (n: { + wantedBy = [ "sound.target" ]; + requires = [ "jack.service" ]; + serviceConfig = { + Type = "simple"; + ExecStart = "${pkgs.trivmix}/bin/trivmix --client mix --input 'in_${n}' --output 'out_${n}' --dir /run/jackmix_${n}"; + User = "jack"; + Group = "audio;" + }; + }); +in { imports = [ ./bragi-hw.nix @@ -25,7 +35,17 @@ nixpkgs.config.packageOverrides = pkgs: { - trivmix = pkgs.callPackage ./customized/trivmix.nix {}; + trivmix = let trivmix = pkgs.callPackage ./customized/trivmix.nix {}; in + stdenv.mkDerivation { + name = "trivmix-wrapper"; + nativeBuildInputs = [ pkgs.makeWrapper ]; + buildCommand = '' + mkdir -p $out/bin + makeWrapper ${trivmix}/bin/trivmix $out/bin/trivmix \ + --run "umask 0" \ + --set JACK_PROMISCUOUS_SERVER 1 + ''; + }; jack2 = pkgs.callPackage ./customized/jack2.nix {}; mpd = pkgs.callPackage ./customized/mpd.nix { gmeSupport = false; @@ -82,6 +102,9 @@ }; }; + systemd.services."trivmix_0" = (makemix 0); + systemd.services."trivmix_1" = (makemix 1); + services.mpd = { enable = true; musicDirectory = "/media/odin/music"; diff --git a/customized/trivmix.nix b/customized/trivmix.nix index aefc09e5..6c4417fd 100644 --- a/customized/trivmix.nix +++ b/customized/trivmix.nix @@ -1,16 +1,17 @@ # This file was auto-generated by cabal2nix. Please do NOT edit manually! { cabal, filepath, hinotify, jack, optparseApplicative +, fetchgit , transformers }: cabal.mkDerivation (self: { pname = "trivmix"; - version = "0.0.0"; + version = "0.1.0"; src = fetchgit { url = git://git.yggdrasil.li/trivmix; - rev = "bd7874ef606ae78bb8b626bd01906481feb784d6"; - sha256 = "284f2b38daf7685ad9d92f39872cdf78c870b1997a8d8ac027fd75d187a505ea"; + rev = "5e46af12608b35b73b7ac1f83e59585671d19e48"; + sha256 = "4e78ddb3a3118ac99f64a927cc3166e2c5b898ac31242ec7b5494d8efd3e8ec4"; }; isLibrary = false; isExecutable = true; -- cgit v1.2.3