forked from mirrors/nixpkgs
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
52 lines
1.4 KiB
Nix
52 lines
1.4 KiB
Nix
{ lib, stdenv, mkDerivation, fetchgit, zlib, libGLU, libX11, qtbase, qtwebkit, qtserialport, wrapQtAppsHook }:
|
|
|
|
let
|
|
name = "sleepyhead-${version}";
|
|
version = "1.0.0-beta-git";
|
|
in mkDerivation {
|
|
inherit name;
|
|
|
|
src = fetchgit {
|
|
url = "https://gitlab.com/sleepyhead/sleepyhead-code.git";
|
|
rev = "9e2329d8bca45693231b5e3dae80063717c24578";
|
|
sha256 = "0448z8gyaxpgpnksg34lzmffj36jdpm0ir4xxa5gvzagkx0wk07h";
|
|
};
|
|
|
|
buildInputs = [
|
|
qtbase qtwebkit qtserialport
|
|
zlib
|
|
libGLU
|
|
libX11
|
|
];
|
|
|
|
nativeBuildInputs = [ wrapQtAppsHook ];
|
|
|
|
patchPhase = ''
|
|
patchShebangs configure
|
|
'';
|
|
|
|
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 lib; {
|
|
homepage = "https://sleepyhead.jedimark.net/";
|
|
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 ];
|
|
};
|
|
|
|
}
|