Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 66 lines 1.5 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 qmake, 6 wrapQtAppsHook, 7 qt6Packages, 8 bison, 9 flex, 10 which, 11 alsa-lib, 12 libsndfile, 13 libpulseaudio, 14 libjack2, 15 audioBackend ? "pulse", # "pulse", "alsa", or "jack" 16}: 17 18stdenv.mkDerivation (finalAttrs: { 19 pname = "miniaudicle"; 20 version = "1.5.4.2"; 21 22 src = fetchFromGitHub { 23 owner = "ccrma"; 24 repo = "miniAudicle"; 25 rev = "chuck-${finalAttrs.version}"; 26 hash = "sha256-LYr9Fc4Siqk0BFKHVXfIV2XskJYAN+/0P+nb6FJLsLE="; 27 fetchSubmodules = true; 28 }; 29 30 sourceRoot = "${finalAttrs.src.name}/src"; 31 32 postPatch = '' 33 echo '#define GIT_REVISION "${finalAttrs.version}-NixOS"' > git-rev.h 34 substituteInPlace miniAudicle.pro \ 35 --replace "/usr/local" $out 36 ''; 37 38 nativeBuildInputs = [ 39 bison 40 flex 41 which 42 qmake 43 wrapQtAppsHook 44 ]; 45 46 buildInputs = [ 47 alsa-lib 48 libsndfile 49 qt6Packages.qscintilla 50 ] 51 ++ lib.optional (audioBackend == "pulse") libpulseaudio 52 ++ lib.optional (audioBackend == "jack") libjack2; 53 54 buildFlags = [ "linux-${audioBackend}" ]; 55 56 meta = with lib; { 57 description = "Light-weight integrated development environment for the ChucK digital audio programming language"; 58 mainProgram = "miniAudicle"; 59 homepage = "https://audicle.cs.princeton.edu/mini/"; 60 downloadPage = "https://audicle.cs.princeton.edu/mini/linux/"; 61 license = licenses.gpl2Plus; 62 maintainers = with maintainers; [ fgaz ]; 63 platforms = platforms.all; 64 broken = stdenv.hostPlatform.isDarwin; # not attempted 65 }; 66})