cadence: switch to fetchFromGitHub
This commit is contained in:
parent
38ff77cfbb
commit
aeb416bb22
|
@ -3,7 +3,7 @@
|
||||||
, coreutils
|
, coreutils
|
||||||
, libjack2
|
, libjack2
|
||||||
, fetchpatch
|
, fetchpatch
|
||||||
, fetchzip
|
, fetchFromGitHub
|
||||||
, jack_capture
|
, jack_capture
|
||||||
, pkg-config
|
, pkg-config
|
||||||
, pulseaudioFull
|
, pulseaudioFull
|
||||||
|
@ -20,9 +20,11 @@ mkDerivation rec {
|
||||||
version = "0.9.1";
|
version = "0.9.1";
|
||||||
pname = "cadence";
|
pname = "cadence";
|
||||||
|
|
||||||
src = fetchzip {
|
src = fetchFromGitHub {
|
||||||
url = "https://github.com/falkTX/Cadence/archive/v${version}.tar.gz";
|
owner = "falkTX";
|
||||||
sha256 = "07z8grnnpkd0nf3y3r6qjlk1jlzrbhdrp9mnhrhhmws54p1bhl20";
|
repo = "Cadence";
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "sha256-QFC4wiVF8wphhrammxtc+VMZJpXY5OGHs6DNa21+6B8=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
|
@ -39,11 +41,11 @@ mkDerivation rec {
|
||||||
];
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
libjackso=$(realpath ${lib.makeLibraryPath [libjack2]}/libjack.so.0);
|
libjackso=$(realpath ${lib.makeLibraryPath [libjack2]}/libjack.so.0);
|
||||||
substituteInPlace ./src/jacklib.py --replace libjack.so.0 $libjackso
|
substituteInPlace ./src/jacklib.py --replace libjack.so.0 $libjackso
|
||||||
substituteInPlace ./src/cadence.py --replace "/usr/bin/pulseaudio" \
|
substituteInPlace ./src/cadence.py --replace "/usr/bin/pulseaudio" \
|
||||||
"${lib.makeBinPath[pulseaudioFull]}/pulseaudio"
|
"${lib.makeBinPath[pulseaudioFull]}/pulseaudio"
|
||||||
substituteInPlace ./c++/jackbridge/JackBridge.cpp --replace libjack.so.0 $libjackso
|
substituteInPlace ./c++/jackbridge/JackBridge.cpp --replace libjack.so.0 $libjackso
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
@ -54,10 +56,12 @@ mkDerivation rec {
|
||||||
qtbase
|
qtbase
|
||||||
jack_capture
|
jack_capture
|
||||||
pulseaudioFull
|
pulseaudioFull
|
||||||
((python3.withPackages (ps: with ps; [
|
(
|
||||||
pyqt5
|
(python3.withPackages (ps: with ps; [
|
||||||
dbus-python
|
pyqt5
|
||||||
])))
|
dbus-python
|
||||||
|
]))
|
||||||
|
)
|
||||||
];
|
];
|
||||||
|
|
||||||
makeFlags = [
|
makeFlags = [
|
||||||
|
@ -68,31 +72,37 @@ mkDerivation rec {
|
||||||
dontWrapQtApps = true;
|
dontWrapQtApps = true;
|
||||||
|
|
||||||
# Replace with our own wrappers. They need to be changed manually since it wouldn't work otherwise.
|
# Replace with our own wrappers. They need to be changed manually since it wouldn't work otherwise.
|
||||||
preFixup = let
|
preFixup =
|
||||||
outRef = placeholder "out";
|
let
|
||||||
prefix = "${outRef}/share/cadence/src";
|
outRef = placeholder "out";
|
||||||
scriptAndSource = lib.mapAttrs' (script: source:
|
prefix = "${outRef}/share/cadence/src";
|
||||||
lib.nameValuePair ("${outRef}/bin/" + script) ("${prefix}/" + source)
|
scriptAndSource = lib.mapAttrs'
|
||||||
) {
|
(script: source:
|
||||||
"cadence" = "cadence.py";
|
lib.nameValuePair ("${outRef}/bin/" + script) ("${prefix}/" + source)
|
||||||
"claudia" = "claudia.py";
|
)
|
||||||
"catarina" = "catarina.py";
|
{
|
||||||
"catia" = "catia.py";
|
"cadence" = "cadence.py";
|
||||||
"cadence-jacksettings" = "jacksettings.py";
|
"claudia" = "claudia.py";
|
||||||
"cadence-aloop-daemon" = "cadence_aloop_daemon.py";
|
"catarina" = "catarina.py";
|
||||||
"cadence-logs" = "logs.py";
|
"catia" = "catia.py";
|
||||||
"cadence-render" = "render.py";
|
"cadence-jacksettings" = "jacksettings.py";
|
||||||
"claudia-launcher" = "claudia_launcher.py";
|
"cadence-aloop-daemon" = "cadence_aloop_daemon.py";
|
||||||
"cadence-session-start" = "cadence_session_start.py";
|
"cadence-logs" = "logs.py";
|
||||||
};
|
"cadence-render" = "render.py";
|
||||||
in lib.mapAttrsToList (script: source: ''
|
"claudia-launcher" = "claudia_launcher.py";
|
||||||
rm -f ${script}
|
"cadence-session-start" = "cadence_session_start.py";
|
||||||
makeQtWrapper ${source} ${script} \
|
};
|
||||||
--prefix PATH : "${lib.makeBinPath [
|
in
|
||||||
jack_capture # cadence-render
|
lib.mapAttrsToList
|
||||||
pulseaudioFull # cadence, cadence-session-start
|
(script: source: ''
|
||||||
]}"
|
rm -f ${script}
|
||||||
'') scriptAndSource;
|
makeQtWrapper ${source} ${script} \
|
||||||
|
--prefix PATH : "${lib.makeBinPath [
|
||||||
|
jack_capture # cadence-render
|
||||||
|
pulseaudioFull # cadence, cadence-session-start
|
||||||
|
]}"
|
||||||
|
'')
|
||||||
|
scriptAndSource;
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = "https://github.com/falkTX/Cadence/";
|
homepage = "https://github.com/falkTX/Cadence/";
|
||||||
|
|
Loading…
Reference in a new issue