nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 stdenv,
3 lib,
4 fetchFromGitHub,
5 autoreconfHook,
6 pkg-config,
7 SDL2,
8 libpulseaudio,
9 glm,
10 which,
11 libsForQt5,
12}:
13
14stdenv.mkDerivation (finalAttrs: {
15 pname = "projectm";
16 version = "3.1.12";
17
18 src = fetchFromGitHub {
19 owner = "projectM-visualizer";
20 repo = "projectM";
21 tag = "v${finalAttrs.version}";
22 hash = "sha256-oEfOx93JyR94II5NkUCvMwqxuV7ktpOHZ8PNMLCiqDw=";
23 };
24
25 nativeBuildInputs = [
26 pkg-config
27 autoreconfHook
28 which
29 libsForQt5.wrapQtAppsHook
30 ];
31
32 buildInputs = [
33 SDL2
34 libsForQt5.qtdeclarative
35 libpulseaudio
36 glm
37 ];
38
39 configureFlags = [
40 "--enable-qt"
41 "--enable-sdl"
42 ];
43
44 fixupPhase =
45 lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
46 # NOTE: 2019-10-05: Upstream inserts the src path buring build into ELF rpath, so must delete it out
47 # upstream report: https://github.com/projectM-visualizer/projectm/issues/245
48 for entry in $out/bin/* ; do
49 patchelf --set-rpath "$(patchelf --print-rpath $entry | tr ':' '\n' | grep -v 'src/libprojectM' | tr '\n' ':')" "$entry"
50 done
51 ''
52 + ''
53 wrapQtApp $out/bin/projectM-pulseaudio
54 rm $out/bin/projectM-unittest
55 '';
56
57 meta = {
58 homepage = "https://github.com/projectM-visualizer/projectm";
59 description = "Cross-platform Milkdrop-compatible music visualizer";
60 license = lib.licenses.lgpl21;
61 platforms = lib.platforms.unix;
62 maintainers = [ ];
63 longDescription = ''
64 The open-source project that reimplements the esteemed Winamp Milkdrop by Geiss in a more modern, cross-platform reusable library.
65 Read an audio input and produces mesmerizing visuals, detecting tempo, and rendering advanced equations into a limitless array of user-contributed visualizations.
66 '';
67 };
68})