mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-09 14:33:22 +00:00
4f0dadbf38
After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-builda08b3a4d19
.tar.gz \ --argstr baseRevb32a094368
result/bin/apply-formatting $NIXPKGS_PATH
92 lines
2.0 KiB
Nix
92 lines
2.0 KiB
Nix
{
|
|
buildGo123Module,
|
|
buildPackages,
|
|
fetchFromGitHub,
|
|
fetchNpmDeps,
|
|
lib,
|
|
nodejs,
|
|
npmHooks,
|
|
pkg-config,
|
|
stdenv,
|
|
ffmpeg-headless,
|
|
taglib,
|
|
zlib,
|
|
nixosTests,
|
|
nix-update-script,
|
|
ffmpegSupport ? true,
|
|
}:
|
|
|
|
buildGo123Module rec {
|
|
pname = "navidrome";
|
|
version = "0.53.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "navidrome";
|
|
repo = "navidrome";
|
|
rev = "v${version}";
|
|
hash = "sha256-RLmGjkeBHuvVdxXaGvlIFPI+6beAdtSLukVmwe6Hnag=";
|
|
};
|
|
|
|
vendorHash = "sha256-XjiRMRfsmcw/4RLZXN36BbzbCKu98BgD3cn89e/vra4=";
|
|
|
|
npmRoot = "ui";
|
|
|
|
npmDeps = fetchNpmDeps {
|
|
inherit src;
|
|
sourceRoot = "${src.name}/ui";
|
|
hash = "sha256-0vHInRly5xirjfV7tcYVNVLaMk4YtJeB7Ky0mrDDDnY=";
|
|
};
|
|
|
|
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" ];
|
|
|
|
preBuild = ''
|
|
make buildjs
|
|
'';
|
|
|
|
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 = "Navidrome 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
|
|
];
|
|
# Broken on Darwin: sandbox-exec: pattern serialization length exceeds maximum (NixOS/nix#4119)
|
|
broken = stdenv.hostPlatform.isDarwin;
|
|
};
|
|
}
|