Possible to install NextPVR

Is it possible to install NextPVRV5 in Nix? NextPVR is a personal video recorder that I have used on Arch and other linux distributions to record TV programming. NextPVR nstalls from a zip file, NPVR.zip. Unzip into directory in $HOME/NPVR.

NPVR requires aspnetcore-runtime-3.1.2
mediainfo
libmediainfo-dev
libc6 I need to check but I am almost certain it works with glibc
libgdiplus
ffmpeg

I unzipped NPVR.zip into $HOME/NPVR
installed aspnetcore-runtime-3.1.2
mediainfo-19.09
libmediainfo-19.09
glibc-2.30
libgdiplus-6.04
ffmpeg-4.22

To start NextPVR first run find . -name DeviceHostLinux -exec chmod 755 {} \;
Next, I run /home/craig/.nix-profile/bin/dotnet ~/NPVR/./NextPVRServer.dll
program is then accessed from 127.0.0.1:8866

The program does start up with an error “Unexpected error loading settings!”. Also, no devices show up, meaning my Hauppauge QuadHD-TV tuner. I tried installing and running w_scan-2017-0107 and it did search for and find all the local ATSC stations so the tuner seems to be functioning properly.

I am uncertain if I need to create a Nix expression and being a noob not really sure how. I’ve done some reading and decided maybe I am going down the wrong path so before I go too far into the rabbit hole I thought I would ask for help.

Thanks in advance and I hope I formatted my question appropriately,

Craig

Hi cdinger,

I have a few notes that may help.

When I package something, I start with a directory that contains my source and a default.nix file. I then start writing an expression that calls stdenv.mkDerivation or a language-specific function with a name, version and src.

So to make this concrete, I would start with something like (note: not tested or even checked in any way, also I don’t know what version this is):

let
  nixpkgs = import <nixpkgs>;
in nixpkgs.stdenv.mkDerivation {
  src = ./NPVR.zip;
  name = "NextPVR";
  version = "1.0.0";
}  

Then I start resolving the errors until It compiles/evaluates correctly. Generally this involves adding dependencies to buildInputs and build-time-only deps to native-build-inputs. You may also get some inspiration by searching for something else that depends on aspnetcore_3_1. (I found jellyfin https://github.com/NixOS/nixpkgs/blob/4bbb0e83b1f1d6f16907683676902d9a2cb718ec/pkgs/servers/jellyfin/default.nix, maybe that’s useful as a guide)

Thanks theotherjmmy. I’ll do some more investigating and let you know how it works out.

I was off in the Nix Package Manager Guide Chapter 14. A Simple Nix Expression which didn’t have the details about setting up the variables so I wasn’t making any progress.

After your response I found similar info at NixOS manual ### 6.1.2. Adding Custom Packages

Craig