nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5 installShellFiles,
6 stdenv,
7}:
8
9buildGoModule rec {
10 pname = "hof";
11 version = "0.6.10";
12
13 src = fetchFromGitHub {
14 owner = "hofstadter-io";
15 repo = "hof";
16 rev = "v${version}";
17 hash = "sha256-okc11mXqB/PaXd0vsRuIIL70qWSFprvsZJtE6PvCaIg=";
18 };
19
20 nativeBuildInputs = [ installShellFiles ];
21
22 vendorHash = "sha256-mLOWnHzKw/B+jFNuswejEnYbPxFkk95I/BWeHRTH55I=";
23
24 subPackages = [ "./cmd/hof" ];
25
26 postInstall = ''
27 local INSTALL="$out/bin/hof"
28 installShellCompletion --cmd hof \
29 --bash <($out/bin/hof completion bash) \
30 --fish <($out/bin/hof completion fish) \
31 --zsh <($out/bin/hof completion zsh)
32 '';
33
34 meta = with lib; {
35 homepage = "https://github.com/hofstadter-io/hof";
36 description = "Framework that joins data models, schemas, code generation, and a task engine. Language and technology agnostic";
37 license = licenses.asl20;
38 maintainers = with maintainers; [ jfvillablanca ];
39 mainProgram = "hof";
40 # Broken on darwin for Go toolchain > 1.22, with error:
41 # 'panic: open /etc/protocols: operation not permitted'
42 broken = stdenv.hostPlatform.isDarwin;
43 };
44}