mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 01:13:05 +00:00
Merge pull request #320795 from NukaDuka/oncall
This commit is contained in:
commit
21c2debcb8
@ -2,8 +2,9 @@
|
||||
|
||||
grafanaPlugin {
|
||||
pname = "grafana-oncall-app";
|
||||
version = "1.5.1";
|
||||
zipHash = "sha256-3mC4TJ9ACM9e3e6UKI5vaDwXuW6RjbsOQFJU5v0wjk8=";
|
||||
versionPrefix = "v";
|
||||
version = "1.7.1";
|
||||
zipHash = "sha256-G3QZq26fzv6sJ5j7QKdPPXhEj95iounZO+Ak8cXZDLc=";
|
||||
meta = with lib; {
|
||||
description = "Developer-friendly incident response for Grafana";
|
||||
license = licenses.agpl3Only;
|
||||
|
@ -1,14 +1,14 @@
|
||||
{ stdenvNoCC, fetchurl, unzip, lib }:
|
||||
|
||||
{ pname, version, zipHash, meta ? {}, passthru ? {}, ... }@args:
|
||||
{ pname, versionPrefix ? "", version, zipHash, meta ? {}, passthru ? {}, ... }@args:
|
||||
let plat = stdenvNoCC.hostPlatform.system; in stdenvNoCC.mkDerivation ({
|
||||
inherit pname version;
|
||||
inherit pname versionPrefix version;
|
||||
|
||||
src = if lib.isAttrs zipHash then
|
||||
fetchurl {
|
||||
name = "${pname}-${version}-${plat}.zip";
|
||||
name = "${pname}-${versionPrefix}${version}-${plat}.zip";
|
||||
hash = zipHash.${plat} or (throw "Unsupported system: ${plat}");
|
||||
url = "https://grafana.com/api/plugins/${pname}/versions/${version}/download" + {
|
||||
url = "https://grafana.com/api/plugins/${pname}/versions/${versionPrefix}${version}/download" + {
|
||||
x86_64-linux = "?os=linux&arch=amd64";
|
||||
aarch64-linux = "?os=linux&arch=arm64";
|
||||
x86_64-darwin = "?os=darwin&arch=amd64";
|
||||
@ -17,9 +17,9 @@ let plat = stdenvNoCC.hostPlatform.system; in stdenvNoCC.mkDerivation ({
|
||||
}
|
||||
else
|
||||
fetchurl {
|
||||
name = "${pname}-${version}.zip";
|
||||
name = "${pname}-${versionPrefix}${version}.zip";
|
||||
hash = zipHash;
|
||||
url = "https://grafana.com/api/plugins/${pname}/versions/${version}/download";
|
||||
url = "https://grafana.com/api/plugins/${pname}/versions/${versionPrefix}${version}/download";
|
||||
}
|
||||
;
|
||||
|
||||
@ -38,4 +38,4 @@ let plat = stdenvNoCC.hostPlatform.system; in stdenvNoCC.mkDerivation ({
|
||||
meta = {
|
||||
homepage = "https://grafana.com/grafana/plugins/${pname}";
|
||||
} // meta;
|
||||
} // (builtins.removeAttrs args [ "zipHash" "pname" "version" "sha256" "meta" ]))
|
||||
} // (builtins.removeAttrs args [ "zipHash" "pname" "versionPrefix" "version" "sha256" "meta" ]))
|
||||
|
Loading…
Reference in New Issue
Block a user