at 23.11-beta 39 lines 1.0 kB view raw
1{ lib, buildGoModule, fetchFromGitHub, fetchpatch, darwin, alsa-lib, stdenv }: 2 3buildGoModule rec { 4 pname = "sampler"; 5 version = "1.1.0"; 6 7 src = fetchFromGitHub { 8 owner = "sqshq"; 9 repo = pname; 10 rev = "v${version}"; 11 hash = "sha256-H7QllAqPp35wHeJ405YSfPX3S4lH0/hdQ8Ja2OGLVtE="; 12 }; 13 14 patches = [ 15 # fix build with go 1.17 16 (fetchpatch { 17 url = "https://github.com/sqshq/sampler/commit/97a4a0ebe396a780d62f50f112a99b27044e832b.patch"; 18 hash = "sha256-c9nP92YHKvdc156OXgYVoyNNa5TkoFeDa78WxOTR9rM="; 19 }) 20 ]; 21 22 vendorHash = "sha256-UZLF/oJbWUKwIPyWcT1QX+rIU5SRnav/3GLq2xT+jgk="; 23 24 doCheck = false; 25 26 subPackages = [ "." ]; 27 28 buildInputs = lib.optional stdenv.isLinux alsa-lib 29 ++ lib.optionals stdenv.isDarwin [ 30 darwin.apple_sdk.frameworks.OpenAL 31 ]; 32 33 meta = with lib; { 34 description = "Tool for shell commands execution, visualization and alerting"; 35 homepage = "https://sampler.dev"; 36 license = licenses.gpl3; 37 maintainers = with maintainers; [ uvnikita ]; 38 }; 39}