summary refs log tree commit diff
path: root/pkgs/applications/audio/ptcollab
diff options
context:
space:
mode:
authorOPNA2608 <christoph.neidahl@gmail.com>2021-12-24 00:16:49 +0100
committerOPNA2608 <christoph.neidahl@gmail.com>2021-12-24 00:16:49 +0100
commit6237d9f952e020504d421575faa9a8b56e80334e (patch)
tree4124aec104ca29ee25c8455bf325813be972142c /pkgs/applications/audio/ptcollab
parent01506119b555c986fd27f0e33aaf08a8d37a93c9 (diff)
downloadnixpkgs-6237d9f952e020504d421575faa9a8b56e80334e.tar
nixpkgs-6237d9f952e020504d421575faa9a8b56e80334e.tar.gz
nixpkgs-6237d9f952e020504d421575faa9a8b56e80334e.tar.bz2
nixpkgs-6237d9f952e020504d421575faa9a8b56e80334e.tar.lz
nixpkgs-6237d9f952e020504d421575faa9a8b56e80334e.tar.xz
nixpkgs-6237d9f952e020504d421575faa9a8b56e80334e.tar.zst
nixpkgs-6237d9f952e020504d421575faa9a8b56e80334e.zip
ptcollab: Unbreak on Darwin
Diffstat (limited to 'pkgs/applications/audio/ptcollab')
-rw-r--r--pkgs/applications/audio/ptcollab/default.nix24
1 files changed, 22 insertions, 2 deletions
diff --git a/pkgs/applications/audio/ptcollab/default.nix b/pkgs/applications/audio/ptcollab/default.nix
index 71c574490f0..fa6a317c41e 100644
--- a/pkgs/applications/audio/ptcollab/default.nix
+++ b/pkgs/applications/audio/ptcollab/default.nix
@@ -2,6 +2,7 @@
 , lib
 , stdenv
 , fetchFromGitHub
+, fetchpatch
 , nix-update-script
 , qmake
 , pkg-config
@@ -22,10 +23,31 @@ mkDerivation rec {
     sha256 = "10v310smm0df233wlh1kqv8i36lsg1m36v0flrhs2202k50d69ri";
   };
 
+  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";
+    })
+  ];
+
   nativeBuildInputs = [ qmake pkg-config ];
 
   buildInputs = [ qtbase qtmultimedia libvorbis rtmidi ];
 
+  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
+  '';
+
   passthru = {
     updateScript = nix-update-script {
       attrPath = pname;
@@ -38,7 +60,5 @@ mkDerivation rec {
     license = licenses.mit;
     maintainers = with maintainers; [ OPNA2608 ];
     platforms = platforms.all;
-    # Requires Qt5.15
-    broken = stdenv.hostPlatform.isDarwin;
   };
 }