This repository was archived by the owner on Aug 7, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathflake.nix
More file actions
74 lines (64 loc) · 1.81 KB
/
Copy pathflake.nix
File metadata and controls
74 lines (64 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
{
description = "A Nix flake for horeb.";
inputs = {
devshell = {
url = "github:numtide/devshell";
inputs.nixpkgs.follows = "pkgs";
};
flake-utils.url = "github:numtide/flake-utils";
pkgs.url = "github:nixos/nixpkgs/release-22.05";
};
outputs = {self, ...} @ inputs:
(inputs.flake-utils.lib.eachDefaultSystem (system: let
pkgs = import inputs.pkgs {
inherit system;
overlays = [inputs.devshell.overlay];
};
in {
apps = with self.packages.${system}; {
default = self.apps.${system}.horeb;
horeb = {
program = "${default}/bin/horeb";
type = "app";
};
};
checks = {
build = self.packages.${system}.default;
};
devShells = {
default = pkgs.devshell.fromTOML ./devshell.toml;
};
packages = let
inherit (pkgs) buildGo119Module;
inherit (pkgs.lib) fakeSha256 licenses;
pname = "horeb";
version = "0.15.0";
in {
default = buildGo119Module {
inherit pname version;
src = self;
packages = ["cmd/..."];
vendorSha256 = "sha256-18QLdD0FvUeUY7cZEvYEAts0pgwPS/ViqSjczksA81c=";
ldflags = [
"-s"
"-w"
"-X main.Version=${version}"
];
meta = {
description = "Speaking in tongues via stdout.";
homepage = "https://github.com/qjcg/horeb";
license = licenses.mit;
};
};
};
}))
# Avoids nix flake check error: overlay does not take an argument named 'final'
# See e.g. https://github.com/ivanovs-4/haskell-flake-utils/issues/2
// {
overlays = {
default = final: prev: {
horeb = self.packages.${prev.system}.default;
};
};
};
}