diff --git a/pkgs/by-name/fl/flac/package.nix b/pkgs/by-name/fl/flac/package.nix index 652cea854a8b8a..9a12c998078b01 100644 --- a/pkgs/by-name/fl/flac/package.nix +++ b/pkgs/by-name/fl/flac/package.nix @@ -1,41 +1,39 @@ { - lib, - stdenv, - fetchFromGitHub, cmake, - pandoc, - pkg-config, doxygen, + fetchFromGitHub, graphviz, + lib, libogg, + nix-update-script, + pandoc, + pkg-config, + 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,34 @@ stdenv.mkDerivation rec { ]; CXXFLAGS = [ "-O3" ]; - # doCheck = true; # takes lots of time + 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 ]; }; -} +})