nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5 testers,
6 risor,
7}:
8
9buildGoModule rec {
10 pname = "risor";
11 version = "1.8.1";
12
13 src = fetchFromGitHub {
14 owner = "risor-io";
15 repo = "risor";
16 rev = "v${version}";
17 hash = "sha256-Vw0fslKtBGdL6BjzNYzGRneQ+jtNDvAymlUxNa0lKZ8=";
18 };
19
20 proxyVendor = true;
21 vendorHash = "sha256-yVvryqPB35Jc3MXIJyRlFhAHU8H8PmSs60EO/JABHDs=";
22
23 subPackages = [
24 "cmd/risor"
25 ];
26
27 ldflags = [
28 "-s"
29 "-w"
30 "-X=main.version=${version}"
31 ];
32
33 passthru.tests = {
34 version = testers.testVersion {
35 package = risor;
36 command = "risor version";
37 };
38 };
39
40 meta = with lib; {
41 description = "Fast and flexible scripting for Go developers and DevOps";
42 mainProgram = "risor";
43 homepage = "https://github.com/risor-io/risor";
44 changelog = "https://github.com/risor-io/risor/releases/tag/${src.rev}";
45 license = licenses.asl20;
46 maintainers = with maintainers; [ figsoda ];
47 };
48}