1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-16 18:03:22 +00:00
nixpkgs/pkgs/servers/gotify/default.nix

55 lines
1.2 KiB
Nix
Raw Normal View History

2019-10-05 08:46:51 +01:00
{ stdenv
, buildGoPackage
, lib
2019-10-05 08:46:51 +01:00
, fetchFromGitHub
, buildGoModule
, sqlite
, callPackage
}:
buildGoModule rec {
pname = "gotify-server";
# should be update just like all other files imported like that via the
# `update.sh` script.
version = import ./version.nix;
2019-10-05 08:46:51 +01:00
src = fetchFromGitHub {
owner = "gotify";
repo = "server";
rev = "v${version}";
sha256 = import ./source-sha.nix;
2019-10-05 08:46:51 +01:00
};
vendorSha256 = import ./vendor-sha.nix;
2019-10-05 08:46:51 +01:00
doCheck = false;
buildInputs = [ sqlite ];
2019-10-05 08:46:51 +01:00
ui = callPackage ./ui.nix { };
preBuild = ''
cp -r ${ui}/libexec/gotify-ui/deps/gotify-ui/build ui/build && go run hack/packr/packr.go
2019-10-05 08:46:51 +01:00
'';
2020-05-10 21:12:41 +01:00
passthru = {
updateScript = ./update.sh;
};
2019-10-05 08:46:51 +01:00
# Otherwise, all other subpackages are built as well and from some reason,
# produce binaries which panic when executed and are not interesting at all
subPackages = [ "." ];
buildFlagsArray = [
"-ldflags=-X main.Version=${version} -X main.Mode=prod"
2019-10-05 08:46:51 +01:00
];
meta = with stdenv.lib; {
description = "A simple server for sending and receiving messages in real-time per WebSocket";
homepage = "https://gotify.net";
license = licenses.mit;
maintainers = with maintainers; [ doronbehar ];
};
}