Jump to content


Photo

Newer releases won't run on NixOS, System.IO.IOException: Read-only file system

NixOS Permissions

  • Please log in to reply
2 replies to this topic

#1 jonasem OFFLINE  

jonasem

    Newbie

  • Members
  • 2 posts
  • Local time: 08:05 PM

Posted 14 August 2019 - 03:04 PM

I am unable to run 4.2.1.0 on NixOS. Last known running version is 4.0.1.0.

 

I am getting the following error:

Aug 14 18:42:31 nixos systemd[1]: Started Emby Media Server.
Aug 14 18:42:31 nixos emby[13309]: Unhandled Exception: System.IO.IOException: Read-only file system
Aug 14 18:42:31 nixos emby[13309]:    at System.IO.FileSystem.CreateDirectory(String fullPath)
Aug 14 18:42:31 nixos emby[13309]:    at System.IO.Directory.CreateDirectory(String path)
Aug 14 18:42:31 nixos emby[13309]:    at EmbyServer.Support.ApplicationPathProvider.GetProgramDataPath(String applicationPath, IEnvironmentInfo environment)
Aug 14 18:42:31 nixos emby[13309]:    at EmbyServer.Support.ApplicationPathProvider.CreateApplicationPaths(String applicationPath, String programDataPath, IEnvironmentInfo environment)
Aug 14 18:42:31 nixos emby[13309]:    at EmbyServer.Program.Main(String[] args)
Aug 14 18:42:31 nixos systemd[1]: emby.service: Main process exited, code=killed, status=6/ABRT
Aug 14 18:42:31 nixos systemd[1]: emby.service: Failed with result 'signal'.
Aug 14 18:42:31 nixos systemd[1]: emby.service: Service RestartSec=100ms expired, scheduling restart.
Aug 14 18:42:31 nixos systemd[1]: emby.service: Scheduled restart job, restart counter is at 4.
Aug 14 18:42:31 nixos systemd[1]: Stopped Emby Media Server.

Has Emby started requiring write permissions in any other directory than the "-programdata"-directory?



#2 jonasem OFFLINE  

jonasem

    Newbie

  • Members
  • 2 posts
  • Local time: 08:05 PM

Posted 14 August 2019 - 04:35 PM

I am not sure what was wrong but it is working for me now.

 

Here is my config if anyone runs into a similar issue:

{ stdenv, fetchurl, unzip, sqlite, makeWrapper, dotnet-sdk, ffmpeg }:

stdenv.mkDerivation rec {
  name = "emby-${version}";
  version = "4.3.0.2";

  # We are fetching a binary here, however, a source build is possible.
  # See -> https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=emby-server-git#n43
  # Though in my attempt it failed with this error repeatedly
  # The type 'Attribute' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.
  # This may also need msbuild (instead of xbuild) which isn't in nixpkgs
  # See -> https://github.com/NixOS/nixpkgs/issues/29817
  src = fetchurl {
    url = "https://github.com/MediaBrowser/Emby.Releases/releases/download/${version}/embyserver-netcore_${version}.zip";
    sha256 = "0v2z9gqm3c33q49579z30zff39k8r4513lzkzqz6yjh4cikvpl5g";
  };

  buildInputs = [
    unzip
    makeWrapper
  ];

  propagatedBuildInputs = [
    dotnet-sdk
    sqlite
  ];

  preferLocalBuild = true;

  buildPhase = ''
    rm -rf {electron,runtimes}
  '';

  installPhase = ''
    install -dm 755 "$out/opt/emby-server"
    cp -r * "$out/opt/emby-server"
    makeWrapper "${dotnet-sdk}/bin/dotnet" $out/bin/emby \
      --prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath [
        sqlite
      ]}" \
      --add-flags "$out/opt/emby-server/EmbyServer.dll -ffmpeg ${ffmpeg}/bin/ffmpeg -ffprobe ${ffmpeg}/bin/ffprobe"
  '';

  meta =  with stdenv.lib; {
    description = "MediaBrowser - Bring together your videos, music, photos, and live television";
    homepage = https://emby.media/;
    license = licenses.gpl2;
    maintainers = with maintainers; [ fadenb ];
    platforms = platforms.all;
  };
}


#3 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 135983 posts
  • Local time: 02:05 PM

Posted 14 August 2019 - 05:35 PM

Hi there, thanks for the feedback. To answer this question:

 

 

Has Emby started requiring write permissions in any other directory than the "-programdata"-directory?

 

The answer is no, we have not.







Also tagged with one or more of these keywords: NixOS, Permissions

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users