2019-09-05 15:22:42 +00:00
|
|
|
{ lib
|
|
|
|
, mkDerivation
|
|
|
|
, fetchFromGitHub
|
2022-03-20 18:30:49 +00:00
|
|
|
, fetchpatch
|
2018-10-30 11:56:57 +00:00
|
|
|
, cmake
|
2022-01-13 14:43:58 +00:00
|
|
|
, extra-cmake-modules
|
2019-09-05 15:22:42 +00:00
|
|
|
, qtbase
|
|
|
|
, qtquickcontrols2
|
2018-10-30 11:56:57 +00:00
|
|
|
, SDL
|
|
|
|
, python3
|
2022-01-28 20:44:02 +00:00
|
|
|
, catch2
|
2022-01-15 18:27:51 +00:00
|
|
|
, callPackage
|
2022-03-20 21:39:04 +00:00
|
|
|
, nixosTests
|
2018-10-30 11:56:57 +00:00
|
|
|
}:
|
|
|
|
|
2019-09-05 15:22:42 +00:00
|
|
|
mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "sfxr-qt";
|
2022-03-20 18:30:49 +00:00
|
|
|
version = "1.5.0";
|
2022-01-13 14:43:58 +00:00
|
|
|
|
2018-10-30 11:56:57 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "agateau";
|
|
|
|
repo = "sfxr-qt";
|
|
|
|
rev = version;
|
2022-03-20 18:30:49 +00:00
|
|
|
sha256 = "sha256-Ce5NJe1f+C4pPmtenHYvtkxste+nPuxJoB+N7K2nyRo=";
|
2018-10-30 11:56:57 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
2022-01-13 14:43:58 +00:00
|
|
|
|
2022-01-28 20:44:02 +00:00
|
|
|
postPatch = ''
|
|
|
|
cp ${catch2}/include/catch2/catch.hpp 3rdparty/catch2/single_include/catch2/catch.hpp
|
|
|
|
'';
|
|
|
|
|
2022-03-20 18:30:49 +00:00
|
|
|
# Remove on next release
|
|
|
|
patches = [(fetchpatch {
|
|
|
|
name = "sfxr-qr-missing-qpainterpath-include";
|
|
|
|
url = "https://github.com/agateau/sfxr-qt/commit/ef051f473654052112b647df987eb263e38faf47.patch";
|
|
|
|
sha256 = "sha256-bqMnxHUzdS5oG/2hfr5MvkpwrtZW+GTN5fS2WpV2W2c=";
|
|
|
|
})];
|
|
|
|
|
2018-10-30 11:56:57 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
2022-01-13 14:43:58 +00:00
|
|
|
extra-cmake-modules
|
2019-09-16 08:19:54 +00:00
|
|
|
(python3.withPackages (pp: with pp; [ pyyaml jinja2 setuptools ]))
|
2018-10-30 11:56:57 +00:00
|
|
|
];
|
2022-01-13 14:43:58 +00:00
|
|
|
|
2018-10-30 11:56:57 +00:00
|
|
|
buildInputs = [
|
2019-09-05 15:22:42 +00:00
|
|
|
qtbase
|
|
|
|
qtquickcontrols2
|
2018-10-30 11:56:57 +00:00
|
|
|
SDL
|
|
|
|
];
|
|
|
|
|
2022-01-28 20:44:02 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
2022-01-15 18:27:51 +00:00
|
|
|
passthru.tests = {
|
|
|
|
export-square-wave = callPackage ./test-export-square-wave {};
|
2022-03-20 21:39:04 +00:00
|
|
|
sfxr-qt-starts = nixosTests.sfxr-qt;
|
2022-01-15 18:27:51 +00:00
|
|
|
};
|
|
|
|
|
2019-09-05 15:22:42 +00:00
|
|
|
meta = with lib; {
|
2020-03-15 14:01:22 +00:00
|
|
|
homepage = "https://github.com/agateau/sfxr-qt";
|
2018-10-30 11:56:57 +00:00
|
|
|
description = "A sound effect generator, QtQuick port of sfxr";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ fgaz ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|