anchor.diff:      phases = [ "unpackPhase" "patchPhase" "installPhase" "checkPhase" ];
   
       unpackCmd = let
  -      soPath =
  +      widevineCdmPath =
           if upstream-info.channel == "stable" then
  -          "./opt/google/chrome/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so"
  +          "./opt/google/chrome/WidevineCdm"
           else if upstream-info.channel == "beta" then
  -          "./opt/google/chrome-beta/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so"
  +          "./opt/google/chrome-beta/WidevineCdm"
           else if upstream-info.channel == "dev" then
  -          "./opt/google/chrome-unstable/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so"
  +          "./opt/google/chrome-unstable/WidevineCdm"
           else
             throw "Unknown chromium channel.";
       in ''
  -      mkdir -p plugins
  -      # Extract just libwidevinecdm.so from upstream's .deb file
  -      ar p "$src" data.tar.xz | tar xJ -C plugins ${soPath}
  -      mv plugins/${soPath} plugins/
  -      rm -rf plugins/opt
  +      # Extract just WidevineCdm from upstream's .deb file
  +      ar p "$src" data.tar.xz | tar xJ "${widevineCdmPath}"
  +
  +      # Move things around so that we don't have to reference a particular
  +      # chrome-* directory later.
  +      mv "${widevineCdmPath}" ./
  +
  +      # unpackCmd wants a single output directory; let it take WidevineCdm/
  +      rm -rf opt
       '';
   
       doCheck = true;
  
positive.code:   };
  
    mkrpath = p: "${lib.makeSearchPathOutput "lib" "lib64" p}:${lib.makeLibraryPath p}";
    widevine = let upstream-info = chromium.upstream-info; in stdenv.mkDerivation {
      name = "chromium-binary-plugin-widevine";
  
      # The .deb file for Google Chrome
      src = upstream-info.binary;
  
negative.code:     PATCH_RPATH = mkrpath [ gcc.cc glib nspr nss ];
  
      patchPhase = ''
        patchelf --set-rpath "$PATCH_RPATH" _platform_specific/linux_x64/libwidevinecdm.so
      '';
  
      installPhase = ''
        mkdir -p $out/WidevineCdm
        cp -a * $out/WidevineCdm/
      '';
  
      meta = {
  