1{
2 mkDerivation,
3 lib,
4 fetchFromGitHub,
5 fftw,
6 libsndfile,
7 qtbase,
8 qtmultimedia,
9 qmake,
10}:
11
12let
13
14 reaperFork = {
15 src = fetchFromGitHub {
16 sha256 = "07m2wf2gqyya95b65gawrnr4pvc9jyzmg6h8sinzgxlpskz93wwc";
17 rev = "39053e8896eedd7b3e8a9e9a9ffd80f1fc6ceb16";
18 repo = "REAPER";
19 owner = "gillesdegottex";
20 };
21 meta = with lib; {
22 license = licenses.asl20;
23 };
24 };
25
26 libqaudioextra = {
27 src = fetchFromGitHub {
28 sha256 = "0m6x1qm7lbjplqasr2jhnd2ndi0y6z9ybbiiixnlwfm23sp15wci";
29 rev = "9ae051989a8fed0b2f8194b1501151909a821a89";
30 repo = "libqaudioextra";
31 owner = "gillesdegottex";
32 };
33 meta = with lib; {
34 license = licenses.gpl3Plus;
35 };
36 };
37
38in
39mkDerivation rec {
40 pname = "dfasma";
41 version = "1.4.5";
42
43 src = fetchFromGitHub {
44 sha256 = "09fcyjm0hg3y51fnjax88m93im39nbynxj79ffdknsazmqw9ac0h";
45 rev = "v${version}";
46 repo = "dfasma";
47 owner = "gillesdegottex";
48 };
49
50 buildInputs = [
51 fftw
52 libsndfile
53 qtbase
54 qtmultimedia
55 ];
56
57 nativeBuildInputs = [ qmake ];
58
59 postPatch = ''
60 cp -Rv "${reaperFork.src}"/* external/REAPER
61 cp -Rv "${libqaudioextra.src}"/* external/libqaudioextra
62 substituteInPlace dfasma.pro --replace "CONFIG += file_sdif" "";
63 '';
64
65 meta = with lib; {
66 description = "Analyse and compare audio files in time and frequency";
67 mainProgram = "dfasma";
68 longDescription = ''
69 DFasma is free open-source software to compare audio files by time and
70 frequency. The comparison is first visual, using wavforms and spectra. It
71 is also possible to listen to time-frequency segments in order to allow
72 perceptual comparison. It is basically dedicated to analysis. Even though
73 there are basic functionalities to align the signals in time and
74 amplitude, this software does not aim to be an audio editor.
75 '';
76 homepage = "https://gillesdegottex.gitlab.io/dfasma-website/";
77 license = [
78 licenses.gpl3Plus
79 reaperFork.meta.license
80 ];
81 platforms = platforms.linux;
82 };
83}