Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
101 lines
2.1 KiB
Nix
101 lines
2.1 KiB
Nix
{
|
|
buildGo124Module,
|
|
buildPackages,
|
|
fetchFromGitHub,
|
|
fetchNpmDeps,
|
|
lib,
|
|
nodejs,
|
|
npmHooks,
|
|
pkg-config,
|
|
stdenv,
|
|
ffmpeg-headless,
|
|
taglib,
|
|
zlib,
|
|
nixosTests,
|
|
nix-update-script,
|
|
ffmpegSupport ? true,
|
|
}:
|
|
|
|
buildGo124Module rec {
|
|
pname = "navidrome";
|
|
version = "0.58.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "navidrome";
|
|
repo = "navidrome";
|
|
rev = "v${version}";
|
|
hash = "sha256-MwFACp2RKXz6zTzjknC5nKzaTEG1NWtvYggRZRiX5t0=";
|
|
};
|
|
|
|
vendorHash = "sha256-CrZqVhvDYemnaCuveOXySqHZhW+nrgzdxaiJRuZfSaI=";
|
|
|
|
npmRoot = "ui";
|
|
|
|
npmDeps = fetchNpmDeps {
|
|
inherit src;
|
|
sourceRoot = "${src.name}/ui";
|
|
hash = "sha256-tl6unHz0E0v0ObrfTiE0vZwVSyVFmrLggNM5QsUGsvI=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
buildPackages.makeWrapper
|
|
nodejs
|
|
npmHooks.npmConfigHook
|
|
pkg-config
|
|
];
|
|
|
|
overrideModAttrs = oldAttrs: {
|
|
nativeBuildInputs = lib.filter (drv: drv != npmHooks.npmConfigHook) oldAttrs.nativeBuildInputs;
|
|
preBuild = null;
|
|
};
|
|
|
|
buildInputs = [
|
|
taglib
|
|
zlib
|
|
];
|
|
|
|
ldflags = [
|
|
"-X github.com/navidrome/navidrome/consts.gitSha=${src.rev}"
|
|
"-X github.com/navidrome/navidrome/consts.gitTag=v${version}"
|
|
];
|
|
|
|
CGO_CFLAGS = lib.optionals stdenv.cc.isGNU [ "-Wno-return-local-addr" ];
|
|
|
|
postPatch = ''
|
|
patchShebangs ui/bin/update-workbox.sh
|
|
'';
|
|
|
|
preBuild = ''
|
|
make buildjs
|
|
'';
|
|
|
|
tags = [
|
|
"netgo"
|
|
];
|
|
|
|
postFixup = lib.optionalString ffmpegSupport ''
|
|
wrapProgram $out/bin/navidrome \
|
|
--prefix PATH : ${lib.makeBinPath [ ffmpeg-headless ]}
|
|
'';
|
|
|
|
passthru = {
|
|
tests.navidrome = nixosTests.navidrome;
|
|
updateScript = nix-update-script { };
|
|
};
|
|
|
|
meta = {
|
|
description = "Music Server and Streamer compatible with Subsonic/Airsonic";
|
|
mainProgram = "navidrome";
|
|
homepage = "https://www.navidrome.org/";
|
|
license = lib.licenses.gpl3Only;
|
|
sourceProvenance = with lib.sourceTypes; [ fromSource ];
|
|
maintainers = with lib.maintainers; [
|
|
aciceri
|
|
squalus
|
|
tebriel
|
|
];
|
|
# Broken on Darwin: sandbox-exec: pattern serialization length exceeds maximum (NixOS/nix#4119)
|
|
broken = stdenv.hostPlatform.isDarwin;
|
|
};
|
|
}
|