mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-01 02:23:54 +00:00
4f0dadbf38
After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-builda08b3a4d19
.tar.gz \ --argstr baseRevb32a094368
result/bin/apply-formatting $NIXPKGS_PATH
72 lines
1.7 KiB
Nix
72 lines
1.7 KiB
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
buildGoModule,
|
|
sqlite,
|
|
callPackage,
|
|
nixosTests,
|
|
nix-update-script,
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "gotify-server";
|
|
version = "2.6.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "gotify";
|
|
repo = "server";
|
|
rev = "v${version}";
|
|
hash = "sha256-6PmJnRBovyufrSB+uMbU+bqhZb1bEs39MxBVMnnE6f8=";
|
|
};
|
|
|
|
# With `allowGoReference = true;`, `buildGoModule` adds the `-trimpath`
|
|
# argument for Go builds which apparently breaks the UI like this:
|
|
#
|
|
# server[780]: stat /var/lib/private/ui/build/index.html: no such file or directory
|
|
allowGoReference = true;
|
|
|
|
vendorHash = "sha256-aru1Q3esLtyxV6CVup4qjsuaJlM5DuLuP8El4RYoVVE=";
|
|
|
|
doCheck = false;
|
|
|
|
buildInputs = [
|
|
sqlite
|
|
];
|
|
|
|
ui = callPackage ./ui.nix { };
|
|
|
|
preBuild = ''
|
|
if [ -n "$ui" ] # to make the preBuild a no-op inside the goModules fixed-output derivation, where it would fail
|
|
then
|
|
cp -r $ui ui/build
|
|
fi
|
|
'';
|
|
|
|
passthru = {
|
|
# For nix-update to detect the location of this attribute from this
|
|
# derivation.
|
|
inherit (ui) offlineCache;
|
|
updateScript = nix-update-script { };
|
|
tests = {
|
|
nixos = nixosTests.gotify-server;
|
|
};
|
|
};
|
|
|
|
# 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 = [ "." ];
|
|
|
|
ldflags = [
|
|
"-X main.Version=${version}"
|
|
"-X main.Mode=prod"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Simple server for sending and receiving messages in real-time per WebSocket";
|
|
homepage = "https://gotify.net";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ doronbehar ];
|
|
mainProgram = "server";
|
|
};
|
|
}
|