mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 07:31:20 +00:00
uchiwa: 0.21.1
Include script to upgrade.
This commit is contained in:
parent
c013f9240e
commit
b52fa7b622
23
pkgs/servers/monitoring/uchiwa/bower-packages.nix
Normal file
23
pkgs/servers/monitoring/uchiwa/bower-packages.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
# Generated by bower2nix v3.1.1 (https://github.com/rvl/bower2nix)
|
||||
{ fetchbower, buildEnv }:
|
||||
buildEnv { name = "bower-env"; ignoreCollisions = true; paths = [
|
||||
(fetchbower "uchiwa-web" "0.22.1" "0.22.1" "09rhssb5bpwdahdl2fxkjmax8cqg2m51bbf0m3lhkcrcjfc2w8kj")
|
||||
(fetchbower "angular" "1.4.14" "~1.4" "1j5d80bxqh9lgcbmd661bsk8xrhnf43ym77jsk9n845gqr02bdkl")
|
||||
(fetchbower "angular-bootstrap" "2.2.0" "~2.2.0" "0zbimxmrmgbz60xg5rnkhv4gd0zvp5fdjdx5407r6a942irfy2x7")
|
||||
(fetchbower "angular-cookies" "1.4.14" "~1.4" "10z9azpd228jwdn8p767a93xhb5nrypwa0j6491kbcvm2q1k0g6a")
|
||||
(fetchbower "angular-gravatar" "0.3.2" "~0.3.1" "17d2sc828dsnlkjc4b9irandpimqwan8hlvk9wlmlv8yiyi685p6")
|
||||
(fetchbower "angular-mass-autocomplete-uchiwa" "0.4.1" "0.4.1" "1h2ypg35f6nd6gy6yznpiadql13lk1gyccq6qd4mvksbyb5va6l5")
|
||||
(fetchbower "angular-moment" "0.9.2" "~0.9.0" "143vivplxqd03vg23ynad2yrlgn6dmad7avjmzh0ina2qx7zslgf")
|
||||
(fetchbower "angular-resource" "1.4.14" "~1.4" "1ll2qd0kn39fl5aa49894n1bfcl8dgrfk0w154rkhg7k732q18bk")
|
||||
(fetchbower "angular-route" "1.4.14" "~1.4" "0wfdgvvldgzf7c4lba3x8mw38l9zwkm0i9fg8ad7pvjkqz133sqs")
|
||||
(fetchbower "angular-sanitize" "1.4.14" "~1.4" "072b8dcxjp4cjvcjqxsd0bxa8xd2nqvjb1v878qgfkhf0wz44x32")
|
||||
(fetchbower "angular-toastr" "1.6.0" "1.6.0" "1yksx3a4c3cva5liq087z4j196p0vxp1mzhbr27qr9wmyy6z84z1")
|
||||
(fetchbower "angular-ua-parser" "0.0.2" "0.0.2" "0z24747b0sywjyzl5chcwr96mpmyr595bry63c4d35mp186ail5z")
|
||||
(fetchbower "bootstrap" "3.1.1" "3.1.1" "036xbjpv4621p5r2l9vfm9zys6h1mhkvb0zhvk3irrmkzsl77hwh")
|
||||
(fetchbower "bootstrap-sass-official" "3.1.1" "3.1.1" "0rfmja15p8kxz6i3liwyqrmbm82azq61d3882w2vmp08vvv2c371")
|
||||
(fetchbower "fontawesome" "4.4.0" "~4.4.0" "1mbs0vhixvg11vj3n0l3jn3pb6s839rcs416zq2wzfqkbvsc3sf5")
|
||||
(fetchbower "highlightjs" "9.1.0" "~9.1.0" "1gz4q922sylbbqw1sawmjjq8nw0mk90wq0qq95ap0f31px7bfm3f")
|
||||
(fetchbower "moment" "2.8.4" "~2.8.3" "1h30g5an2m9dja09m1s93hsfb25pzl0iah8mmab7nispl3mb585z")
|
||||
(fetchbower "ua-parser-js" "0.7.12" "~0.7.12" "1hrhi7cdf5zd86jz7ipbb23qvkfplghfa92wa3aysca1rpg5zgpd")
|
||||
(fetchbower "jquery" "3.1.1" ">= 1.9.0" "0rkp1hakimnjh3rvlzi30w7qx9x1j0gzjpaajgljn79kd082sgpd")
|
||||
]; }
|
6
pkgs/servers/monitoring/uchiwa/bower.json
Normal file
6
pkgs/servers/monitoring/uchiwa/bower.json
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"name": "uchiwa",
|
||||
"dependencies": {
|
||||
"uchiwa-web": "0.21.0"
|
||||
}
|
||||
}
|
50
pkgs/servers/monitoring/uchiwa/default.nix
Normal file
50
pkgs/servers/monitoring/uchiwa/default.nix
Normal file
|
@ -0,0 +1,50 @@
|
|||
{ stdenv, fetchFromGitHub, buildBowerComponents, buildGoPackage, makeWrapper }:
|
||||
|
||||
let
|
||||
inherit (import ./src.nix) version sha256;
|
||||
owner = "sensu";
|
||||
repo = "uchiwa";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
inherit owner repo sha256;
|
||||
rev = "${version}";
|
||||
};
|
||||
|
||||
backend = buildGoPackage {
|
||||
name = "uchiwa-backend-${version}";
|
||||
goPackagePath = "github.com/${owner}/${repo}";
|
||||
inherit src;
|
||||
postInstall = ''
|
||||
cp go/src/github.com/sensu/uchiwa/public/index.html $out/
|
||||
'';
|
||||
};
|
||||
|
||||
frontend = buildBowerComponents {
|
||||
name = "uchiwa-frontend-${version}";
|
||||
generated = ./bower-packages.nix;
|
||||
inherit src;
|
||||
};
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
name = "uchiwa-${version}";
|
||||
|
||||
inherit src;
|
||||
|
||||
buildInputs = [ makeWrapper ];
|
||||
|
||||
buildCommand = ''
|
||||
mkdir -p $out/bin $out/public
|
||||
makeWrapper ${backend.bin}/bin/uchiwa $out/bin/uchiwa \
|
||||
--add-flags "-p $out/public"
|
||||
ln -s ${backend.out}/index.html $out/public/index.html
|
||||
ln -s ${frontend.out}/bower_components $out/public/bower_components
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A Dashboard for the sensu monitoring framework";
|
||||
homepage = http://sensuapp.org/;
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ peterhoeg ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
4
pkgs/servers/monitoring/uchiwa/src.nix
Normal file
4
pkgs/servers/monitoring/uchiwa/src.nix
Normal file
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
version = "0.22.1";
|
||||
sha256 = "15wa7zhchis2rh6jcqkindlidmbf3mryr3apnqnr27ydi2vlqn3g";
|
||||
}
|
31
pkgs/servers/monitoring/uchiwa/update.sh
Executable file
31
pkgs/servers/monitoring/uchiwa/update.sh
Executable file
|
@ -0,0 +1,31 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p nodePackages.bower2nix curl.bin git.out jq.out
|
||||
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
||||
# set -x
|
||||
|
||||
REPO=sensu/uchiwa
|
||||
|
||||
VERSION=$(curl https://api.github.com/repos/${REPO}/tags -s | jq '.[0]' -r | jq .name -r)
|
||||
|
||||
t=$(mktemp)
|
||||
|
||||
echo "Updating to: ${VERSION}"
|
||||
|
||||
curl https://raw.githubusercontent.com/${REPO}/${VERSION}/bower.json -s > $t
|
||||
bower2nix $t bower-packages.nix
|
||||
|
||||
pushd $(git rev-parse --show-toplevel)
|
||||
sha=$(nix-prefetch-url -A uchiwa.src)
|
||||
popd
|
||||
|
||||
cat <<_EOF > src.nix
|
||||
{
|
||||
version = "${VERSION}";
|
||||
sha256 = "${sha}";
|
||||
}
|
||||
_EOF
|
||||
|
||||
rm $t
|
|
@ -10806,6 +10806,8 @@ with pkgs;
|
|||
ruby = ruby_2_1;
|
||||
};
|
||||
|
||||
uchiwa = callPackage ../servers/monitoring/uchiwa { };
|
||||
|
||||
shishi = callPackage ../servers/shishi {
|
||||
pam = if stdenv.isLinux then pam else null;
|
||||
# see also openssl, which has/had this same trick
|
||||
|
|
Loading…
Reference in a new issue