2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, mkDerivation
|
|
|
|
, fetchFromGitHub
|
2022-03-30 09:31:56 +00:00
|
|
|
, fetchpatch
|
2020-04-24 23:36:52 +00:00
|
|
|
, cmake
|
2022-01-22 01:22:15 +00:00
|
|
|
, extra-cmake-modules
|
2020-04-24 23:36:52 +00:00
|
|
|
, qtbase
|
|
|
|
, qtquickcontrols2
|
|
|
|
, SDL
|
|
|
|
, python3
|
2022-04-15 01:41:22 +00:00
|
|
|
, catch2
|
2022-03-30 09:31:56 +00:00
|
|
|
, callPackage
|
|
|
|
, nixosTests
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
mkDerivation rec {
|
|
|
|
pname = "sfxr-qt";
|
2022-03-30 09:31:56 +00:00
|
|
|
version = "1.5.0";
|
2022-01-22 01:22:15 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "agateau";
|
|
|
|
repo = "sfxr-qt";
|
|
|
|
rev = version;
|
2022-03-30 09:31:56 +00:00
|
|
|
sha256 = "sha256-Ce5NJe1f+C4pPmtenHYvtkxste+nPuxJoB+N7K2nyRo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
2022-01-22 01:22:15 +00:00
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
postPatch = ''
|
|
|
|
cp ${catch2}/include/catch2/catch.hpp 3rdparty/catch2/single_include/catch2/catch.hpp
|
|
|
|
'';
|
|
|
|
|
2022-03-30 09:31:56 +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=";
|
|
|
|
})];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
2022-01-22 01:22:15 +00:00
|
|
|
extra-cmake-modules
|
2020-04-24 23:36:52 +00:00
|
|
|
(python3.withPackages (pp: with pp; [ pyyaml jinja2 setuptools ]))
|
|
|
|
];
|
2022-01-22 01:22:15 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [
|
|
|
|
qtbase
|
|
|
|
qtquickcontrols2
|
|
|
|
SDL
|
|
|
|
];
|
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
passthru.tests = {
|
|
|
|
export-square-wave = callPackage ./test-export-square-wave {};
|
|
|
|
sfxr-qt-starts = nixosTests.sfxr-qt;
|
|
|
|
};
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/agateau/sfxr-qt";
|
|
|
|
description = "A sound effect generator, QtQuick port of sfxr";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "sfxr-qt";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ fgaz ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|