2022-10-30 15:09:59 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, cmake
|
|
|
|
, pkg-config
|
|
|
|
, doxygen
|
|
|
|
, graphviz
|
|
|
|
, libogg
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-05-28 09:39:13 +00:00
|
|
|
pname = "flac";
|
2022-11-21 17:40:18 +00:00
|
|
|
version = "1.4.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-05-28 09:39:13 +00:00
|
|
|
url = "http://downloads.xiph.org/releases/flac/${pname}-${version}.tar.xz";
|
2022-10-21 18:38:19 +00:00
|
|
|
# Official checksum is published at https://github.com/xiph/flac/releases/tag/${version}
|
2022-11-21 17:40:18 +00:00
|
|
|
sha256 = "sha256-4yLVih9I0j2d049DJnKGX2955zpvnMWl9X/KqD61qOQ=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pkg-config
|
|
|
|
doxygen
|
|
|
|
graphviz
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
buildInputs = [
|
|
|
|
libogg
|
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = lib.optionals (!stdenv.hostPlatform.isStatic) [
|
|
|
|
"-DBUILD_SHARED_LIBS=ON"
|
|
|
|
];
|
|
|
|
|
|
|
|
CFLAGS = [ "-O3" "-funroll-loops" ];
|
|
|
|
CXXFLAGS = [ "-O3" ];
|
|
|
|
|
|
|
|
# doCheck = true; # takes lots of time
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
outputs = [ "bin" "dev" "out" "man" "doc" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://xiph.org/flac/";
|
|
|
|
description = "Library and tools for encoding and decoding the FLAC lossless audio file format";
|
2022-11-21 17:40:18 +00:00
|
|
|
changelog = "https://xiph.org/flac/changelog.html";
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.all;
|
|
|
|
license = licenses.bsd3;
|
2022-10-21 18:38:19 +00:00
|
|
|
maintainers = with maintainers; [ ruuda ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|