2018-08-04 23:05:42 +02:00
|
|
|
{ stdenv
|
2019-11-10 08:41:14 +01:00
|
|
|
, mkDerivation
|
|
|
|
, lib
|
2018-11-25 20:14:34 +01:00
|
|
|
, fetchzip
|
2018-08-04 23:05:42 +02:00
|
|
|
, pkgconfig
|
|
|
|
, qtbase
|
|
|
|
, makeWrapper
|
|
|
|
, python3Packages
|
|
|
|
}:
|
|
|
|
|
2019-11-10 08:41:14 +01:00
|
|
|
mkDerivation rec {
|
2018-08-04 23:05:42 +02:00
|
|
|
version = "0.9.0";
|
2018-11-05 00:32:52 +01:00
|
|
|
pname = "cadence";
|
2018-08-04 23:05:42 +02:00
|
|
|
|
2018-11-25 20:14:34 +01:00
|
|
|
src = fetchzip {
|
2018-08-04 23:05:42 +02:00
|
|
|
url = "https://github.com/falkTX/Cadence/archive/v${version}.tar.gz";
|
2018-11-25 20:14:34 +01:00
|
|
|
sha256 = "08vcggypkdfr70v49innahs5s11hi222dhhnm5wcqzdgksphqzwx";
|
2018-08-04 23:05:42 +02:00
|
|
|
};
|
|
|
|
|
2019-11-10 08:41:14 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkgconfig
|
|
|
|
];
|
2018-08-04 23:05:42 +02:00
|
|
|
|
2019-11-10 08:41:14 +01:00
|
|
|
buildInputs = [
|
|
|
|
qtbase
|
|
|
|
];
|
2018-08-04 23:05:42 +02:00
|
|
|
|
2019-11-10 08:41:14 +01:00
|
|
|
makeFlags = [
|
|
|
|
"PREFIX=''"
|
|
|
|
"DESTDIR=${placeholder "out"}"
|
|
|
|
];
|
2018-08-04 23:05:42 +02:00
|
|
|
|
2019-11-10 08:41:14 +01:00
|
|
|
propagatedBuildInputs = with python3Packages; [
|
|
|
|
pyqt5_with_qtwebkit
|
|
|
|
];
|
|
|
|
|
|
|
|
dontWrapQtApps = true;
|
|
|
|
|
|
|
|
# Replace with our own wrappers. They need to be changed manually since it wouldn't work otherwise.
|
2019-11-10 08:46:30 +01:00
|
|
|
preFixup = let
|
2019-11-10 08:41:14 +01:00
|
|
|
outRef = placeholder "out";
|
|
|
|
prefix = "${outRef}/share/cadence/src";
|
|
|
|
scriptAndSource = lib.mapAttrs' (script: source:
|
|
|
|
lib.nameValuePair ("${outRef}/bin/" + script) ("${prefix}/" + source)
|
|
|
|
) {
|
|
|
|
"cadence" = "cadence.py";
|
|
|
|
"claudia" = "claudia.py";
|
|
|
|
"catarina" = "catarina.py";
|
|
|
|
"catia" = "catia.py";
|
|
|
|
"cadence-jacksettings" = "jacksettings.py";
|
|
|
|
"cadence-aloop-daemon" = "cadence_aloop_daemon.py";
|
|
|
|
"cadence-logs" = "logs.py";
|
|
|
|
"cadence-render" = "render.py";
|
|
|
|
"claudia-launcher" = "claudia_launcher.py";
|
|
|
|
"cadence-session-start" = "cadence_session_start.py";
|
|
|
|
};
|
|
|
|
in lib.mapAttrsToList (script: source: ''
|
|
|
|
rm -f ${script}
|
|
|
|
makeWrapper ${python3Packages.python.interpreter} ${script} \
|
|
|
|
--set PYTHONPATH "$PYTHONPATH:${outRef}/share/cadence" \
|
|
|
|
''${qtWrapperArgs[@]} \
|
|
|
|
--add-flags "-O ${source}"
|
|
|
|
'') scriptAndSource;
|
2018-08-04 23:05:42 +02:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = https://github.com/falkTX/Cadence/;
|
|
|
|
description = "Collection of tools useful for audio production";
|
2018-11-25 20:14:34 +01:00
|
|
|
license = stdenv.lib.licenses.gpl2Plus;
|
2019-11-10 08:46:45 +01:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ genesis worldofpeace ];
|
2018-11-25 20:14:34 +01:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2018-08-04 23:05:42 +02:00
|
|
|
};
|
|
|
|
}
|