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

pulseaudio-dlna #35245

Merged
merged 2 commits into from Feb 21, 2018
Merged

pulseaudio-dlna #35245

merged 2 commits into from Feb 21, 2018

Conversation

mogorman
Copy link
Contributor

@mogorman mogorman commented Feb 20, 2018

Motivation for this change

Resolves #35231

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
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • 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.

@@ -11319,6 +11319,38 @@ in {
};
});

notify2 = buildPythonPackage rec {
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 this to a dedicated file in python-modules and add a reference here with callPackages as described in the header of this file.


doCheck = false; # Requires real X session to run tests

src = pkgs.fetchurl {
Copy link
Member

Choose a reason for hiding this comment

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

fetchPypi is preferred here.

@@ -11319,6 +11319,38 @@ in {
};
});

notify2 = buildPythonPackage rec {
pname = "notify2";
name = "${pname}-${version}";
Copy link
Member

Choose a reason for hiding this comment

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

this the default for buildPythonPackage if pname and version is set.

{ fetchFromGitHub, stdenv, pythonPackages, lame, opusTools, faac, flac, sox, vorbisTools }:

pythonPackages.buildPythonApplication rec {
name = "pulseaudio-dlna";
Copy link
Member

Choose a reason for hiding this comment

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

pname


pythonPackages.buildPythonApplication rec {
name = "pulseaudio-dlna";
version = "2017-11-01";
Copy link
Member

Choose a reason for hiding this comment

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

Why not 0.5.2? If you want a development snapshot, you can simply override the version.

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 did the latest as the author has not released in a long time.

Copy link
Member

@Mic92 Mic92 Feb 20, 2018

Choose a reason for hiding this comment

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

As the project uses a couple python libraries this seems appropriate to not roadblock other projects, when updating python libraries.

"sha256" = "1dfn7036vrq49kxv4an7rayypnm5dlawsf02pfsldw877hzdamqk";
};

propagatedBuildInputs = with pythonPackages; [ dbus-python docopt requests setproctitle protobuf psutil futures chardet notify2 netifaces pyroute2 lxml zeroconf ] ++ [ lame opusTools faac flac sox vorbisTools ];
Copy link
Member

Choose a reason for hiding this comment

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

Please split into multiple lines.

# ];
#
#
propagatedBuildInputs = [ self.pygobject3 self.dbus-python pkgs.gtk3 pkgs.gobjectIntrospection ];
Copy link
Member

Choose a reason for hiding this comment

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

Are you sure about gtk3 in propagedBuildInputs? It looks like it only uses Python libraries and gtk3 does not contain any.

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 couldn't get it to build without it but I am not positive it is needed. I will do more testing now.

owner = "masmu";
repo = "pulseaudio-dlna";
"rev" = "4472928dd23f274193f14289f59daec411023ab0";
"sha256" = "1dfn7036vrq49kxv4an7rayypnm5dlawsf02pfsldw877hzdamqk";
Copy link
Member

Choose a reason for hiding this comment

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

rev without "; same for sha256.

@mogorman
Copy link
Contributor Author

made the changes you requested @Mic92

@mogorman
Copy link
Contributor Author

mogorman commented Feb 21, 2018

@Mic92 rolling back the version issue we discussed, as the 0.5.2 version does not correctly connect to the pulseaudio daemon in 17.09 otherwise. I did email the author about possibly cutting a newer release though.

sha256 = "1dfn7036vrq49kxv4an7rayypnm5dlawsf02pfsldw877hzdamqk";
};

propagatedBuildInputs = with pythonPackages; [ dbus-python docopt
Copy link
Member

Choose a reason for hiding this comment

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

maybe a newline instead of all this white space?

description = "A lightweight streaming server which brings DLNA / UPNP and Chromecast support to PulseAudio and Linux";
homepage = https://github.com/masmu/pulseaudio-dlna;

license = stdenv.lib.licenses.gpl3Plus;
Copy link
Member

Choose a reason for hiding this comment

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

no stdenv.lib

faac
flac
sox
vorbisTools ];
Copy link
Member

Choose a reason for hiding this comment

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

Maybe create arguments like mp3Support ? true, lame and then use ++ lib.optional mp3Support lame, so people can disable these optional dependencies.

Copy link
Member

@dotlambda dotlambda left a comment

Choose a reason for hiding this comment

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

I think pulseaudio-dlna has no tests, does it? If it doesn't, you should set doCheck = false and add a comment.

@mogorman
Copy link
Contributor Author

@dotlambda made all the external apps that can be called optional but defaulted to true and bad include you pointed out. fixed formatting as per @FRidh request.

@dotlambda
Copy link
Member

@mogorman Can please split the commit into two seperate ones for notify2 and pulseaudio-dlna?

@GrahamcOfBorg build python2.pkgs.notify2 python3.pkgs.notify2 pulseaudio-dlna

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Partial log (click to expand)

Package ‘faac-1.29.9.2’ in /home/borg/borg-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/7c6f434c-buildbox/pkgs/development/libraries/faac/default.nix:32 has an unfree license (‘unfreeRedistributable’), refusing to evaluate.

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Partial log (click to expand)

Package ‘faac-1.29.9.2’ in /var/lib/gc-of-borg/nix-test-rs-2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-2/pkgs/development/libraries/faac/default.nix:32 has an unfree license (‘unfreeRedistributable’), refusing to evaluate.

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.

@mogorman mogorman mentioned this pull request Feb 21, 2018
8 tasks
@dotlambda
Copy link
Member

We should set faacSupport to false by default.

@mogorman
Copy link
Contributor Author

@dotlambda 2 commits and changes made.

@mogorman
Copy link
Contributor Author

@GrahamcOfBorg build python2.pkgs.notify2 python3.pkgs.notify2 pulseaudio-dlna

1 similar comment
@dotlambda
Copy link
Member

@GrahamcOfBorg build python2.pkgs.notify2 python3.pkgs.notify2 pulseaudio-dlna

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)

shrinking RPATHs of ELF executables and libraries in /nix/store/g1hwq3mr4fdq7g5qicri20gb7hd1bxq8-pulseaudio-dlna-2017-11-01
gzipping man pages under /nix/store/g1hwq3mr4fdq7g5qicri20gb7hd1bxq8-pulseaudio-dlna-2017-11-01/share/man/
strip is /nix/store/adidfx4pa7vmvby0gjqqmiwg2x49yr27-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/g1hwq3mr4fdq7g5qicri20gb7hd1bxq8-pulseaudio-dlna-2017-11-01/lib  /nix/store/g1hwq3mr4fdq7g5qicri20gb7hd1bxq8-pulseaudio-dlna-2017-11-01/bin 
patching script interpreter paths in /nix/store/g1hwq3mr4fdq7g5qicri20gb7hd1bxq8-pulseaudio-dlna-2017-11-01
checking for references to /tmp/nix-build-pulseaudio-dlna-2017-11-01.drv-0 in /nix/store/g1hwq3mr4fdq7g5qicri20gb7hd1bxq8-pulseaudio-dlna-2017-11-01...
wrapping `/nix/store/g1hwq3mr4fdq7g5qicri20gb7hd1bxq8-pulseaudio-dlna-2017-11-01/bin/pulseaudio-dlna'...
/nix/store/3zik190r9lxzvg2d022wfkajak3i4zd9-python2.7-notify2-0.3.1
/nix/store/30rxrg124ya5dylib8wncmix13rxvfqm-python3.6-notify2-0.3.1
/nix/store/g1hwq3mr4fdq7g5qicri20gb7hd1bxq8-pulseaudio-dlna-2017-11-01

Copy link
Member

@dotlambda dotlambda left a comment

Choose a reason for hiding this comment

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

I have not tested this, but it looks very nice.

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Partial log (click to expand)

shrinking RPATHs of ELF executables and libraries in /nix/store/pypzyhi80q7bwm55c1bd3gib1c11jwdg-pulseaudio-dlna-2017-11-01
gzipping man pages under /nix/store/pypzyhi80q7bwm55c1bd3gib1c11jwdg-pulseaudio-dlna-2017-11-01/share/man/
strip is /nix/store/skd6ix5ipkyhxzq7naylj4digawakl4j-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/pypzyhi80q7bwm55c1bd3gib1c11jwdg-pulseaudio-dlna-2017-11-01/lib  /nix/store/pypzyhi80q7bwm55c1bd3gib1c11jwdg-pulseaudio-dlna-2017-11-01/bin
patching script interpreter paths in /nix/store/pypzyhi80q7bwm55c1bd3gib1c11jwdg-pulseaudio-dlna-2017-11-01
checking for references to /build in /nix/store/pypzyhi80q7bwm55c1bd3gib1c11jwdg-pulseaudio-dlna-2017-11-01...
wrapping `/nix/store/pypzyhi80q7bwm55c1bd3gib1c11jwdg-pulseaudio-dlna-2017-11-01/bin/pulseaudio-dlna'...
/nix/store/qshwzrbg28wsbym3hy4glkd7xs5v2kqj-python2.7-notify2-0.3.1
/nix/store/mnc59qrqx5mgb0fbr6w3k5bwjg30i669-python3.6-notify2-0.3.1
/nix/store/pypzyhi80q7bwm55c1bd3gib1c11jwdg-pulseaudio-dlna-2017-11-01

@Mic92 Mic92 merged commit a65221e into NixOS:master Feb 21, 2018
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

5 participants