Skip to content
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

Fixes for shell.nix #3795

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

matthiasbeyer
Copy link
Contributor

These two patches were required for me to be able to build from the main branch.

With help from @haslersn

@matthiasbeyer
Copy link
Contributor Author

Note that @haslersn did build mixxx as well, but with the old ffmpeg. I was able to build it with ffmpeg_4, though.

@matthiasbeyer
Copy link
Contributor Author

If you approve, ping me so I can squash-rebase.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Suggested-by: Sebastian Hasler <sebastian.hasler@gmx.net>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
@ronso0
Copy link
Member

ronso0 commented Apr 18, 2021

@haslersn Are you aware of #3258 (2.3 branch) and #3174 (main)?

@poelzi
Copy link
Contributor

poelzi commented Apr 18, 2021

#3174 is outdated, #3258 works for 2.3 and 2.4

@poelzi
Copy link
Contributor

poelzi commented Apr 18, 2021

nix show-derivation nixos.ffmpeg

show that it is in fact version 4.3.2 on my nixos 20.09 system. @matthiasbeyer what does this command show to you ?
The res link and libsecret are fixed in #3258 together with other fixes.

@poelzi
Copy link
Contributor

poelzi commented Apr 18, 2021

The build of main will usually fail because the cmake will try to download libdjinterop which will not work. The nix-shell dev environment will still work. Both are fixed in my branch as well.

@matthiasbeyer
Copy link
Contributor Author

matthiasbeyer commented Apr 18, 2021

what does this command show to you ?

$ nix show-derivation nixos.ffmpeg
error: attribute 'nixos' in selection path 'nixos.ffmpeg' not found

same with nixpkgs.

@poelzi
Copy link
Contributor

poelzi commented Apr 18, 2021

@matthiasbeyer that is strange. Are you running nixos or just nix ? Which version ?
https://search.nixos.org/packages?channel=unstable&from=0&size=50&sort=relevance&query=ffmpeg
Same in 20.09, nixpkgs.ffmpeg is a link to ffmpeg_4. I have nothing against linking to the 4.* directly if it fixes your build, I'm just curous why it is different on your system.

@matthiasbeyer
Copy link
Contributor Author

nixos 20.09, at

"rev": "c3253cdab424b87ad8490d42f6585302b20bd39b",
"date": "2021-04-12T17:47:56+02:00",

@poelzi
Copy link
Contributor

poelzi commented Apr 18, 2021

Strange. Do you have some local override or so ? The default is clearly version 4 for 20.09, but I changed it in my branch as well, so, you can check if #3258 works for you as well.
20.03 does use version 3 so, forcing to 4 might fix problems there.

@haslersn
Copy link
Contributor

nix show-derivation nixos.ffmpeg also doesn't work for me. I guess it requires a nixos channel, but I don't even use channels.

$ nix show-derivation nixpkgs.ffmpeg | jq keys
[
  "/nix/store/ybkjxyx2h0xkc6xv62aqh7svl0l6v091-ffmpeg-4.3.2.drv"
]

@matthiasbeyer
Copy link
Contributor Author

Strange. Do you have some local override or so ?

@haslersn teached me that my NIX_PATH is not appropriate (never caused issues until now, TBH):

nix show-derivation '(import <nixpkgs> {}).ffmpeg'

works as expected. Either way, that's not the issue here, is it?

Shall I remove the part which forces ffmpeg_4, or keep it?

@poelzi
Copy link
Contributor

poelzi commented Apr 18, 2021

i rather would like to see #3258 merged, it should fix your problems as well now. it does not harm to explicitly use version 4, in fact, it makes sense because on 20.03 the default is in fact version 3. when flakes is stable, we I suggest we bin to a certain nixpkgs version to ensure it builds correctly and reproducibility is guaranteed. We could use niv now for this. @matthiasbeyer have you tested my pr ? The default file has serious problems, on 2.3 and especially on main it does not build to derivate properly because it downloads tarballs from the internet.

@Holzhaus Holzhaus mentioned this pull request May 15, 2021
@github-actions
Copy link

This PR is marked as stale because it has been open 90 days with no activity.

@github-actions github-actions bot added the stale Stale issues that haven't been updated for a long time. label Jul 18, 2021
@daschuer
Copy link
Member

Since the current shell.nix file is broken, reported here: #4630
I think we have two options to continue, either drop the NixOS support and close this PR, or make it work with a minimum impact for the rest of Mixxx and the maintenance demand.

For my understanding the current shell.nix file is a kind of misconception compared to the full featured Nixified demo project shown here: files https://github.com/Tokyo-NixOS/presentations/tree/master/2017/02/examples/binserver According to that, our shell.nix file is just a badly named default.nix file and shall be removed.

The default.nix file for packaging lives here, which is a perfect location: https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/audio/mixxx/default.nix

So the main purpose a shell.nix file in an upstream repro is to set up a (temporary) development environment for contributing. In the same way we maintain similar files in our tools directory.

@matthiasbeyer do you have interest to fix the nix file towards that goal and care for the maintenance? This means removing the packaging and only keep the environment setup stuff? If not, we will remove the broken file.

@matthiasbeyer
Copy link
Contributor Author

For my understanding the current shell.nix file is a kind of misconception compared to the full featured Nixified demo project

Yes that's right. The shell.nix should only be a development environment setup. #4632 tackles this.
The nixpkgs package is outdated as hell, which is mainly due to the fact that mixxx had no release since. I ran into issues because I want to build mixxx with libdjinterop support (and failed multiple times). Maybe it is time for a release?!

@Holzhaus
Copy link
Member

This means removing the packaging and only keep the environment setup stuff?

There's probably a way to install dependencies for the mentioned default.nix file. For example, if you want to install dependencies for building Mixxx on Arch Linux, you can simply do this to quickly set up a dev environment:

$ curl -o PKGBUILD 'https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=mixxx-git'
$ makepkg -soe

It's likely that something similar exists for nix. If so, we can mention that in the wiki or add it to the README.

@github-actions github-actions bot removed the stale Stale issues that haven't been updated for a long time. label Jan 19, 2022
@github-actions
Copy link

This PR is marked as stale because it has been open 90 days with no activity.

@github-actions github-actions bot added the stale Stale issues that haven't been updated for a long time. label Apr 20, 2022
@daschuer daschuer mentioned this pull request Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Stale issues that haven't been updated for a long time.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants