mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-26 07:34:11 +00:00
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
47 lines
1.7 KiB
Nix
47 lines
1.7 KiB
Nix
{ lib, stdenv, mkDerivation, fetchFromGitLab, qmake, qtbase, qttools, qtserialport, libGLU }:
|
|
mkDerivation rec {
|
|
pname = "OSCAR";
|
|
version = "1.2.0";
|
|
|
|
src = fetchFromGitLab {
|
|
owner = "pholy";
|
|
repo = "OSCAR-code";
|
|
rev = "v${version}";
|
|
sha256 = "10r37d8c2avr167n2s9lhld1c9hmckm444fq163z1jsy9jpid6mg";
|
|
};
|
|
|
|
buildInputs = [ qtbase qttools qtserialport libGLU ];
|
|
nativeBuildInputs = [ qmake ];
|
|
postPatch = ''
|
|
substituteInPlace oscar/oscar.pro --replace "/bin/bash" "${stdenv.shell}"
|
|
'';
|
|
|
|
qmakeFlags = [ "OSCAR_QT.pro" ];
|
|
|
|
installPhase = ''
|
|
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
|
|
'';
|
|
|
|
meta = with lib; {
|
|
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";
|
|
license = licenses.gpl3;
|
|
maintainers = [ maintainers.roconnor ];
|
|
# Someone needs to create a suitable installPhase for Darwin and Windows.
|
|
# See https://gitlab.com/pholy/OSCAR-code/-/tree/master/Building.
|
|
broken = !stdenv.hostPlatform.isLinux;
|
|
};
|
|
}
|