biglybt: 3.5.0.0 -> 3.6.0.0
[NixPkgs.git] / pkgs / applications / radio / pothos / default.nix
blob6691ffe2dd45948fedde1f923d40b27730f90267
1 { lib
2 , mkDerivation
3 , fetchFromGitHub
4 , fetchpatch
5 , cmake
6 , pkg-config
7 , doxygen
8 , wrapQtAppsHook
9 , pcre
10 , poco
11 , qtbase
12 , qtsvg
13 , qwt6_1
14 , nlohmann_json
15 , soapysdr-with-plugins
16 , portaudio
17 , alsa-lib
18 , muparserx
19 , python3
22 mkDerivation rec {
23   pname = "pothos";
24   version = "0.7.1";
26   src = fetchFromGitHub {
27     owner = "pothosware";
28     repo = "PothosCore";
29     rev = "pothos-${version}";
30     sha256 = "038c3ipvf4sgj0zhm3vcj07ymsva4ds6v89y43f5d3p4n8zc2rsg";
31     fetchSubmodules = true;
32   };
34   patches = [
35     # spuce's CMakeLists.txt uses QT5_USE_Modules, which does not seem to work on Nix
36     ./spuce.patch
37     # Poco had some breaking API changes in 1.12
38     (fetchpatch {
39       name = "poco-1.12-compat.patch";
40       url = "https://github.com/pothosware/PothosCore/commit/092d1209b0fd0aa8a1733706c994fa95e66fd017.patch";
41       hash = "sha256-bZXG8kD4+1LgDV8viZrJ/DMjg8UvW7b5keJQDXurfkA=";
42     })
43   ];
45   nativeBuildInputs = [ cmake pkg-config doxygen wrapQtAppsHook ];
47   buildInputs = [
48     pcre poco qtbase qtsvg qwt6_1 nlohmann_json
49     soapysdr-with-plugins portaudio alsa-lib muparserx python3
50   ];
52   postInstall = ''
53     install -Dm644 $out/share/Pothos/Desktop/pothos-flow.desktop $out/share/applications/pothos-flow.desktop
54     install -Dm644 $out/share/Pothos/Desktop/pothos-flow-16.png $out/share/icons/hicolor/16x16/apps/pothos-flow.png
55     install -Dm644 $out/share/Pothos/Desktop/pothos-flow-22.png $out/share/icons/hicolor/22x22/apps/pothos-flow.png
56     install -Dm644 $out/share/Pothos/Desktop/pothos-flow-32.png $out/share/icons/hicolor/32x32/apps/pothos-flow.png
57     install -Dm644 $out/share/Pothos/Desktop/pothos-flow-48.png $out/share/icons/hicolor/48x48/apps/pothos-flow.png
58     install -Dm644 $out/share/Pothos/Desktop/pothos-flow-64.png $out/share/icons/hicolor/64x64/apps/pothos-flow.png
59     install -Dm644 $out/share/Pothos/Desktop/pothos-flow-128.png $out/share/icons/hicolor/128x128/apps/pothos-flow.png
60     install -Dm644 $out/share/Pothos/Desktop/pothos-flow.xml $out/share/mime/application/pothos-flow.xml
61     rm -r $out/share/Pothos/Desktop
62   '';
64   dontWrapQtApps = true;
65   preFixup = ''
66     # PothosUtil does not need to be wrapped
67     wrapQtApp $out/bin/PothosFlow
68     wrapQtApp $out/bin/spuce_fir_plot
69     wrapQtApp $out/bin/spuce_iir_plot
70     wrapQtApp $out/bin/spuce_other_plot
71     wrapQtApp $out/bin/spuce_window_plot
72   '';
74   meta = with lib; {
75     description = "The Pothos data-flow framework";
76     homepage = "https://github.com/pothosware/PothosCore/wiki";
77     license = licenses.boost;
78     platforms = platforms.linux;
79     maintainers = with maintainers; [ ];
80   };