btrbk: add mainProgram
[NixPkgs.git] / pkgs / by-name / fl / flac / package.nix
blob09ce3341aa547129536a76e1e5a74869c4715ad5
1 { lib
2 , stdenv
3 , fetchurl
4 , cmake
5 , pkg-config
6 , doxygen
7 , graphviz
8 , libogg
9 }:
11 stdenv.mkDerivation rec {
12   pname = "flac";
13   version = "1.4.3";
15   src = fetchurl {
16     url = "http://downloads.xiph.org/releases/flac/${pname}-${version}.tar.xz";
17     # Official checksum is published at https://github.com/xiph/flac/releases/tag/${version}
18     hash = "sha256-bFjmnNIjSPRBuGEJK4JeWR0Lgi4QbebrDuTQXScgW3A=";
19   };
21   nativeBuildInputs = [
22     cmake
23     pkg-config
24     doxygen
25     graphviz
26   ];
28   buildInputs = [
29     libogg
30   ];
32   cmakeFlags = lib.optionals (!stdenv.hostPlatform.isStatic) [
33     "-DBUILD_SHARED_LIBS=ON"
34   ];
36   CFLAGS = [ "-O3" "-funroll-loops" ];
37   CXXFLAGS = [ "-O3" ];
39   # doCheck = true; # takes lots of time
41   outputs = [ "bin" "dev" "out" "man" "doc" ];
43   meta = with lib; {
44     homepage = "https://xiph.org/flac/";
45     description = "Library and tools for encoding and decoding the FLAC lossless audio file format";
46     changelog = "https://xiph.org/flac/changelog.html";
47     mainProgram = "flac";
48     platforms = platforms.all;
49     license = licenses.bsd3;
50     maintainers = with maintainers; [ ruuda ];
51   };