colorchord2: init at unstable-2021-11-12

This commit is contained in:
Simon Bruder 2021-11-19 15:01:39 +01:00
parent 8dd0b5b818
commit 10a4f897fc
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC
3 changed files with 69 additions and 0 deletions

66
colorchord2/default.nix Normal file
View file

@ -0,0 +1,66 @@
{ lib
, stdenv
, fetchFromGitHub
, pkg-config
, alsa-lib
, freeglut
, libusb
, pulseaudio
, xlibs
}:
stdenv.mkDerivation rec {
pname = "colorchord";
version = "unstable-2021-11-12";
src = fetchFromGitHub {
owner = "cnlohr";
repo = pname;
rev = "0a44c600243636ef8fbaf11c728c49412e8ad8d4";
sha256 = "sha256-a9nOdj7Q8vDoseoE+u5/DWRxSCXiSxs/7r74PcoDc2k=";
fetchSubmodules = true;
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [
alsa-lib
freeglut
libusb
pulseaudio
] ++ (with xlibs; [
libX11
libXext
libXinerama
]);
postPatch = ''
substituteInPlace colorchord2/configs.c \
--replace "default.conf" "$out/share/colorchord2/default.conf"
'';
# settings sourceRoot makes the rest read-only, which breaks the build
preBuild = ''
cd colorchord2
'';
makeFlags = [ "colorchord" "colorchord-opengl" ];
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,share/colorchord2}
cp colorchord{,-opengl} $out/bin/
cp *.conf $out/share/colorchord2/
runHook postInstall
'';
meta = with lib; {
description = "Chromatic Sound to Light Conversion System";
homepage = "https://github.com/cnlohr/colorchord";
license = licenses.free; # 3-clause BSD license with modified 3rd clause (https://github.com/cnlohr/colorchord/blob/master/LICENSE)
maintainers = with maintainers; [ sbruder ];
platforms = platforms.all;
};
}

View file

@ -17,6 +17,8 @@ in
}; };
python3Packages = prev.recurseIntoAttrs final.python3.pkgs; python3Packages = prev.recurseIntoAttrs final.python3.pkgs;
colorchord2 = callPackage ./colorchord2 { };
cyanrip = callPackage ./cyanrip { }; cyanrip = callPackage ./cyanrip { };
deemix = callPythonPackage ./deemix { }; deemix = callPythonPackage ./deemix { };

View file

@ -47,6 +47,7 @@
(flake-utils.lib.flattenTree { (flake-utils.lib.flattenTree {
inherit (pkgs) inherit (pkgs)
VisiCut VisiCut
colorchord2
cyanrip cyanrip
deemix deemix
fSpy fSpy