about summary refs log tree commit diff
path: root/pkgs/applications/audio/sfxr-qt/default.nix
blob: a204ad566d4d164946be038dadc49aff31bc485c (plain) (blame)
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
55
56
57
58
59
60
61
62
{ lib
, mkDerivation
, fetchFromGitHub
, cmake
, extra-cmake-modules
, qtbase
, qtquickcontrols2
, SDL
, python3
, catch2_3
, callPackage
, nixosTests
}:

mkDerivation rec {
  pname = "sfxr-qt";
  version = "1.5.1";

  src = fetchFromGitHub {
    owner = "agateau";
    repo = "sfxr-qt";
    rev = version;
    hash = "sha256-JAWDk7mGkPtQ5yaA6UT9hlAy770MHrTBhBP9G8UqFKg=";
    fetchSubmodules = true;
  };

  nativeBuildInputs = [
    cmake
    extra-cmake-modules
    (python3.withPackages (pp: with pp; [ pyyaml jinja2 setuptools ]))
  ];

  buildInputs = [
    qtbase
    qtquickcontrols2
    SDL
  ];

  checkInputs = [
    catch2_3
  ];

  cmakeFlags = [
    (lib.cmakeBool "USE_SYSTEM_CATCH2" true)
  ];

  doCheck = true;

  passthru.tests = {
    export-square-wave = callPackage ./test-export-square-wave {};
    sfxr-qt-starts = nixosTests.sfxr-qt;
  };

  meta = with lib; {
    homepage = "https://github.com/agateau/sfxr-qt";
    description = "Sound effect generator, QtQuick port of sfxr";
    mainProgram = "sfxr-qt";
    license = licenses.gpl2;
    maintainers = with maintainers; [ fgaz ];
    platforms = platforms.linux;
  };
}