-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
[WIP] soundux: init at 0.2.7 #160181
[WIP] soundux: init at 0.2.7 #160181
Conversation
@pasqui23 - A short while ago I took the derivation from an older PR for soundux and fixed it up to compile and work on my system. It might help if you're going to try and get it brought into the repo: {
lib, stdenv, fetchFromGitHub, cmake, ninja, pkg-config, makeWrapper, wrapGAppsHook,
libappindicator-gtk3, openssl, pipewire, pulseaudio, webkitgtk, xorg,
libpulseaudio, libwnck3,
downloaderSupport ? true, ffmpeg, youtube-dl
}:
let
downloaderPath = lib.makeBinPath [ffmpeg youtube-dl ];
# Soundux loads pipewire, pulse and libwnck optionally during runtime
dynamicLibraries = lib.makeLibraryPath [libpulseaudio pipewire libwnck3 ];
in
stdenv.mkDerivation rec {
pname = "soundux";
version = "0.2.7";
src = fetchFromGitHub {
owner = "Soundux";
repo = "Soundux";
rev = version;
fetchSubmodules = true;
sha256 = "15kd9vl7inn8zm5cqzjkb6zb9xk2xxwpkm7fx1za3dy9m61sq839";
};
cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" ];
dontWrapGApps = true;
installPhase = ''
mkdir -p $out/opt $out/bin
cp -r dist soundux-${version} $out/opt
'';
postFixup = ''
makeWrapper $out/opt/soundux-${version} $out/bin/soundux \
--prefix LD_LIBRARY_PATH ":" ${dynamicLibraries} \
"''${gappsWrapperArgs[@]}" \
${lib.optionalString downloaderSupport "--prefix PATH \":\" " + downloaderPath}
'';
nativeBuildInputs = [ cmake ninja pkg-config makeWrapper wrapGAppsHook ];
buildInputs = [
libappindicator-gtk3
openssl
pipewire
pulseaudio
webkitgtk
xorg.libX11
xorg.libXtst
];
meta = with lib; {
homepage = "https://soundux.rocks/";
description = "cross-platform soundboard";
license = licenses.gpl3Only;
platforms = platforms.linux;
};
} |
@Slabity Sorry even with your fix still does not compile |
Strange. That derivation builds for me and lets me run it without any issue. |
Ok @Slabity my mistake. Now it builds and run perfectly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Package file should be formatted with nixpkgs-fmt
mkdir -p $out/opt $out/bin | ||
cp -r dist soundux-${version} $out/opt | ||
''; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you please add desktopItem
attribute here (check discord package for example)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll also need to create share
directory and create a symlink to it like here
buildInputs = [ | ||
libappindicator-gtk3 | ||
openssl | ||
pipewire | ||
pulseaudio | ||
webkitgtk | ||
xorg.libX11 | ||
xorg.libXtst | ||
]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
buildInputs = [ | |
libappindicator-gtk3 | |
openssl | |
pipewire | |
pulseaudio | |
webkitgtk | |
xorg.libX11 | |
xorg.libXtst | |
]; | |
buildInputs = with xorg; [ | |
libappindicator-gtk3 | |
openssl | |
pipewire | |
pulseaudio | |
webkitgtk | |
libX11 | |
libXtst | |
]; |
e18c8a8
to
7674e08
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Slabity What was your fix? as far as I can tell what you posted is just, exactly my package 4943cd2 but with the maintainer field removed.
The reason the original PR wasn't merged was because the libraries used needed to be devendored, you'll have to do that as well if you want this merged.
In it's current form this is 99% my work anyways though lol, and most of the things commented on previously were already covered by the final version in the aforementiond PR (#129571)
I applaud you for picking up the mantle and don't at all mind. But you should be careful about these things in the future since it's important that you actually hold legal copyright over the work you try to commit. (And the line for how much you can copy, and how complex that can be is generally fairly poorly defined)
@dali99 - Uh... I think I screwed up my copy-paste because I definitely added a lot more dependencies in mine to fix some linking issues and get all the additional features I wanted. And it doesn't look like I removed the maintainer field. Here's what I have in my repo at the moment: {
lib, stdenv, fetchFromGitHub, cmake, ninja, pkg-config, makeWrapper, wrapGAppsHook,
libappindicator-gtk3, pcre, openssl, pipewire, pulseaudio, webkitgtk, xorg, utillinux,
libpulseaudio, libwnck3, libselinux, libsepol, libthai, libdatrie,
libxkbcommon, epoxy, dbus_tools,
downloaderSupport ? true, ffmpeg, youtube-dl
}:
let
downloaderPath = lib.makeBinPath [ffmpeg youtube-dl ];
# Soundux loads pipewire, pulse and libwnck optionally during runtime
dynamicLibraries = lib.makeLibraryPath [libpulseaudio pipewire libwnck3 ];
in
stdenv.mkDerivation rec {
pname = "soundux";
version = "0.2.7";
src = fetchFromGitHub {
owner = "Soundux";
repo = "Soundux";
rev = version;
fetchSubmodules = true;
sha256 = "15kd9vl7inn8zm5cqzjkb6zb9xk2xxwpkm7fx1za3dy9m61sq839";
};
cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" ];
dontWrapGApps = true;
installPhase = ''
mkdir -p $out/opt $out/bin
cp -r dist soundux-${version} $out/opt
'';
postFixup = ''
makeWrapper $out/opt/soundux-${version} $out/bin/soundux \
--prefix LD_LIBRARY_PATH ":" ${dynamicLibraries} \
"''${gappsWrapperArgs[@]}" \
${lib.optionalString downloaderSupport "--prefix PATH \":\" " + downloaderPath}
'';
nativeBuildInputs = [ cmake ninja pkg-config makeWrapper wrapGAppsHook ];
buildInputs = [
libappindicator-gtk3
openssl
libselinux
libsepol
libthai
libdatrie
utillinux
pcre
pipewire
pulseaudio
webkitgtk
xorg.libX11
xorg.libXtst
xorg.libXdmcp
libxkbcommon
epoxy
dbus_tools
];
meta = with lib; {
homepage = "https://soundux.rocks/";
description = "cross-platform soundboard";
license = licenses.gpl3Only;
platforms = platforms.linux;
maintainers = with maintainers; [ dandellion ];
};
} Sorry for the mixup, I wasn't intending to get my changes committed at all. I just happened to see this PR and thought I'd link to the older one since it was closer to working. |
No worries, everything after the first section was mainly aimed at @pasqui23 anyways :) I was just generally wondering what you did to fix it! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By devendoring we refer to building without these libraries coming from the soundux source: https://github.com/Soundux/Soundux/tree/0.2.7/lib and rather being packaged directly in nixpkgs
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rebase. If you want me to check again later and build the package, give me a ping.
description = "cross-platform soundboard"; | ||
license = licenses.gpl3Only; | ||
platforms = platforms.linux; | ||
maintainers = with maintainers; [ dandellion ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it intentional that you are not listed as maintainer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Listing other people without their approval is not allowed. Please change that.
soundux: made it work(?) soundux: added desktop file soundux: formatting
makeWrapper $out/opt/soundux-${version} $out/bin/soundux \ | ||
--prefix LD_LIBRARY_PATH ":" ${dynamicLibraries} \ | ||
"''${gappsWrapperArgs[@]}" \ | ||
${lib.optionalString downloaderSupport "--prefix PATH \":\" " + downloaderPath} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
${lib.optionalString downloaderSupport "--prefix PATH \":\" " + downloaderPath} | |
${lib.optionalString downloaderSupport "--prefix PATH \":\" ${lib.makeBinPath [ ffmpeg youtube-dl ]}"} |
makeWrapper $out/opt/soundux-${version} $out/bin/soundux \ | ||
--prefix LD_LIBRARY_PATH ":" ${dynamicLibraries} \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makeWrapper $out/opt/soundux-${version} $out/bin/soundux \ | |
--prefix LD_LIBRARY_PATH ":" ${dynamicLibraries} \ | |
# Soundux loads pipewire, pulse and libwnck optionally during runtime | |
makeWrapper $out/opt/soundux-${version} $out/bin/soundux \ | |
--prefix LD_LIBRARY_PATH ":" ${lib.makeLibraryPath [ libpulseaudio pipewire libwnck3 ]} \ |
let | ||
downloaderPath = lib.makeBinPath [ ffmpeg youtube-dl ]; | ||
# Soundux loads pipewire, pulse and libwnck optionally during runtime | ||
dynamicLibraries = lib.makeLibraryPath [ libpulseaudio pipewire libwnck3 ]; | ||
in | ||
stdenv.mkDerivation rec { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let | |
downloaderPath = lib.makeBinPath [ ffmpeg youtube-dl ]; | |
# Soundux loads pipewire, pulse and libwnck optionally during runtime | |
dynamicLibraries = lib.makeLibraryPath [ libpulseaudio pipewire libwnck3 ]; | |
in | |
stdenv.mkDerivation rec { | |
stdenv.mkDerivation rec { |
owner = "Soundux"; | ||
repo = "Soundux"; | ||
rev = version; | ||
fetchSubmodules = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vendoring so many libraries is not great.
installPhase = '' | ||
mkdir -p $out/opt $out/bin $out/share | ||
cp -r dist soundux-${version} $out/opt | ||
ln -s "${desktopItem}/share/applications" $out/share/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use copyDesktopItems.
|
||
installPhase = '' | ||
mkdir -p $out/opt $out/bin $out/share | ||
cp -r dist soundux-${version} $out/opt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to be opt?
description = "cross-platform soundboard"; | ||
license = licenses.gpl3Only; | ||
platforms = platforms.linux; | ||
maintainers = with maintainers; [ dandellion ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Listing other people without their approval is not allowed. Please change that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your devendoring commit does not devendor.
See my prior comment on what we mean when we say that
Result of 1 package failed to build:
|
I couldn't get this to run due to some EGL issues:
|
see also #169201 |
superseded by #185858 |
Motivation for this change
Things done
Builds succeeds and the programs run.
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes