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