2023-02-16 17:41:37 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
2023-03-04 12:14:45 +00:00
|
|
|
, fetchpatch
|
2023-02-16 17:41:37 +00:00
|
|
|
, SDL
|
2023-03-04 12:14:45 +00:00
|
|
|
, autoreconfHook
|
2023-02-16 17:41:37 +00:00
|
|
|
, glib
|
|
|
|
, pkg-config
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-07-21 07:28:18 +00:00
|
|
|
pname = "libvisual";
|
2023-02-16 17:41:37 +00:00
|
|
|
version = "0.4.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-07-21 07:28:18 +00:00
|
|
|
url = "mirror://sourceforge/libvisual/${pname}-${version}.tar.gz";
|
2023-02-16 17:41:37 +00:00
|
|
|
hash = "sha256-qhKHdBf3bTZC2fTHIzAjgNgzF1Y51jpVZB0Bkopd230=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
patches = [
|
|
|
|
# pull upstream fix for SDL1 cross-compilation.
|
|
|
|
# https://github.com/Libvisual/libvisual/pull/238
|
|
|
|
(fetchpatch {
|
|
|
|
name = "sdl-cross-prereq.patch";
|
|
|
|
url = "https://github.com/Libvisual/libvisual/commit/7902d24aa1a552619a5738339b3823e90dd3b865.patch";
|
|
|
|
hash = "sha256-84u8klHDAw/q4d+9L4ROAr7XsbXItHrhaEKkTEMSPcc=";
|
|
|
|
# remove extra libvisual prefix
|
|
|
|
stripLen = 1;
|
|
|
|
# pull in only useful configure.ac changes.
|
|
|
|
excludes = [ "Makefile.am" ];
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
name = "sdl-cross-pc.patch";
|
|
|
|
url = "https://github.com/Libvisual/libvisual/commit/f79a2e8d21ad1d7fe26e2aa83cea4c9f48f9e392.patch";
|
|
|
|
hash = "sha256-8c7SdLxXC8K9BAwj7DzozsZAcbs5l1xuBqky9LJ1MfM=";
|
|
|
|
# remove extra libvisual prefix
|
|
|
|
stripLen = 1;
|
|
|
|
})
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
strictDeps = true;
|
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
|
|
|
buildInputs = [ SDL glib ];
|
|
|
|
|
|
|
|
configureFlags = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
|
|
|
# Remove once "sdl-cross-prereq.patch" patch above is removed.
|
|
|
|
"--disable-lv-tool"
|
2024-05-15 15:35:15 +00:00
|
|
|
] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
|
|
|
|
"ac_cv_func_malloc_0_nonnull=yes"
|
|
|
|
"ac_cv_func_realloc_0_nonnull=yes"
|
2023-03-04 12:14:45 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Abstraction library for audio visualisations";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://sourceforge.net/projects/libvisual/";
|
2021-02-05 17:12:51 +00:00
|
|
|
license = lib.licenses.lgpl21Plus;
|
|
|
|
platforms = lib.platforms.linux;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|