2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, mkDerivation, fetchFromGitLab, qmake, qtbase, qttools, qtserialport, libGLU }:
|
2020-11-03 02:18:15 +00:00
|
|
|
mkDerivation rec {
|
|
|
|
pname = "OSCAR";
|
2023-10-19 13:55:26 +00:00
|
|
|
version = "1.5.1";
|
2020-11-03 02:18:15 +00:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "pholy";
|
|
|
|
repo = "OSCAR-code";
|
|
|
|
rev = "v${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-FBHbPtMZeIgcR1pQflfEWK2FS8bquctXaeY/yaZofHg=";
|
2020-11-03 02:18:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ qtbase qttools qtserialport libGLU ];
|
|
|
|
nativeBuildInputs = [ qmake ];
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace oscar/oscar.pro --replace "/bin/bash" "${stdenv.shell}"
|
|
|
|
'';
|
|
|
|
|
|
|
|
qmakeFlags = [ "OSCAR_QT.pro" ];
|
|
|
|
|
|
|
|
installPhase = ''
|
2022-03-05 16:20:37 +00:00
|
|
|
runHook preInstall
|
2020-11-03 02:18:15 +00:00
|
|
|
install -d $out/bin
|
|
|
|
install -d $out/share/OSCAR/Help
|
|
|
|
install -d $out/share/OSCAR/Html
|
|
|
|
install -d $out/share/OSCAR/Translations
|
|
|
|
install -d $out/share/icons/OSCAR
|
|
|
|
install -d $out/share/applications
|
|
|
|
install -T oscar/OSCAR $out/bin/OSCAR
|
|
|
|
# help browser was removed 'temporarily' in https://gitlab.com/pholy/OSCAR-code/-/commit/57c3e4c33ccdd2d0eddedbc24c0e4f2969da3841
|
|
|
|
# install oscar/Help/* $out/share/OSCAR/Help
|
|
|
|
install oscar/Html/* $out/share/OSCAR/Html
|
|
|
|
install oscar/Translations/* $out/share/OSCAR/Translations
|
|
|
|
install -T Building/Linux/OSCAR.png $out/share/icons/OSCAR/OSCAR.png
|
|
|
|
install -T Building/Linux/OSCAR.desktop $out/share/applications/OSCAR.desktop
|
2022-03-05 16:20:37 +00:00
|
|
|
runHook postInstall
|
2020-11-03 02:18:15 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-11-03 02:18:15 +00:00
|
|
|
homepage = "https://www.sleepfiles.com/OSCAR/";
|
|
|
|
description = "Software for reviewing and exploring data produced by CPAP and related machines used in the treatment of sleep apnea";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "OSCAR";
|
2022-03-05 16:20:37 +00:00
|
|
|
license = licenses.gpl3Only;
|
2020-11-03 02:18:15 +00:00
|
|
|
maintainers = [ maintainers.roconnor ];
|
|
|
|
# Someone needs to create a suitable installPhase for Darwin and Windows.
|
|
|
|
# See https://gitlab.com/pholy/OSCAR-code/-/tree/master/Building.
|
2022-03-05 16:20:37 +00:00
|
|
|
platforms = platforms.linux;
|
2020-11-03 02:18:15 +00:00
|
|
|
};
|
|
|
|
}
|