Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / libraries / libvisual / default.nix
blob52ea32f7583292dae7f9b9ca3b99f1989289bf72
1 { lib
2 , stdenv
3 , fetchurl
4 , fetchpatch
5 , SDL
6 , autoreconfHook
7 , glib
8 , pkg-config
9 }:
11 stdenv.mkDerivation rec {
12   pname = "libvisual";
13   version = "0.4.1";
15   src = fetchurl {
16     url = "mirror://sourceforge/libvisual/${pname}-${version}.tar.gz";
17     hash = "sha256-qhKHdBf3bTZC2fTHIzAjgNgzF1Y51jpVZB0Bkopd230=";
18   };
20   outputs = [ "out" "dev" ];
22   patches = [
23     # pull upstream fix for SDL1 cross-compilation.
24     #   https://github.com/Libvisual/libvisual/pull/238
25     (fetchpatch {
26       name = "sdl-cross-prereq.patch";
27       url = "https://github.com/Libvisual/libvisual/commit/7902d24aa1a552619a5738339b3823e90dd3b865.patch";
28       hash = "sha256-84u8klHDAw/q4d+9L4ROAr7XsbXItHrhaEKkTEMSPcc=";
29       # remove extra libvisual prefix
30       stripLen = 1;
31       # pull in only useful configure.ac changes.
32       excludes = [ "Makefile.am" ];
33     })
34     (fetchpatch {
35       name = "sdl-cross-pc.patch";
36       url = "https://github.com/Libvisual/libvisual/commit/f79a2e8d21ad1d7fe26e2aa83cea4c9f48f9e392.patch";
37       hash = "sha256-8c7SdLxXC8K9BAwj7DzozsZAcbs5l1xuBqky9LJ1MfM=";
38       # remove extra libvisual prefix
39       stripLen = 1;
40     })
41   ];
43   strictDeps = true;
44   nativeBuildInputs = [ autoreconfHook pkg-config ];
45   buildInputs = [ SDL glib ];
47   configureFlags = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
48     # Remove once "sdl-cross-prereq.patch" patch above is removed.
49     "--disable-lv-tool"
50   ];
52   meta = {
53     description = "An abstraction library for audio visualisations";
54     homepage = "https://sourceforge.net/projects/libvisual/";
55     license = lib.licenses.lgpl21Plus;
56     platforms = lib.platforms.linux;
57   };