diff options
author | David Morgan <djm_uk@protonmail.com> | 2023-01-12 16:51:02 +0000 |
---|---|---|
committer | David Morgan <djm_uk@protonmail.com> | 2023-01-12 16:51:02 +0000 |
commit | 92f56b3048c9879f5b7651412784870aecca1cf1 (patch) | |
tree | 1c7c68f7061c71182c627f8d375ed5ea0a4829ad /nix-conf | |
parent | a80fb848199ca82a261e05f190bb4ff53e3a9d22 (diff) | |
download | dotfiles-92f56b3048c9879f5b7651412784870aecca1cf1.tar.gz |
Make mopidy extensions work
Diffstat (limited to 'nix-conf')
-rw-r--r-- | nix-conf/home/includes/darwin.nix | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/nix-conf/home/includes/darwin.nix b/nix-conf/home/includes/darwin.nix index 2754648..134620c 100644 --- a/nix-conf/home/includes/darwin.nix +++ b/nix-conf/home/includes/darwin.nix @@ -1,4 +1,27 @@ -{ config, pkgs, ... }: +{ config, lib, pkgs, ... }: + +with lib; +let + mopidyExtensions = with pkgs; [ + mopidy-iris + mopidy-local + mopidy-mpd + mopidy-muse + mopidy-ytmusic + ]; + + # https://github.com/nix-community/home-manager/blob/ce563f591195cf363bca382fe02ea5ca87754773/modules/services/mopidy.nix#L22 + mopidy-with-extensions = pkgs.buildEnv { + name = "mopidy-with-extensions-${pkgs.mopidy.version}"; + paths = closePropagation mopidyExtensions; + pathsToLink = [ "/${pkgs.mopidyPackages.python.sitePackages}" ]; + buildInputs = [ pkgs.makeWrapper ]; + postBuild = '' + makeWrapper ${pkgs.mopidy}/bin/mopidy $out/bin/mopidy \ + --prefix PYTHONPATH : $out/${pkgs.mopidyPackages.python.sitePackages} + ''; + }; +in { imports = [ ./dev-common.nix @@ -17,12 +40,7 @@ #adoptopenjdk-hotspot-bin-8 #lima minikube - mopidy - mopidy-iris - #mopidy-local - mopidy-mpd - mopidy-muse - mopidy-ytmusic + mopidy-with-extensions mpdscribble mpc-cli mpd |