incus: fix container tests from image rename (#360305)
[NixPkgs.git] / pkgs / games / gcompris / default.nix
blob52b5e1f2aa131e3d96a775f18178a26953f2cf0b
1 { stdenv
2 , cmake
3 , fetchurl
4 , gettext
5 , gst_all_1
6 , lib
7 , ninja
8 , wrapQtAppsHook
9 , qmlbox2d
10 , qtbase
11 , qtcharts
12 , qtdeclarative
13 , qtgraphicaleffects
14 , qtimageformats
15 , qtmultimedia
16 , qtquickcontrols2
17 , qtsensors
18 , qttools
19 , qtxmlpatterns
20 , extra-cmake-modules
23 stdenv.mkDerivation (finalAttrs: {
24   pname = "gcompris";
25   version = "4.2";
27   src = fetchurl {
28     url = "mirror://kde/stable/gcompris/qt/src/gcompris-qt-${finalAttrs.version}.tar.xz";
29     hash = "sha256-Zocmq8lJxJ5TSLVeix59cAVYQghDK7lUJJeffwjyJWw=";
30   };
32   cmakeFlags = [
33     (lib.cmakeFeature "QML_BOX2D_LIBRARY" "${qmlbox2d}/${qtbase.qtQmlPrefix}/Box2D.2.1")
34     (lib.cmakeBool "BUILD_TESTING" finalAttrs.finalPackage.doCheck)
35   ];
37   nativeBuildInputs = [ cmake extra-cmake-modules gettext ninja qttools wrapQtAppsHook ];
39   buildInputs = [
40     qmlbox2d
41     qtbase
42     qtcharts
43     qtdeclarative
44     qtgraphicaleffects
45     qtimageformats
46     qtmultimedia
47     qtquickcontrols2
48     qtsensors
49     qtxmlpatterns
50   ] ++ (with gst_all_1; [
51     gstreamer
52     gst-plugins-base
53     gst-plugins-good
54     gst-plugins-bad
55   ]);
57   postInstall = ''
58     install -Dm444 ../org.kde.gcompris.appdata.xml -t $out/share/metainfo
60     qtWrapperArgs+=(--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0")
61   '';
63   # we need a graphical environment for the tests
64   doCheck = false;
66   meta = with lib; {
67     description = "High quality educational software suite, including a large number of activities for children aged 2 to 10";
68     homepage = "https://gcompris.net/";
69     license = licenses.gpl3Plus;
70     mainProgram = "gcompris-qt";
71     maintainers = with maintainers; [ guibou ];
72     platforms = platforms.linux;
73   };