-
-
Notifications
You must be signed in to change notification settings - Fork 15
Conversation
204f4bd to
e38685e
Compare
e38685e to
3ce79d6
Compare
Took me a while but there seams to be a small issue
[red@nixos:~/youcube-server]$ nix run
error: unable to execute '/nix/store/ykwxgqxqpnzrjkfz4x64fa7hihccz0vk-youcube-20230806/bin/youcube': No such file or directory
Commandcracker
commented
Aug 26, 2023
I changed makeWrapper ${pkgs.python3}/bin/python3 $out/bin/youcube-server \ to makeWrapper ${pkgs.python3}/bin/python3 $out/bin/youcube \ as a quick workaround but now i encountered another issue. The server needs to be able to write the media files to some place. If it is needed to change the path, I could make an env var out of it.
Exception in thread Thread-1 (run_with_thread_save_asyncio_event_with_return_value):
Traceback (most recent call last):
File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/nix/store/wd42gdpjrb5s5iwyn5axxc628aasfwkj-youcube-20230806/lib/python3.10/site-packages/youcube/yc_magic.py", line 44, in run_with_thread_save_asyncio_event_with_return_value
result = func(*args)
File "/nix/store/wd42gdpjrb5s5iwyn5axxc628aasfwkj-youcube-20230806/lib/python3.10/site-packages/youcube/yc_download.py", line 240, in download
create_data_folder_if_not_present()
File "/nix/store/wd42gdpjrb5s5iwyn5axxc628aasfwkj-youcube-20230806/lib/python3.10/site-packages/youcube/yc_utils.py", line 87, in create_data_folder_if_not_present
mkdir(DATA_FOLDER)
OSError: [Errno 30] Read-only file system: '/nix/store/wd42gdpjrb5s5iwyn5axxc628aasfwkj-youcube-20230806/lib/python3.10/site-packages/youcube/data'
I changed
makeWrapper ${pkgs.python3}/bin/python3 $out/bin/youcube-server \tomakeWrapper ${pkgs.python3}/bin/python3 $out/bin/youcube \as a quick workaround but now i encountered another issue.
This could be fixed by changing the package's pname or setting the meta.mainProgram variable.
The server needs to be able to write the media files to some place. If it is needed to change the path, I could make an env var out of it.
Normally, data should get written out to /var on POSIX-compliant systems. I think an environment variable would be good, but we may want to consider changing the default as well.
Commandcracker
commented
Aug 26, 2023
Normally, data should get written out to /var on POSIX-compliant systems. I think an environment variable would be good, but we may want to consider changing the default as well.
I will make an env var out of it. I was thinking about making the default a temp folder as the data folder is currently only used as a media cache and Using something like /var/lib/youcube would need a windows counter part.
I changed makeWrapper ${pkgs.python3}/bin/python3
$out/bin/youcube-server \ to makeWrapper $ {pkgs.python3}/bin/python3 $out/bin/youcube \ as a quick workaround but now i encountered another issue.
Could you fix it ? as you have more experience with nix :)
tomodachi94
commented
Aug 26, 2023
I was thinking about making the default a temp folder as the data folder is currently only used as a media cache and Using something like /var/lib/youcube would need a windows counter part.
Good idea, I didn't know it was all temporary data :)
Uh oh!
There was an error while loading. Please reload this page.
Description
Adds NixOS support.
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
nix flake show.Test Configuration:
Please delete options that are not relevant.
nixpkgs-unstableandrelease-23.05both work, butnixpkgs-unstableis more up-to-date, so we use that.Checklist