Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5 which,
6 versionCheckHook,
7 nix-update-script,
8}:
9buildGoModule rec {
10 pname = "bed";
11 version = "0.2.8";
12
13 src = fetchFromGitHub {
14 owner = "itchyny";
15 repo = "bed";
16 tag = "v${version}";
17 hash = "sha256-NXTQMyCI4PKaQPxZqklH03BEDMUrTCNtFUj2FNwIsNM=";
18 };
19 vendorHash = "sha256-tp83T6V4HM7SgpZASMWnIoqgw/s/DhdJMsCu2C6OuTo=";
20
21 nativeBuildInputs = [ which ];
22
23 nativeInstallCheckInputs = [
24 versionCheckHook
25 ];
26 versionCheckProgramArg = "-version";
27 doInstallCheck = true;
28
29 passthru = {
30 updateScript = nix-update-script { };
31 };
32
33 meta = {
34 description = "Binary editor written in Go";
35 homepage = "https://github.com/itchyny/bed";
36 changelog = "https://github.com/itchyny/bed/releases/tag/v${version}";
37 license = lib.licenses.mit;
38 maintainers = with lib.maintainers; [ xiaoxiangmoe ];
39 mainProgram = "bed";
40 };
41}