about summary refs log tree commit diff
path: root/pkgs/applications/audio
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2022-03-27 11:39:40 +0200
committerGitHub <noreply@github.com>2022-03-27 11:39:40 +0200
commitc2bc9e6c56e5e5a2625cba4701ab2960fcd2efe6 (patch)
tree4cbc893808bfabec6a27de2b388a3de1cac825b1 /pkgs/applications/audio
parent5cbbec9f2c5263b59bd81c1795855c4d04ed07bd (diff)
parentb9bc59d832bea0bb30c9aff06c18f8e877a4539d (diff)
downloadnixlib-c2bc9e6c56e5e5a2625cba4701ab2960fcd2efe6.tar
nixlib-c2bc9e6c56e5e5a2625cba4701ab2960fcd2efe6.tar.gz
nixlib-c2bc9e6c56e5e5a2625cba4701ab2960fcd2efe6.tar.bz2
nixlib-c2bc9e6c56e5e5a2625cba4701ab2960fcd2efe6.tar.lz
nixlib-c2bc9e6c56e5e5a2625cba4701ab2960fcd2efe6.tar.xz
nixlib-c2bc9e6c56e5e5a2625cba4701ab2960fcd2efe6.tar.zst
nixlib-c2bc9e6c56e5e5a2625cba4701ab2960fcd2efe6.zip
Merge pull request #165009 from fgaz/sfxr-qt/1.5.0
Diffstat (limited to 'pkgs/applications/audio')
-rw-r--r--pkgs/applications/audio/sfxr-qt/default.nix19
-rw-r--r--pkgs/applications/audio/sfxr-qt/test-export-square-wave/default.nix6
-rw-r--r--pkgs/applications/audio/sfxr-qt/test-export-square-wave/input.sfxj29
3 files changed, 52 insertions, 2 deletions
diff --git a/pkgs/applications/audio/sfxr-qt/default.nix b/pkgs/applications/audio/sfxr-qt/default.nix
index bf8b826f544f..0ffd754c0476 100644
--- a/pkgs/applications/audio/sfxr-qt/default.nix
+++ b/pkgs/applications/audio/sfxr-qt/default.nix
@@ -1,26 +1,36 @@
 { lib
 , mkDerivation
 , fetchFromGitHub
+, fetchpatch
 , cmake
 , extra-cmake-modules
 , qtbase
 , qtquickcontrols2
 , SDL
 , python3
+, callPackage
+, nixosTests
 }:
 
 mkDerivation rec {
   pname = "sfxr-qt";
-  version = "1.4.0";
+  version = "1.5.0";
 
   src = fetchFromGitHub {
     owner = "agateau";
     repo = "sfxr-qt";
     rev = version;
-    sha256 = "sha256-Mn+wcwu70BwsTLFlc12sOOe6U1AJ8hR7bCIPlPnCooE=";
+    sha256 = "sha256-Ce5NJe1f+C4pPmtenHYvtkxste+nPuxJoB+N7K2nyRo=";
     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 = [
     cmake
     extra-cmake-modules
@@ -33,6 +43,11 @@ mkDerivation rec {
     SDL
   ];
 
+  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 = "A sound effect generator, QtQuick port of sfxr";
diff --git a/pkgs/applications/audio/sfxr-qt/test-export-square-wave/default.nix b/pkgs/applications/audio/sfxr-qt/test-export-square-wave/default.nix
new file mode 100644
index 000000000000..eea0d0743e6a
--- /dev/null
+++ b/pkgs/applications/audio/sfxr-qt/test-export-square-wave/default.nix
@@ -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}
+''
diff --git a/pkgs/applications/audio/sfxr-qt/test-export-square-wave/input.sfxj b/pkgs/applications/audio/sfxr-qt/test-export-square-wave/input.sfxj
new file mode 100644
index 000000000000..5ffd33b93f97
--- /dev/null
+++ b/pkgs/applications/audio/sfxr-qt/test-export-square-wave/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
+}