2020-11-06 00:33:48 +00:00
|
|
|
{ mkDerivation
|
2021-04-18 02:13:31 +00:00
|
|
|
, lib
|
|
|
|
, stdenv
|
2020-11-06 00:33:48 +00:00
|
|
|
, fetchFromGitHub
|
2021-12-24 04:21:11 +00:00
|
|
|
, fetchpatch
|
2021-04-18 02:13:31 +00:00
|
|
|
, nix-update-script
|
2020-11-06 00:33:48 +00:00
|
|
|
, qmake
|
2021-06-28 23:13:55 +00:00
|
|
|
, pkg-config
|
2020-11-06 00:33:48 +00:00
|
|
|
, qtbase
|
|
|
|
, qtmultimedia
|
|
|
|
, libvorbis
|
2021-04-18 02:13:31 +00:00
|
|
|
, rtmidi
|
2020-11-06 00:33:48 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
mkDerivation rec {
|
|
|
|
pname = "ptcollab";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "0.5.0.1";
|
2020-11-06 00:33:48 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "yuxshao";
|
|
|
|
repo = "ptcollab";
|
|
|
|
rev = "v${version}";
|
2021-12-06 16:07:01 +00:00
|
|
|
sha256 = "10v310smm0df233wlh1kqv8i36lsg1m36v0flrhs2202k50d69ri";
|
2020-11-06 00:33:48 +00:00
|
|
|
};
|
|
|
|
|
2021-12-24 04:21:11 +00:00
|
|
|
patches = [
|
|
|
|
# Lifts macOS version restriction
|
|
|
|
# Remove when version > 0.5.0.1
|
|
|
|
(fetchpatch {
|
|
|
|
name = "0001-ptcollab-lift-10.14-deployment-target-limitation.patch";
|
|
|
|
url = "https://github.com/yuxshao/ptcollab/commit/a9664b5953e1046e1f7da3b38744f33a7ff0ea24.patch";
|
|
|
|
sha256 = "0qgpv5hmb4504kamdgxalrhc4zb9rdxln23s7qwc7ikafg54h1fm";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
nativeBuildInputs = [ qmake pkg-config ];
|
2020-11-06 00:33:48 +00:00
|
|
|
|
2021-04-18 02:13:31 +00:00
|
|
|
buildInputs = [ qtbase qtmultimedia libvorbis rtmidi ];
|
|
|
|
|
2021-12-24 04:21:11 +00:00
|
|
|
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
|
|
|
# Move appbundles to Applications before wrapping happens
|
|
|
|
mkdir $out/Applications
|
|
|
|
mv $out/{bin,Applications}/ptcollab.app
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
|
|
|
# Link to now-wrapped binary inside appbundle
|
|
|
|
ln -s $out/{Applications/ptcollab.app/Contents/MacOS,bin}/ptcollab
|
|
|
|
'';
|
|
|
|
|
2021-04-18 02:13:31 +00:00
|
|
|
passthru = {
|
|
|
|
updateScript = nix-update-script {
|
|
|
|
attrPath = pname;
|
|
|
|
};
|
|
|
|
};
|
2020-11-06 00:33:48 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-11-06 00:33:48 +00:00
|
|
|
description = "Experimental pxtone editor where you can collaborate with friends";
|
|
|
|
homepage = "https://yuxshao.github.io/ptcollab/";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ OPNA2608 ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|