Merge pull request #329823 from ExpidusOS/fix/pkgsllvm/elfutils
[NixPkgs.git] / pkgs / by-name / op / opensoundmeter / package.nix
blob77c7237f85f57224df7822526d688ebff6105359
1 { lib, stdenv, fetchFromGitHub, alsa-lib, qt5 }:
3 let
4   inherit (qt5) qmake wrapQtAppsHook qtgraphicaleffects qtquickcontrols2;
5 in stdenv.mkDerivation rec {
6   pname = "opensoundmeter";
7   version = "1.3";
9   src = fetchFromGitHub {
10     owner = "psmokotnin";
11     repo = "osm";
12     rev = "v${version}";
13     hash = "sha256-nRibcEtG6UUTgn7PhSg4IyahMYi5aSPvaEOrAdx6u3o=";
14   };
16   patches = [ ./build.patch ];
18   postPatch = ''
19     substituteInPlace OpenSoundMeter.pro \
20       --replace 'APP_GIT_VERSION = ?' 'APP_GIT_VERSION = ${src.rev}'
21   '';
23   nativeBuildInputs = [ qmake wrapQtAppsHook ];
25   buildInputs = [ alsa-lib qtgraphicaleffects qtquickcontrols2 ];
27   installPhase = ''
28     runHook preInstall
30     install OpenSoundMeter -Dt $out/bin
31     install OpenSoundMeter.desktop -m444 -Dt $out/share/applications
32     install icons/white.png -m444 -D $out/share/icons/OpenSoundMeter.png
34     runHook postInstall
35   '';
37   meta = with lib; {
38     description = "Sound measurement application for tuning audio systems in real-time";
39     homepage = "https://opensoundmeter.com/";
40     license = licenses.gpl3Plus;
41     mainProgram = "OpenSoundMeter";
42     maintainers = with maintainers; [ orivej ];
43     platforms = platforms.linux;
44   };