tg-timer: init at 0.7.0 (#425278)

authored by Sandro and committed by GitHub 932e0af9 0f3e2f35

+158
+18
pkgs/by-name/tg/tg-timer/audio.patch
···
··· 1 + diff --git a/src/audio.c b/src/audio.c 2 + index d1b9762..cb544dd 100644 3 + 4 + This package assumes that there will always be an audio device while testing. 5 + If there is not an audio device, it segfaults. So in the Nix sandbox, it 6 + unconditionally segfaults without this patch. This patch allows the tests 7 + to flow through the normal error handling logic. 8 + 9 + --- a/src/audio.c 10 + +++ b/src/audio.c 11 + @@ -637,7 +637,6 @@ int start_portaudio(int device, int *nominal_sample_rate, double *real_sample_ra 12 + if(testing) { 13 + *nominal_sample_rate = PA_SAMPLE_RATE; 14 + *real_sample_rate = PA_SAMPLE_RATE; 15 + - goto end; 16 + } 17 + #endif 18 +
+74
pkgs/by-name/tg/tg-timer/package.nix
···
··· 1 + { 2 + lib, 3 + stdenv, 4 + fetchFromGitHub, 5 + # Configure 6 + autoreconfHook, 7 + # Build binaries 8 + pkg-config, 9 + # Build libraries 10 + gtk3, 11 + portaudio, 12 + fftwFloat, 13 + libjack2, 14 + python3, 15 + # Check Binaries 16 + xvfb-run, 17 + }: 18 + stdenv.mkDerivation (finalAttrs: { 19 + pname = "tg-timer"; 20 + version = "0.7.0"; 21 + 22 + src = fetchFromGitHub { 23 + owner = "xyzzy42"; 24 + repo = "tg"; 25 + tag = "v${finalAttrs.version}-tpiepho"; 26 + hash = "sha256-9QeTjr/J0Y10YfPKEfYnciu5z2+hmmWFKLdw6CCS3hU="; 27 + }; 28 + 29 + patches = [ 30 + ./audio.patch 31 + ]; 32 + 33 + nativeBuildInputs = [ 34 + autoreconfHook 35 + pkg-config 36 + ]; 37 + 38 + buildInputs = [ 39 + gtk3 40 + portaudio 41 + fftwFloat 42 + libjack2 43 + (python3.withPackages (p: [ 44 + p.numpy 45 + p.matplotlib 46 + p.libtfr 47 + p.scipy 48 + ])) 49 + ]; 50 + 51 + enableParallelBuilding = true; 52 + 53 + doCheck = true; 54 + nativeCheckInputs = [ 55 + xvfb-run 56 + ]; 57 + checkPhase = '' 58 + runHook preCheck 59 + 60 + xvfb-run -s '-screen 0 800x600x24' \ 61 + make -j "$NIX_BUILD_CORES" test 62 + 63 + runHook postCheck 64 + ''; 65 + 66 + meta = { 67 + description = "for timing mechanical watches"; 68 + homepage = "https://github.com/xyzzy42/tg"; 69 + changelog = "https://github.com/xyzzy42/tg/releases/tag/v${finalAttrs.version}-tpiepho"; 70 + license = lib.licenses.gpl2Plus; 71 + mainProgram = "tg"; 72 + maintainers = with lib.maintainers; [ RossSmyth ]; 73 + }; 74 + })
+64
pkgs/development/python-modules/libtfr/default.nix
···
··· 1 + { 2 + lib, 3 + fetchPypi, 4 + buildPythonPackage, 5 + 6 + # build-system 7 + setuptools, 8 + pkg-config, 9 + cython, 10 + pkgconfig, 11 + 12 + # Dependencies 13 + numpy, 14 + fftw, 15 + lapack, 16 + 17 + # Check 18 + pytestCheckHook, 19 + }: 20 + buildPythonPackage rec { 21 + pname = "libtfr"; 22 + version = "2.1.9"; 23 + pyproject = true; 24 + 25 + src = fetchPypi { 26 + inherit pname version; 27 + hash = "sha256-GxRjkQ6ng2wNONRit8ZsCwWsVlXy//7taeU6np/5aU0="; 28 + }; 29 + 30 + nativeBuildInputs = [ 31 + pkg-config 32 + cython 33 + ]; 34 + 35 + buildInputs = [ 36 + fftw 37 + lapack 38 + ]; 39 + 40 + build-system = [ 41 + setuptools 42 + ]; 43 + 44 + dependencies = [ 45 + numpy 46 + pkgconfig 47 + ]; 48 + 49 + nativeCheckInputs = [ 50 + pytestCheckHook 51 + ]; 52 + 53 + pythonImportsCheck = [ "libtfr" ]; 54 + 55 + meta = { 56 + description = "fast multitaper conventional and reassignment spectrograms"; 57 + homepage = "https://melizalab.github.io/libtfr/"; 58 + downloadPage = "https://github.com/melizalab/libtfr"; 59 + license = lib.licenses.gpl2Plus; 60 + maintainers = with lib.maintainers; [ 61 + RossSmyth 62 + ]; 63 + }; 64 + }
+2
pkgs/top-level/python-packages.nix
··· 8248 8249 libsupermesh = callPackage ../development/python-modules/libsupermesh { }; 8250 8251 libthumbor = callPackage ../development/python-modules/libthumbor { }; 8252 8253 libtmux = callPackage ../development/python-modules/libtmux { };
··· 8248 8249 libsupermesh = callPackage ../development/python-modules/libsupermesh { }; 8250 8251 + libtfr = callPackage ../development/python-modules/libtfr { }; 8252 + 8253 libthumbor = callPackage ../development/python-modules/libthumbor { }; 8254 8255 libtmux = callPackage ../development/python-modules/libtmux { };