You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 7, 2025. It is now read-only.
New feature (non-breaking change which adds functionality)
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
Syntax is valid; checked with nix flake show.
Test Configuration:
Please delete options that are not relevant.
Python: Python 3.10
Nixpkgs channel: nixpkgs-unstable and release-23.05 both work, but nixpkgs-unstable is more up-to-date, so we use that.
Checklist
My code follows the style guidelines of this project (all lints have passed)
I have performed a self-review of my own code
I have commented my code, particularly in hard-to-understand areas
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
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 \ to makeWrapper ${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.
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 :)
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 :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
None yet
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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