-
Notifications
You must be signed in to change notification settings - Fork 1
/
default.nix
140 lines (125 loc) · 4.36 KB
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
let
# Function to fetch a tarball with Nix expressions from GitHub
fetchTarballFromGitHub = { repo, owner, rev, sha256, name ? "" }:
fetchTarball {
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz";
inherit sha256;
inherit name;
};
# import <nixpkgs> {}; but from a specific commit.
pkgs = import (fetchTarballFromGitHub {
owner = "NixOS";
repo = "nixpkgs";
rev= "afd2bdbad25db4b0007b52d07161345e6426ae72";
sha256 = "1n47x3y2q6pxncnp9xq7kxvc9p239g1xkp1wzdw2a9sp9hfva65q";
}){};
inherit (pkgs) callPackage;
latex = pkgs.texlive.combined.scheme-full;
in rec {
# PDF version of the thesis
thesis = callPackage ./nix/thesis {
inherit latex thesis-source python;
};
# PDF version of thesis announcement
thesis-announcement = callPackage ./nix/announcement {
inherit latex thesis-source;
};
# Standalone source tree containing everything needed to build the thesis.
thesis-source = callPackage ./nix/thesis-source {
inherit references media audio overview-paper;
};
overview-paper = callPackage ./nix/overview-paper {
inherit media audio figures references latex python;
};
audio = callPackage ./nix/audio {
inherit media python;
inherit (pkgs) zip;
};
figures = callPackage ./nix/figures {
inherit media;
};
# Bibtex library with references/citations
references = ./data/library.bib; #/home/freddy/Data/Media/References/library.bib;
# references = /home/freddy/Data/Media/References/library.bib;
data = rec {
# Tarball with listening test data.
listening-test-tests = pkgs.fetchurl {
url = https://zenodo.org/record/376263/files/test.tar.gz;
sha256 = "1zg9yg794g3wk2kqv259134hlkd5rwqib8zvlvwz70589cc1pism";
};
# CSV text file with listening test results
listening-test-results = pkgs.fetchurl {
url = https://zenodo.org/record/376268/files/results.csv;
sha256 = "0f32451gcr2ikxcb7qwj28q6m7rq148s6vic14j66b1g3hnh7vv8";
};
};
# Media: figures and audio
media = rec {
# Step-by-step add propagation effects
propagation = callPackage ./nix/media/propagation {
inherit python;
inherit (lib) matplotlibHook;
};
# Basic sound, impedance, reflection, attenuation
sound = callPackage ./nix/media/sound {
inherit python;
inherit (lib) matplotlibHook;
};
# Basic sound, Lloyd's mirror effect.
sound-mirror-effect = callPackage ./nix/media/sound-mirror-effect {
inherit python;
inherit (lib) matplotlibHook to_wav;
};
# Signal processing. Convolution.
signal-processing = callPackage ./nix/media/signal-processing {
inherit python;
inherit (lib) matplotlibHook;
};
# Signal processing. Comparison interpolation methods.
signal-processing-resampling = callPackage ./nix/media/signal-processing-resampling {
inherit python;
inherit (lib) matplotlibHook to_wav;
};
# Chapter 5. Turbulence and a pure tone.
turbulence-tone = callPackage ./nix/media/turbulence-tone {
inherit python;
inherit (lib) matplotlibHook;
};
turbulence-parameters = callPackage ./nix/media/turbulence-parameters {
inherit python;
inherit (lib) matplotlibHook to_wav;
};
# Distant source with aircraft-like spectrum. Atmospheric turbulence.
propagation-distant = callPackage ./nix/media/propagation-distant {
inherit python;
inherit (lib) matplotlibHook to_wav;
};
# From recording to auralisation. Samples from second paper.
recording-to-auralisation = callPackage ./nix/media/recording-to-auralisation {
inherit python;
inherit (lib) matplotlibHook to_wav;
};
# Listening test data
listening = callPackage ./nix/media/listening {
inherit python;
inherit (lib) matplotlibHook;
inherit (data) listening-test-tests;
};
listening-analysis = callPackage ./nix/media/listening-analysis {
inherit python;
inherit (lib) matplotlibHook;
inherit (data) listening-test-tests listening-test-results;
};
};
# Library of functions
lib = callPackage ./nix/lib {
inherit python;
};
# Python interpreter that has extra packages available
python = callPackage ./nix/packages { };
# Papers that are appended to the thesis
papers = {
overview = ./data/papers/overview.pdf;
turbulence = ./data/papers/turbulence.pdf;
};
}