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

forked-daapd: init at 27.2 #85550

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

forked-daapd: init at 27.2 #85550

wants to merge 3 commits into from

Conversation

flyfloh
Copy link
Contributor

@flyfloh flyfloh commented Apr 19, 2020

NixOS is missing a package for forked-daapd, which is a DAAP (iTunes) and MPD media server with support for AirPlay devices (multiroom), Apple Remote (and compatibles), Chromecast, Spotify and internet radio.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

pkgs/servers/forked-daapd/default.nix Outdated Show resolved Hide resolved
@infinisil
Copy link
Member

This PR has way too many options. Check out NixOS/rfcs#42

@flyfloh
Copy link
Contributor Author

flyfloh commented May 6, 2020

This PR has way too many options. Check out NixOS/rfcs#42

Unfortunately I found the RFC repo only after opening this PR. I‘ll fix and update this soon.

@flyfloh flyfloh force-pushed the forked-daapd branch 3 times, most recently from dc69dbe to 24f565f Compare June 1, 2020 19:57
@flyfloh
Copy link
Contributor Author

flyfloh commented Jun 1, 2020

I've now:

  • rewritten the module to the style described in RFC42
  • made spotify support optional (it relies on the non-free libspotify)
  • added a test that tries to start the service and checks whether something is reachable on the port

Unfortunately checks are failing in the pipeline. Can someone help me understand what it is that fails?

@flyfloh flyfloh changed the title forked-daapd: init at 27.1 forked-daapd: init at 27.2 Aug 7, 2020
@flyfloh flyfloh force-pushed the forked-daapd branch 2 times, most recently from ea5f9bc to 024c56c Compare October 10, 2020 09:26
@flyfloh
Copy link
Contributor Author

flyfloh commented Oct 10, 2020

I found the problem and updated the MR. This also now uses the latest version of forked-daapd, which allows to specify ports for airplay and can thus run with the firewall enabled.

@flyfloh flyfloh requested a review from prusnak October 10, 2020 09:58
pkgs/servers/forked-daapd/default.nix Outdated Show resolved Hide resolved
pkgs/servers/forked-daapd/default.nix Outdated Show resolved Hide resolved
pkgs/servers/forked-daapd/default.nix Outdated Show resolved Hide resolved
Copy link
Contributor

@blitz blitz left a comment

Choose a reason for hiding this comment

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

Looks good. The only thing that IMHO needs changing is the bare pathname.

nixos/tests/forked-daapd.nix Outdated Show resolved Hide resolved
nixos/tests/forked-daapd.nix Outdated Show resolved Hide resolved
@@ -0,0 +1,44 @@
import ./make-test-python.nix ({ pkgs, ... }:
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure whether this is something that needs fixing:

https://github.com/NixOS/nixpkgs/pull/85550/checks?check_run_id=1432921834

@tfc Any idea?

Copy link
Contributor

Choose a reason for hiding this comment

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

log says

gcc: error: unrecognized command line option '-m64'
make[1]: *** [Makefile:453: antlr3baserecognizer.lo] Error 1
make[1]: Leaving directory '/build/libantlr3c-3.4'
make: *** [Makefile:308: all] Error 2
error: --- Error --- nix-daemon
builder for '/nix/store/g93kbabwq81cx2r7hcpbvc7cy69qc0h4-libantlr3c-3.4.drv' failed with exit code 2; last 10 log lines:
  building
  build flags: SHELL=/nix/store/93xwsgby6fchr8a58ckgcm2lf4nkv6fl-bash-4.4-p23/bin/bash
  make  all-am
  make[1]: Entering directory '/build/libantlr3c-3.4'
  /nix/store/93xwsgby6fchr8a58ckgcm2lf4nkv6fl-bash-4.4-p23/bin/bash ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -Iinclude    -m64  -O2  -Wall -c -o antlr3baserecognizer.lo `test -f 'src/antlr3baserecognizer.c' || echo './'`src/antlr3baserecognizer.c
  libtool: compile:  gcc -DHAVE_CONFIG_H -I. -Iinclude -m64 -O2 -Wall -c src/antlr3baserecognizer.c  -fPIC -DPIC -o .libs/antlr3baserecognizer.o
  gcc: error: unrecognized command line option '-m64'
  make[1]: *** [Makefile:453: antlr3baserecognizer.lo] Error 1
  make[1]: Leaving directory '/build/libantlr3c-3.4'
  make: *** [Makefile:308: all] Error 2

Seems like it's not the test but libantlr's build process

let
cfg = config.services.forked-daapd;

configPrimitives = with types; (nullOr (either (either (either bool int) str) path));
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't we have something that roughly works like

nullOr (oneOf [bool int str path])

In the libs? This could be a "fold either".

home = mkOption {
type = types.path;
default = "/var/lib/forked-daapd";
description = "The directory where forked-daapd will create files. Make sure it is writable.";
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be helpful if the systemd execution script would check that and give an actionable error msg

@stale
Copy link

stale bot commented Jun 3, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 3, 2021
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Apr 13, 2022
@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Nov 2, 2022
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Mar 20, 2024
@wegank wegank marked this pull request as draft March 20, 2024 22:44
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

8 participants