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

kmix: init at 16.12.1 #22324

Merged
merged 1 commit into from Feb 1, 2017
Merged

kmix: init at 16.12.1 #22324

merged 1 commit into from Feb 1, 2017

Conversation

rongcuid
Copy link
Contributor

@rongcuid rongcuid commented Jan 31, 2017

Motivation for this change

ALSA works, but KMix for KDE5 is not present. So I add it. I don't know how long I will keep using KDE or nix, so currently I didn't add myself as maintainer.

Note that I didn't test PulseAudio

Solves #22307

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@mention-bot
Copy link

@CarlDong, thanks for your PR! By analyzing the history of the files in this pull request, we identified @ttuegel, @FRidh and @vandenoever to be potential reviewers.

@peterhoeg
Copy link
Member

Further to our exchange on the referenced issue:

a) change the title of the PR and commit to "kmix: init at 16.12.1"

b) get rid of the commented out propagatedBuildInputs if they are not in use

c) you can add libpulseaudio and alsaLib to line 5 as well as buildInputs to get support for pulse/alsa.

To answer your question, if you don't specify the dependency, kmix will not know about it.

@rongcuid
Copy link
Contributor Author

rongcuid commented Feb 1, 2017

Can I put something like "pulseaudio or alsa" in build depends?

I will fix my commits, too.

@peterhoeg
Copy link
Member

It is possible to specify parameters to the derivation in order to build different variants, but you still need to choose what the dependencies are in the default case - as mentioned, all dependencies have to be specified and the concept from other distros of "just build against whatever is on the machine" simply doesn't exist here. This is one of the (many) benefits!

Since both alsa and pulse are built for the normal KDE environment in NixOS, I suggest you add in both.

@rongcuid
Copy link
Contributor Author

rongcuid commented Feb 1, 2017

I don't quite understand yet... If I add in pulseaudio as a dep, wont't that pull in lots of pulse-stuff which clutter my system?

@rongcuid rongcuid changed the title KMix, should be working kmix: init at 16.12.1 Feb 1, 2017
ecm, kdoctools,
kglobalaccel, kxmlgui, kcoreaddons, kdelibs4support,
plasma-framework, pkgs
}:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't pass in pkgs. Instead specify libpulseaudio, alsaLib.

#maintainers = [ lib.maintainers.ttuegel ];
};
nativeBuildInputs = [ ecm kdoctools ];
buildInputs = with pkgs; [ libpulseaudio alsaLib ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After changing it above, you can get rid of ``with pkgs; ```

@peterhoeg
Copy link
Member

I don't quite understand yet... If I add in pulseaudio as a dep, wont't that pull in lots of pulse-stuff which clutter my system?

If you are running KDE, pulseaudio will already be pulled in.

@rongcuid
Copy link
Contributor Author

rongcuid commented Feb 1, 2017

Really? I never saw PA in my Backends... Only GStreamer and VLC.

@ttuegel
Copy link
Member

ttuegel commented Feb 1, 2017

Really? I never saw PA in my Backends... Only GStreamer and VLC.

GStreamer and VLC are Phonon backends; they decode media for Phonon. Phonon still needs a way to communicate with your hardware, either ALSA or PulseAudio.

If you are running KDE, pulseaudio will already be pulled in.

Only libpulseaudio, which is a small library, not the entire PulseAudio server.

Please do not add a PulseAudio dependency to kmix. PulseAudio users should use plasma-pa which is the replacement for kmix. It is installed by default when PulseAudio is enabled on NixOS.

name = "kmix";
meta = {
license = with lib.licenses; [ gpl2 lgpl21 fdl12 ];
#maintainers = [ lib.maintainers.ttuegel ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a maintainer.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am trying to add myself as maintainer... The instruction in default.nix of kde-5/applications doesn't make sense at all.

@rongcuid
Copy link
Contributor Author

rongcuid commented Feb 1, 2017

I added myself as a maintainer. And, the dependency is libpulseaudio and alsaLib, so should be correct.

@peterhoeg
Copy link
Member

You still need to add libpulseaudio and alsaLib to line 5.

@rongcuid
Copy link
Contributor Author

rongcuid commented Feb 1, 2017

Added... It works without, though

@peterhoeg
Copy link
Member

Please also squash all the commits.

@peterhoeg
Copy link
Member

And are you sure about the license(s)?

@rongcuid
Copy link
Contributor Author

rongcuid commented Feb 1, 2017

I am not sure. KMix website says GPL2(if my memory is right), but I copied that line from Konsole. I just assumed that they are the same...

I'll need to learn some more git to actually squash commits, though.

@peterhoeg
Copy link
Member

Added... It works without, though

I just tried, it doesn't without.

cmake is mentioning an unmet optional dependency - canberra.

As that is already part of KDE anyway, please add libcanberra_kde to buildInput.

@rongcuid
Copy link
Contributor Author

rongcuid commented Feb 1, 2017

How do you test the nix file? I tried nix-build but got some problems about missing arguments.

And I will push the commit once I squash them

@peterhoeg
Copy link
Member

KMix website says GPL2(if my memory is right),

Source also mentions gpl2.

How do you test the nix file? I tried nix-build but got some problems about missing arguments.

nix-build -A kde5.kmix while inside the checked-out nixpkgs.

OK, I got a rejection after squashing my commits

Yes, you will need to git push --force if you have squashed. If you've only been working on this from one machine, that's fine. It is indeed potentially dangerous if you are collaborating with others as you will overwrite their changes if you haven't pulled first.

@peterhoeg
Copy link
Member

libcanberra_kde is still missing.

Signed-off-by: Rongcui Dong <rongcuid@outlook.com>
@rongcuid
Copy link
Contributor Author

rongcuid commented Feb 1, 2017

This commit should work, as I tested myself.

@@ -414,6 +414,7 @@
roblabla = "Robin Lambertz <robinlambertz+dev@gmail.com>";
roconnor = "Russell O'Connor <roconnor@theorem.ca>";
romildo = "José Romildo Malaquias <malaquias@gmail.com>";
rongcuid = "Rongcui Dong <rongcuid@outlook.com>";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the convention to use your github username as the attribute name.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed it. By changing my github username

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh... that also works 😀

@LnL7 LnL7 merged commit bc735d4 into NixOS:master Feb 1, 2017
@LnL7
Copy link
Member

LnL7 commented Feb 1, 2017

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants