flac: modernize derivation

This commit is contained in:
KSJ2000
2025-02-17 14:30:40 +02:00
parent 3bf8a684b2
commit 233cd3ff59
2 changed files with 47 additions and 25 deletions
+35 -25
View File
@@ -1,41 +1,39 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
doxygen,
fetchFromGitHub,
graphviz,
lib,
libogg,
nix-update-script,
pandoc,
pkg-config,
doxygen,
graphviz,
libogg,
stdenv,
versionCheckHook,
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "flac";
version = "1.5.0";
src = fetchFromGitHub {
owner = "xiph";
repo = "flac";
tag = version;
tag = finalAttrs.version;
hash = "sha256-B6XRai5UOAtY/7JXNbI3YuBgazi1Xd2ZOs6vvLq9LIs=";
};
nativeBuildInputs = [
cmake
pandoc
pkg-config
doxygen
graphviz
pandoc
pkg-config
];
buildInputs = [
libogg
];
buildInputs = [ libogg ];
cmakeFlags = lib.optionals (!stdenv.hostPlatform.isStatic) [
"-DBUILD_SHARED_LIBS=ON"
];
cmakeFlags = lib.optionals (!stdenv.hostPlatform.isStatic) [ "-DBUILD_SHARED_LIBS=ON" ];
CFLAGS = [
"-O3"
@@ -43,23 +41,35 @@ stdenv.mkDerivation rec {
];
CXXFLAGS = [ "-O3" ];
# doCheck = true; # takes lots of time
patches = [ ./package.patch ];
doCheck = true;
outputs = [
"bin"
"dev"
"out"
"man"
"doc"
"man"
"out"
];
meta = with lib; {
nativeInstallCheckInputs = [ versionCheckHook ];
doInstallCheck = true;
versionCheckProgramArg = "--version";
passthru.updateScript = nix-update-script { };
meta = {
homepage = "https://xiph.org/flac/";
description = "Library and tools for encoding and decoding the FLAC lossless audio file format";
changelog = "https://xiph.org/flac/changelog.html";
changelog = "https://github.com/xiph/flac/releases/tag/${finalAttrs.version}";
mainProgram = "flac";
platforms = platforms.all;
license = licenses.bsd3;
maintainers = with maintainers; [ ruuda ];
platforms = lib.platforms.all;
license = with lib.licenses; [
bsd3
fdl13Plus
gpl2Plus
lgpl21Plus
];
maintainers = with lib.maintainers; [ ruuda ];
};
}
})
+12
View File
@@ -0,0 +1,12 @@
diff --git a/test/test_replaygain.sh b/test/test_replaygain.sh
index 11fb77dc..b5dea14c 100755
--- a/test/test_replaygain.sh
+++ b/test/test_replaygain.sh
@@ -140,7 +140,4 @@ for ACTION in $REPLAYGAIN_FREQ ; do
done
done
-
-rm -f $testdir/out.flac $testdir/out.meta
-
exit 0