2020-05-25 00:35:40 +01:00
|
|
|
{ lib, stdenv, mkDerivation, fetchgit, zlib, libGLU, libX11, qtbase, qtwebkit, qtserialport, wrapQtAppsHook }:
|
2018-04-09 18:49:49 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
name = "sleepyhead-${version}";
|
|
|
|
version = "1.0.0-beta-git";
|
2020-05-25 00:35:40 +01:00
|
|
|
in mkDerivation {
|
2018-04-09 18:49:49 +01:00
|
|
|
inherit name;
|
|
|
|
|
|
|
|
src = fetchgit {
|
2020-04-01 02:11:51 +01:00
|
|
|
url = "https://gitlab.com/sleepyhead/sleepyhead-code.git";
|
2018-04-09 18:49:49 +01:00
|
|
|
rev = "9e2329d8bca45693231b5e3dae80063717c24578";
|
|
|
|
sha256 = "0448z8gyaxpgpnksg34lzmffj36jdpm0ir4xxa5gvzagkx0wk07h";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
2020-05-25 00:35:40 +01:00
|
|
|
qtbase qtwebkit qtserialport
|
2018-04-09 18:49:49 +01:00
|
|
|
zlib
|
|
|
|
libGLU
|
|
|
|
libX11
|
|
|
|
];
|
|
|
|
|
2020-05-25 00:35:40 +01:00
|
|
|
nativeBuildInputs = [ wrapQtAppsHook ];
|
|
|
|
|
2018-04-09 18:49:49 +01:00
|
|
|
patchPhase = ''
|
|
|
|
patchShebangs configure
|
|
|
|
'';
|
2021-01-01 13:46:40 +00:00
|
|
|
|
2020-05-25 00:35:40 +01:00
|
|
|
installPhase = if stdenv.isDarwin then ''
|
|
|
|
mkdir -p $out/Applications
|
|
|
|
cp -r sleepyhead/SleepyHead.app $out/Applications
|
|
|
|
'' else ''
|
2018-04-09 18:49:49 +01:00
|
|
|
mkdir -p $out/bin
|
|
|
|
cp sleepyhead/SleepyHead $out/bin
|
|
|
|
'';
|
|
|
|
|
2021-01-15 05:42:41 +00:00
|
|
|
postFixup = lib.optionalString stdenv.isDarwin ''
|
2020-05-25 00:35:40 +01:00
|
|
|
wrapQtApp "$out/Applications/SleepyHead.app/Contents/MacOS/SleepyHead"
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://sleepyhead.jedimark.net/";
|
2018-04-09 18:49:49 +01:00
|
|
|
description = "Review and explore data produced by CPAP and related machines";
|
|
|
|
longDescription = ''
|
|
|
|
SleepyHead is cross platform, opensource sleep tracking program for reviewing CPAP and Oximetry data, which are devices used in the treatment of Sleep Disorders like Obstructive Sleep Apnea.
|
|
|
|
'';
|
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = [ maintainers.krav ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|