-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopensoundmeter.nix
54 lines (48 loc) · 1.32 KB
/
opensoundmeter.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{
stdenv,
lib,
pkgs,
qmake,
qtbase,
qtquickcontrols2,
qtgraphicaleffects,
wrapQtAppsHook,
alsaSupport ? stdenv.isLinux,
alsa-lib ? null,
}:
# TODO: Verify on Darwin. Probably needs work as it installs an App.
stdenv.mkDerivation rec {
pname = "opensoundmeter";
version = "1.3";
src = pkgs.fetchFromGitHub {
owner = "psmokotnin";
repo = "osm";
rev = "v${version}";
hash = "sha256-nRibcEtG6UUTgn7PhSg4IyahMYi5aSPvaEOrAdx6u3o=";
};
nativeBuildInputs = [qmake wrapQtAppsHook];
buildInputs =
[qtbase qtquickcontrols2 qtgraphicaleffects]
++ lib.optionals alsaSupport [alsa-lib];
postPatch = ''
# We don't need the app image stuff.
sed -i '/linuxdeployosm/d' OpenSoundMeter.pro
# We want our prefix to be used.
sed -i "s%target.path = .*$%target.path = $out/bin%" OpenSoundMeter.pro
# Patch the version.
sed -i "s/APP_GIT_VERSION = .*/APP_GIT_VERSION = v${version}/" OpenSoundMeter.pro
'';
meta = with lib; {
homepage = "https://opensoundmeter.com/";
description = "Sound measurement application for tuning audio systems in real-time";
license = with licenses; [gpl3];
maintainers = with maintainers; [vifino];
platforms = [
"i686-linux"
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-linux"
];
};
}