-
-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
obs-ndi does not build #219578
Comments
In the log nix spit out there is another one that says Its probably complaining somewhere that the version you installed from NDI doesnt match the version in nixpkgs. There has been a bug for a while that I eventually stopped tracking but looks like I can come back take a look about updating the version needed for OBS-NDI If you want you could give this a go:
|
Also, if thats not what its complaining about can you please post the full log 😄 |
Hum, the full log is not very helpful
However, the workaround that you gave works fine, thank you for that. |
Good to hear! Just to double check, did you download the file manually and add it to the nix store like that error is saying? (just double checking, sorry for the silly question) I think the NDI library derivation could use some improvements around pulling it for the user rather than having them do it themselves. Thats what the snippet I included above does. |
I manually downloaded the file from the website, filling the form and all, then from my Downloads folder, ran :~/Downloads] % nix-prefetch-url file://$PWD/Install_NDI_SDK_v5_Linux.tar.gz path is '/nix/store/20kyvmkc9shd673fxy1rgddjg04fqv4n-Install_NDI_SDK_v5_Linux.tar.gz' 0lsiw523sqr6ydwxnikyijayfi55q5mzvh1zi216swvj5kfbxl00 Would be better to have the derivation pull the file for the user to keep things declarative. |
Totally agree! Ill see if the maintainer is cool with changing that up. Yeah, that should add it. From what I've seen in the past though, NDI releases the SDK with just |
Adding a nixpkg option to confirm we accept the license sounds good. I am not finding the NDI output in the list of filters in OBS. |
|
I'm still not seeing the Output NDI filter as in https://streamgeeks.us/wp-content/uploads/2022/02/NDI-Filter-in-OBS-1024x551.png |
Heads up the version of NDI from their website is now newer and no longer works with the existing obs-ndi version in the repo. |
Is there a clean way to add the file to the Nix store when NewTek updates the file and the hash/version no longer match? |
Note that there seems to be a bug in the current ndi derivation that requires a workaround to actually be able to supply a custom version at the moment, as tested locally by me. The current
I'm copy&pasting the following from my So when updating to the new version like this in a local shell (or in any nix expression), one should be able to override like this¹: pkgs.ndi.overrideAttrs (self: super: { version = "5.5.4"; src = pkgs.requireFile rec { name = "${self.installerName}.tar.gz"; sha256 = "sha256:c16db57b467d06cce1455393df744f152623b48ae53d76aa6ac4b3b5f0e3bde8"; message = "update the file again please"; }; }) This however fails building (prefix with
The reason this contains the upstream error message and not the one provided in the repl is precisely because the % nix show-derivation /nix/store/cl1qmjyfndmcngmkir0cj7xmxaxn2jwp-ndi-5.5.4.drv
[snip]
"unpackPhase": "unpackFile /nix/store/6rx5a4pxzfdbm6q9si2gpqzpnbfp8c94-Install_NDI_SDK_v5_Linux.tar.gz\necho y | ./Install_NDI_SDK_v5_Linux.sh\nsourceRoot=\"NDI SDK for Linux\";\n",
[snip]
"inputDrvs": {
"/nix/store/06024yxsdxpdd4gy18b022yfgjzqi9ki-Install_NDI_SDK_v5_Linux.tar.gz.drv": [
"out"
],
"/nix/store/4ipmv8hn6hak618qy9fr49m5yazphvcg-Install_NDI_SDK_v5_Linux.tar.gz.drv": [
"out"
],
[snip] (notice the unpackPhase still referencing the old file starting with So the temporary workaround is to provide the fixed pkgs.ndi.overrideAttrs (self: super: { version = "5.5.4"; src = pkgs.requireFile rec { name = "${self.installerName}.tar.gz"; sha256 = "sha256:c16db57b467d06cce1455393df744f152623b48ae53d76aa6ac4b3b5f0e3bde8"; message = self.installerName; }; unpackPhase = "unpackFile \${src}\necho y | ./${self.installerName}.sh\nsourceRoot=\"NDI SDK for Linux\";\n"; }) ¹: provided the current version was retrieved from upstream by:
I will provide a Pull Request for this shortly. |
The `unpackPhase` as of the previous commit did interpolate the result of the `src` on a nix level. However for any overrides (`overrideAttrs`) to work on the source, for instance to update to a newer version locally, the `src` environment variable of `stdenv` must be used. Otherwise the old, upstream, version will still be pulled in as a dependency and ultimately used for building, which will fail if the old version is not present, or will just deploy the old version if the old version was already downloaded (`requireFile` causes special semi-non-idempotent issues here). Further information was provided in a GitHub comment: NixOS#219578 (comment) Signed-off-by: benaryorg <binary@benary.org>
The `unpackPhase` as of the previous commit did interpolate the result of the `src` on a nix level. However for any overrides (`overrideAttrs`) to work on the source, for instance to update to a newer version locally, the `src` environment variable of `stdenv` must be used. Otherwise the old, upstream, version will still be pulled in as a dependency and ultimately used for building, which will fail if the old version is not present, or will just deploy the old version if the old version was already downloaded (`requireFile` causes special semi-non-idempotent issues here). Further information was provided in a GitHub comment: NixOS#219578 (comment) Signed-off-by: benaryorg <binary@benary.org>
Describe the bug
obs-ndi does not build
Steps To Reproduce
Steps to reproduce the behavior:
nix-prefetch-url file://$PWD/Install_NDI_SDK_v5_Linux.tar.gz
nixos-rebuild switch
Expected behavior
obs-ndi builds
Current behavior
Console log
[:~/Downloads] 27s % du Install_NDI_SDK_v5_Linux.tar.gz 53240 Install_NDI_SDK_v5_Linux.tar.gz [:~/Downloads] % sha256sum Install_NDI_SDK_v5_Linux.tar.gz 00d0bedc2c72736d82883fc0fd6bc1a544e7958c7e46db79f326633d44e15153 Install_NDI_SDK_v5_Linux.tar.gz [:~/Downloads] % nix-prefetch-url file://$PWD/Install_NDI_SDK_v5_Linux.tar.gz path is '/nix/store/20kyvmkc9shd673fxy1rgddjg04fqv4n-Install_NDI_SDK_v5_Linux.tar.gz' 0lsiw523sqr6ydwxnikyijayfi55q5mzvh1zi216swvj5kfbxl00 [:~/Downloads] % nixos-rebuild switch building Nix... building the system configuration... these 17 derivations will be built: /nix/store/y7vda101cq3l5xgys39px2ak33s6n84c-Install_NDI_SDK_v5_Linux.tar.gz.drv /nix/store/69zmj9sikwgapvn16bqz9ajpnr9j3grd-ndi-5.5.2.drv /nix/store/hb337jfbqilabs9iqm9pajxsxawcya25-source.drv /nix/store/z7ks25k55j9aqdmwml1p065aw6ldcajb-obs-ndi-4.10.0.drv /nix/store/s8phb72yk7gkihqzdpgd2vk5dp311x2h-obs-studio-plugins.drv /nix/store/mrlcmihb41v1bab7svcd6j4ada8hl5lr-wrapped-obs-studio-28.1.2.drv /nix/store/sp0hgyg9nmspv2zgkgpkff7jdjlvarzx-system-path.drv /nix/store/7w5ai9rvl2fildhczn308m3jq0gbsq5y-dbus-1.drv /nix/store/akrvdv6bbgp52sicvnvlcxwbavzv6rpn-unit-dbus.service.drv /nix/store/das8y7njmgi896pn1zgv7zzsr3hhgdcp-unit-systemd-fsck-.service.drv /nix/store/hmakp0h9nf9wydmqq09zy92lagx3z312-unit-accounts-daemon.service.drv /nix/store/vvk6y5xm7ml0cr4wj53wxrr624d31s42-unit-polkit.service.drv /nix/store/s6d5yylbb8cjgzwk6vyzk9kfv7vx5as5-system-units.drv /nix/store/qnwqip8x7iv5jg6kfv8mja2x6nz9zlvg-unit-dbus.service.drv /nix/store/z0f36rann9f34nfa1f3g5s5lji8y7y1q-user-units.drv /nix/store/qp70nx54x8kj7vbxzsxcmkq9n8nnk3iw-etc.drv /nix/store/j7aqkpv7nqx1jlhykk2q0k34yrdaa1r1-nixos-system-nixos-22.11.2939.96e18717904.drv this path will be fetched (0.04 MiB download, 0.24 MiB unpacked): /nix/store/972c7mk1s1q5ci4wx7mk361m345ki01q-curl-7.86.0-dev copying path '/nix/store/972c7mk1s1q5ci4wx7mk361m345ki01q-curl-7.86.0-dev' from 'https://cache.nixos.org'... building '/nix/store/y7vda101cq3l5xgys39px2ak33s6n84c-Install_NDI_SDK_v5_Linux.tar.gz.drv'...
In order to use NDI SDK version 5.5.2, you need to comply with
NewTek's license and download the appropriate Linux tarball from:
https://ndi.tv/sdk/
Once you have downloaded the file, please use the following command and
re-run the installation:
$ nix-prefetch-url file://$PWD/Install_NDI_SDK_v5_Linux.tar.gz
error: builder for '/nix/store/y7vda101cq3l5xgys39px2ak33s6n84c-Install_NDI_SDK_v5_Linux.tar.gz.drv' failed with exit code 1;
last 10 log lines:
>
> https://ndi.tv/sdk/
>
> Once you have downloaded the file, please use the following command and
> re-run the installation:
>
> $ nix-prefetch-url file://$PWD/Install_NDI_SDK_v5_Linux.tar.gz
>
> ***
>
For full logs, run 'nix log /nix/store/y7vda101cq3l5xgys39px2ak33s6n84c-Install_NDI_SDK_v5_Linux.tar.gz.drv'.
error: 1 dependencies of derivation '/nix/store/69zmj9sikwgapvn16bqz9ajpnr9j3grd-ndi-5.5.2.drv' failed to build
error: 1 dependencies of derivation '/nix/store/z7ks25k55j9aqdmwml1p065aw6ldcajb-obs-ndi-4.10.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/mrlcmihb41v1bab7svcd6j4ada8hl5lr-wrapped-obs-studio-28.1.2.drv' failed to build
error: 1 dependencies of derivation '/nix/store/sp0hgyg9nmspv2zgkgpkff7jdjlvarzx-system-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/j7aqkpv7nqx1jlhykk2q0k34yrdaa1r1-nixos-system-nixos-22.11.2939.96e18717904.drv' failed to build
Notify maintainers
@jshcmpbll
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.The text was updated successfully, but these errors were encountered: