Merge pull request #165009 from fgaz/sfxr-qt/1.5.0
This commit is contained in:
@@ -472,6 +472,7 @@ in
|
|||||||
seafile = handleTest ./seafile.nix {};
|
seafile = handleTest ./seafile.nix {};
|
||||||
searx = handleTest ./searx.nix {};
|
searx = handleTest ./searx.nix {};
|
||||||
service-runner = handleTest ./service-runner.nix {};
|
service-runner = handleTest ./service-runner.nix {};
|
||||||
|
sfxr-qt = handleTest ./sfxr-qt.nix {};
|
||||||
shadow = handleTest ./shadow.nix {};
|
shadow = handleTest ./shadow.nix {};
|
||||||
shadowsocks = handleTest ./shadowsocks {};
|
shadowsocks = handleTest ./shadowsocks {};
|
||||||
shattered-pixel-dungeon = handleTest ./shattered-pixel-dungeon.nix {};
|
shattered-pixel-dungeon = handleTest ./shattered-pixel-dungeon.nix {};
|
||||||
|
|||||||
32
nixos/tests/sfxr-qt.nix
Normal file
32
nixos/tests/sfxr-qt.nix
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
import ./make-test-python.nix ({ pkgs, ... }: {
|
||||||
|
name = "sfxr-qt";
|
||||||
|
meta = with pkgs.lib.maintainers; {
|
||||||
|
maintainers = [ fgaz ];
|
||||||
|
};
|
||||||
|
|
||||||
|
machine = { config, pkgs, ... }: {
|
||||||
|
imports = [
|
||||||
|
./common/x11.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
services.xserver.enable = true;
|
||||||
|
sound.enable = true;
|
||||||
|
environment.systemPackages = [ pkgs.sfxr-qt ];
|
||||||
|
};
|
||||||
|
|
||||||
|
enableOCR = true;
|
||||||
|
|
||||||
|
testScript =
|
||||||
|
''
|
||||||
|
machine.wait_for_x()
|
||||||
|
# Add a dummy sound card, or the program won't start
|
||||||
|
machine.execute("modprobe snd-dummy")
|
||||||
|
|
||||||
|
machine.execute("sfxr-qt >&2 &")
|
||||||
|
|
||||||
|
machine.wait_for_window(r"sfxr")
|
||||||
|
machine.sleep(10)
|
||||||
|
machine.wait_for_text("requency")
|
||||||
|
machine.screenshot("screen")
|
||||||
|
'';
|
||||||
|
})
|
||||||
@@ -1,26 +1,36 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, mkDerivation
|
, mkDerivation
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
|
, fetchpatch
|
||||||
, cmake
|
, cmake
|
||||||
, extra-cmake-modules
|
, extra-cmake-modules
|
||||||
, qtbase
|
, qtbase
|
||||||
, qtquickcontrols2
|
, qtquickcontrols2
|
||||||
, SDL
|
, SDL
|
||||||
, python3
|
, python3
|
||||||
|
, callPackage
|
||||||
|
, nixosTests
|
||||||
}:
|
}:
|
||||||
|
|
||||||
mkDerivation rec {
|
mkDerivation rec {
|
||||||
pname = "sfxr-qt";
|
pname = "sfxr-qt";
|
||||||
version = "1.4.0";
|
version = "1.5.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "agateau";
|
owner = "agateau";
|
||||||
repo = "sfxr-qt";
|
repo = "sfxr-qt";
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "sha256-Mn+wcwu70BwsTLFlc12sOOe6U1AJ8hR7bCIPlPnCooE=";
|
sha256 = "sha256-Ce5NJe1f+C4pPmtenHYvtkxste+nPuxJoB+N7K2nyRo=";
|
||||||
fetchSubmodules = true;
|
fetchSubmodules = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# 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=";
|
||||||
|
})];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
cmake
|
cmake
|
||||||
extra-cmake-modules
|
extra-cmake-modules
|
||||||
@@ -33,6 +43,11 @@ mkDerivation rec {
|
|||||||
SDL
|
SDL
|
||||||
];
|
];
|
||||||
|
|
||||||
|
passthru.tests = {
|
||||||
|
export-square-wave = callPackage ./test-export-square-wave {};
|
||||||
|
sfxr-qt-starts = nixosTests.sfxr-qt;
|
||||||
|
};
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://github.com/agateau/sfxr-qt";
|
homepage = "https://github.com/agateau/sfxr-qt";
|
||||||
description = "A sound effect generator, QtQuick port of sfxr";
|
description = "A sound effect generator, QtQuick port of sfxr";
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{ runCommand, sfxr-qt }:
|
||||||
|
|
||||||
|
runCommand "sfxr-qt-test-export-square-wave" ''
|
||||||
|
mkdir $out
|
||||||
|
${sfxr-qt}/bin/sfxr-qt --export --output $out/output.wav ${./input.sfxj}
|
||||||
|
''
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"properties": {
|
||||||
|
"attackTime": 0,
|
||||||
|
"baseFrequency": 1,
|
||||||
|
"changeAmount": 0,
|
||||||
|
"changeSpeed": 0,
|
||||||
|
"decayTime": 1,
|
||||||
|
"deltaSlide": 0,
|
||||||
|
"dutySweep": 0,
|
||||||
|
"hpFilterCutoff": 0,
|
||||||
|
"hpFilterCutoffSweep": 0,
|
||||||
|
"lpFilterCutoff": 1,
|
||||||
|
"lpFilterCutoffSweep": 0,
|
||||||
|
"lpFilterResonance": 0,
|
||||||
|
"minFrequency": 0,
|
||||||
|
"phaserOffset": 0,
|
||||||
|
"phaserSweep": 0,
|
||||||
|
"repeatSpeed": 0,
|
||||||
|
"slide": 0,
|
||||||
|
"squareDuty": 0,
|
||||||
|
"sustainPunch": 0,
|
||||||
|
"sustainTime": 1,
|
||||||
|
"vibratoDepth": 0,
|
||||||
|
"vibratoSpeed": 0,
|
||||||
|
"volume": 1,
|
||||||
|
"waveForm": "Square"
|
||||||
|
},
|
||||||
|
"version": 1
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user