okami.mom/albedo

git clone https://git.nkp.pet/okami.mom/albedo

nekomimi.petfix(nix): track nixos-unstable so CI stops compiling Gleam 1.195b4d1b2

main
1.3 KiB41 linesraw
1{
2  imports = [
3    ./devShells.nix
4    ./packages.nix
5    ./treefmt.nix
6  ];
7
8  # The daemon needs OTP 29: its HTTP streams flush zstd frames per event.
9  # Passed explicitly rather than overlaid, so cached packages built against
10  # the default Erlang, gleam among them, are not rebuilt.
11  perSystem = {
12    lib,
13    pkgs,
14    ...
15  }: {
16    _module.args.beamPackages = pkgs.beam.packages.erlang_29;
17
18    # The sources are formatted by Gleam 1.19, whose formatter and 1.18's
19    # each reject the other's output. Built from source (hashes from nixpkgs
20    # master) only while the locked nixpkgs still ships an older release.
21    _module.args.gleam =
22      if lib.versionAtLeast pkgs.gleam.version "1.19.0"
23      then pkgs.gleam
24      else
25        pkgs.gleam.overrideAttrs (finalAttrs: _: {
26          version = "1.19.0";
27          src = pkgs.fetchFromGitHub {
28            owner = "gleam-lang";
29            repo = "gleam";
30            tag = "v${finalAttrs.version}";
31            hash = "sha256-uMD1ZI8A0gdQbIFvJ9q9CVSJ+jvxJiCzdJ1d2r/BHys=";
32          };
33          cargoDeps = pkgs.rustPlatform.fetchCargoVendor {
34            inherit (finalAttrs) pname version src;
35            hash = "sha256-TZWaKlgdKKM7IUjYu96rbgWsNjHW16E+UKleB68yIh0=";
36          };
37          # nixpkgs runs the compiler's suite for this release already.
38          doCheck = false;
39        });
40  };
41}