diff options
author | Jan Malakhovski <oxij@oxij.org> | 2018-09-06 19:40:16 +0000 |
---|---|---|
committer | Jan Malakhovski <oxij@oxij.org> | 2018-09-06 19:55:55 +0000 |
commit | 88d69df250a546952666ead4068d400446cfec84 (patch) | |
tree | 3befbe35747d4a49550993de3bcdf69b8bbd6228 /pkgs/applications/video | |
parent | 574f2a33c05ccfebe125229468a8540713f6d33b (diff) | |
download | nixlib-88d69df250a546952666ead4068d400446cfec84.tar nixlib-88d69df250a546952666ead4068d400446cfec84.tar.gz nixlib-88d69df250a546952666ead4068d400446cfec84.tar.bz2 nixlib-88d69df250a546952666ead4068d400446cfec84.tar.lz nixlib-88d69df250a546952666ead4068d400446cfec84.tar.xz nixlib-88d69df250a546952666ead4068d400446cfec84.tar.zst nixlib-88d69df250a546952666ead4068d400446cfec84.zip |
kodi: wrapper: simplify
Diffstat (limited to 'pkgs/applications/video')
-rw-r--r-- | pkgs/applications/video/kodi/wrapper.nix | 58 |
1 files changed, 14 insertions, 44 deletions
diff --git a/pkgs/applications/video/kodi/wrapper.nix b/pkgs/applications/video/kodi/wrapper.nix index e6d3fbb090fc..27a7a9d34662 100644 --- a/pkgs/applications/video/kodi/wrapper.nix +++ b/pkgs/applications/video/kodi/wrapper.nix @@ -1,54 +1,24 @@ -{ stdenv, lib, makeWrapper, kodi, plugins }: +{ stdenv, lib, makeWrapper, buildEnv, kodi, plugins }: -let +buildEnv { + name = "kodi-with-plugins-${(builtins.parseDrvName kodi.name).version}"; - p = builtins.parseDrvName kodi.name; - -in - -stdenv.mkDerivation { - - name = "kodi-" + p.version; - version = p.version; + paths = [ kodi ] ++ plugins; + pathsToLink = [ "/share" ]; buildInputs = [ makeWrapper ]; - buildCommand = '' - mkdir -p $out/share/kodi/addons - ${stdenv.lib.concatMapStrings - (plugin: "ln -s ${plugin.out - + plugin.kodiPlugin - + "/" + plugin.namespace - } $out/share/kodi/addons/.;") plugins} - $(for plugin in ${kodi}/share/kodi/addons/* - do - $(ln -s $plugin/ $out/share/kodi/addons/.) - done) - $(for share in ${kodi}/share/kodi/* - do - $(ln -s $share $out/share/kodi/.) - done) - $(for passthrough in icons xsessions applications + postBuild = '' + mkdir $out/bin + for exe in kodi{,-standalone} do - ln -s ${kodi}/share/$passthrough $out/share/ - done) - $(for exe in kodi{,-standalone} - do - makeWrapper ${kodi}/bin/$exe $out/bin/$exe \ - --prefix KODI_HOME : $out/share/kodi; - done) + makeWrapper ${kodi}/bin/$exe $out/bin/$exe \ + --prefix KODI_HOME : $out/share/kodi + done ''; - preferLocalBuild = true; - - meta = with kodi.meta; { - inherit license homepage; - description = description - + " (with plugins: " - + lib.concatStrings (lib.intersperse ", " (map (x: ""+x.name) plugins)) - + ")"; - - platforms = stdenv.lib.platforms.linux; + meta = kodi.meta // { + description = kodi.meta.description + + " (with plugins: ${lib.concatMapStringsSep ", " (x: x.name) plugins})"; }; - } |