diff options
author | Gregor Pogačnik <1640719+fiksn@users.noreply.github.com> | 2020-05-25 01:35:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-24 19:35:40 -0400 |
commit | 4c1bab5057835cb547250238db44433135c5fdc6 (patch) | |
tree | 8efe0297b8939be340f6357f346b43dc51ee5ec9 /pkgs/applications | |
parent | 08b229bde0991fc54b276f768cf8766274b360eb (diff) |
sleepyhead: use qt5.makeDerivation and fix for Darwin (#88806)
Diffstat (limited to 'pkgs/applications')
-rw-r--r-- | pkgs/applications/misc/sleepyhead/default.nix | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/pkgs/applications/misc/sleepyhead/default.nix b/pkgs/applications/misc/sleepyhead/default.nix index 0753045cc4be7..17c5ec9be2657 100644 --- a/pkgs/applications/misc/sleepyhead/default.nix +++ b/pkgs/applications/misc/sleepyhead/default.nix @@ -1,9 +1,9 @@ -{ stdenv, fetchgit, qt5, zlib, libGLU, libX11 }: +{ lib, stdenv, mkDerivation, fetchgit, zlib, libGLU, libX11, qtbase, qtwebkit, qtserialport, wrapQtAppsHook }: let name = "sleepyhead-${version}"; version = "1.0.0-beta-git"; -in stdenv.mkDerivation { +in mkDerivation { inherit name; src = fetchgit { @@ -13,21 +13,30 @@ in stdenv.mkDerivation { }; buildInputs = [ - qt5.qtbase qt5.qtwebkit qt5.qtserialport + qtbase qtwebkit qtserialport zlib libGLU libX11 ]; + nativeBuildInputs = [ wrapQtAppsHook ]; + patchPhase = '' patchShebangs configure ''; - - installPhase = '' + + installPhase = if stdenv.isDarwin then '' + mkdir -p $out/Applications + cp -r sleepyhead/SleepyHead.app $out/Applications + '' else '' mkdir -p $out/bin cp sleepyhead/SleepyHead $out/bin ''; + postFixup = stdenv.lib.optionalString stdenv.isDarwin '' + wrapQtApp "$out/Applications/SleepyHead.app/Contents/MacOS/SleepyHead" + ''; + meta = with stdenv.lib; { homepage = "https://sleepyhead.jedimark.net/"; description = "Review and explore data produced by CPAP and related machines"; @@ -37,7 +46,6 @@ in stdenv.mkDerivation { license = licenses.gpl3; platforms = platforms.all; maintainers = [ maintainers.krav ]; - broken = true; }; } |