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