nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 74 lines 1.3 kB view raw
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}: 18stdenv.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})