2023-10-09 19:29:22 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, fetchpatch, darwin, alsa-lib, stdenv }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "sampler";
|
|
|
|
version = "1.1.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sqshq";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-H7QllAqPp35wHeJ405YSfPX3S4lH0/hdQ8Ja2OGLVtE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
patches = [
|
|
|
|
# fix build with go 1.17
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/sqshq/sampler/commit/97a4a0ebe396a780d62f50f112a99b27044e832b.patch";
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-c9nP92YHKvdc156OXgYVoyNNa5TkoFeDa78WxOTR9rM=";
|
2022-06-16 17:23:12 +00:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
vendorHash = "sha256-UZLF/oJbWUKwIPyWcT1QX+rIU5SRnav/3GLq2xT+jgk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
subPackages = [ "." ];
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
buildInputs = lib.optional stdenv.isLinux alsa-lib
|
|
|
|
++ lib.optionals stdenv.isDarwin [
|
|
|
|
darwin.apple_sdk.frameworks.OpenAL
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Tool for shell commands execution, visualization and alerting";
|
|
|
|
homepage = "https://sampler.dev";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = with maintainers; [ uvnikita ];
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "sampler";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2020-08-20 17:08:02 +00:00
|
|
|
}
|