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