-
Notifications
You must be signed in to change notification settings - Fork 73
Expand file tree
/
Copy pathflake.nix
More file actions
52 lines (50 loc) · 1.46 KB
/
flake.nix
File metadata and controls
52 lines (50 loc) · 1.46 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
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
};
outputs =
{ nixpkgs, ... }:
let
forAllSystems =
fn:
nixpkgs.lib.genAttrs [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" ] (
system: fn nixpkgs.legacyPackages.${system}
);
in
{
packages = forAllSystems (pkgs: {
default =
let
# Pin Go 1.25.7 until nixpkgs-unstable catches up from staging
go_pinned = pkgs.go_1_25.overrideAttrs (old: rec {
version = "1.25.7";
src = pkgs.fetchurl {
url = "https://go.dev/dl/go${version}.src.tar.gz";
hash = "sha256-F48oMoICdLQ+F30y8Go+uwEp5CfdIKXkyI3ywXY88Qo=";
};
});
in
(pkgs.buildGoModule.override { go = go_pinned; }) {
pname = "msgvault";
version = "0.0.0-dev";
src = ./.;
vendorHash = "sha256-eKB+XIzs7RBKr8PrR4eCduAYuUv/oDafszfgcIKy8TU=";
proxyVendor = true;
subPackages = [ "cmd/msgvault" ];
tags = [ "fts5" ];
ldflags = [
"-X github.com/wesm/msgvault/cmd/msgvault/cmd.Version=nix-dev"
];
};
});
devShells = forAllSystems (pkgs: {
default = pkgs.mkShell {
packages = with pkgs; [
go
golangci-lint
gcc
];
};
});
};
}