waitron: init at 2020-01-24
This commit is contained in:
parent
5040cd56b0
commit
701ddad4ce
4 changed files with 102 additions and 0 deletions
30
pkgs/tools/networking/waitron/default.nix
Normal file
30
pkgs/tools/networking/waitron/default.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
# This file was generated by https://github.com/kamilchm/go2nix v1.3.0
|
||||
{ stdenv, buildGoPackage, fetchgit, fetchhg, fetchbzr, fetchsvn }:
|
||||
|
||||
buildGoPackage rec {
|
||||
name = "waitron-unstable-${version}";
|
||||
version = "2020-01-24";
|
||||
rev = "c96833619cbb0cf2bc71b1d7b534101e139cc6e6";
|
||||
|
||||
goPackagePath = "github.com/ns1/waitron";
|
||||
|
||||
src = fetchgit {
|
||||
inherit rev;
|
||||
url = "https://github.com/ns1/waitron";
|
||||
sha256 = "0lgw37iq1cvg3mqc94nzf0027mvv721ay8x6dw3fc814ww8a2hb6";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./staticfiles-directory.patch
|
||||
];
|
||||
|
||||
goDeps = ./deps.nix;
|
||||
|
||||
meta = {
|
||||
description = "A tool to manage network booting of machines";
|
||||
homepage = "https://github.com/ns1/waitron";
|
||||
license = stdenv.lib.licenses.asl20;
|
||||
maintainers = with stdenv.lib.maintainers; [ guibert ];
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
};
|
||||
}
|
57
pkgs/tools/networking/waitron/deps.nix
generated
Normal file
57
pkgs/tools/networking/waitron/deps.nix
generated
Normal file
|
@ -0,0 +1,57 @@
|
|||
# This file was generated by https://github.com/kamilchm/go2nix v1.3.0
|
||||
[
|
||||
{
|
||||
goPackagePath = "github.com/flosch/pongo2";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/flosch/pongo2";
|
||||
rev = "bbf5a6c351f4d4e883daa40046a404d7553e0a00";
|
||||
sha256 = "0yqh58phznnxakm64w82gawrpndb0r85vsd1s7h244qqrq7w4avq";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/gorilla/handlers";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/gorilla/handlers";
|
||||
rev = "f08afc1876ad882db8074bcb8a4cc96107d3a5f4";
|
||||
sha256 = "1ysm6sw3jqa3h8pb5qpqgh44g91c23n3as277sh0vyp7282290jq";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/juju/errors";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/juju/errors";
|
||||
rev = "d42613fe1ab9e303fc850e7a19fda2e8eeb6516e";
|
||||
sha256 = "0qggzzvh9lzlfk8ixlyw8bw645rh0lrjrd367505hhl6cg18v8yf";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/julienschmidt/httprouter";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/julienschmidt/httprouter";
|
||||
rev = "8c9f31f047a304abedb5614d4a18a843cd5f4a40";
|
||||
sha256 = "00f5ja1yslrjclx3sf29mzpcsrpfd15kkw5ygv7n4jsyb4v3xgj6";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/satori/go.uuid";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/satori/go.uuid";
|
||||
rev = "b2ce2384e17bbe0c6d34077efa39dbab3e09123b";
|
||||
sha256 = "1yz4cx02377ijlf8mnn84j1dcmlwh8ncx7y3kw1zg2qw0z4x119c";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "gopkg.in/yaml.v2";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://gopkg.in/yaml.v2";
|
||||
rev = "53403b58ad1b561927d19068c655246f2db79d48";
|
||||
sha256 = "1inf7svydzscwv9fcjd2rm61a4xjk6jkswknybmns2n58shimapw";
|
||||
};
|
||||
}
|
||||
]
|
13
pkgs/tools/networking/waitron/staticfiles-directory.patch
Normal file
13
pkgs/tools/networking/waitron/staticfiles-directory.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
diff --git a/main.go b/main.go
|
||||
index 4046911..a126bae 100644
|
||||
--- a/main.go
|
||||
+++ b/main.go
|
||||
@@ -411,7 +411,7 @@ func main() {
|
||||
|
||||
if configuration.StaticFilesPath != "" {
|
||||
fs := http.FileServer(http.Dir(configuration.StaticFilesPath))
|
||||
- r.Handler("GET", "/files/:filename", http.StripPrefix("/files/", fs))
|
||||
+ r.Handler("GET", "/files/*filepath", http.StripPrefix("/files/", fs))
|
||||
log.Println("Serving static files from " + configuration.StaticFilesPath)
|
||||
}
|
||||
|
|
@ -2103,6 +2103,8 @@ in
|
|||
|
||||
pixiecore = callPackage ../tools/networking/pixiecore {};
|
||||
|
||||
waitron = callPackage ../tools/networking/waitron {};
|
||||
|
||||
pyCA = python3Packages.callPackage ../applications/video/pyca {};
|
||||
|
||||
pyznap = python3Packages.callPackage ../tools/backup/pyznap {};
|
||||
|
|
Loading…
Reference in a new issue