This repository was archived by the owner on Apr 28, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
63 lines (56 loc) · 2.17 KB
/
flake.nix
File metadata and controls
63 lines (56 loc) · 2.17 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
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
systems.url = "github:nix-systems/default";
};
outputs = {
nixpkgs,
systems,
...
}: let
eachSystem = nixpkgs.lib.genAttrs (import systems);
nixpkgsFor = system:
import nixpkgs {
inherit system;
overlays = [
(final: prev: {
# as of nixpkgs/nixpkgs-unstable@8bc6cf8907b5f38851c7c0a7599bfa2ccf0a29eb (14-04-2025),
# bun is still at v1.2.8 and we need v1.2.9 for `S3Client.list`.
bun = let
inherit (prev) fetchurl stdenvNoCC;
version = "1.2.9";
sources = {
aarch64-darwin = fetchurl {
url = "https://github.com/oven-sh/bun/releases/download/bun-v${version}/bun-darwin-aarch64.zip";
hash = "sha256-valv+2j45f0W0rNEMiWuXibI2+eQy7Nd26Jht74oBhg=";
};
aarch64-linux = fetchurl {
url = "https://github.com/oven-sh/bun/releases/download/bun-v${version}/bun-linux-aarch64.zip";
hash = "sha256-oqtdrUAxo7RdNzomfL0FE+c+m1TOsNu5tF1veHZ/aac=";
};
x86_64-darwin = fetchurl {
url = "https://github.com/oven-sh/bun/releases/download/bun-v${version}/bun-darwin-x64-baseline.zip";
hash = "sha256-XP9phMQsYMHy9oIbOchsAVLj4UMnUFRGNt2JoPardZY=";
};
x86_64-linux = fetchurl {
url = "https://github.com/oven-sh/bun/releases/download/bun-v${version}/bun-linux-x64.zip";
hash = "sha256-LAjGN0h8YcN38pmlkZ6P9Pyghbqa/obOE9Wy93mb82s=";
};
};
in
prev.bun.overrideAttrs (old: {
inherit version;
src = sources.${stdenvNoCC.hostPlatform.system} or (throw "unsupported system: ${stdenvNoCC.hostPlatform.system}");
});
})
];
};
in {
formatter = eachSystem (system: (nixpkgsFor system).alejandra);
devShells = eachSystem (system: let
pkgs = nixpkgsFor system;
in {
default = pkgs.mkShell { buildInputs = [pkgs.bun]; };
});
};
}