elixir: make 1.15 default and pin existing pkgs to 1.14

This commit is contained in:
Alexandru Scvortov 2023-10-29 21:03:06 +00:00 committed by Yt
parent 942908f7f5
commit cbbe57bc52
8 changed files with 38 additions and 11 deletions

View File

@ -390,6 +390,9 @@
- `zfs` was updated from 2.1.x to 2.2.0, [enabling newer kernel support and adding new features](https://github.com/openzfs/zfs/releases/tag/zfs-2.2.0).
- Elixir now defaults to version
[v1.15](https://elixir-lang.org/blog/2023/06/19/elixir-v1-15-0-released/).
- A new option was added to the virtualisation module that enables specifying explicitly named network interfaces in QEMU VMs. The existing `virtualisation.vlans` is still supported for cases where the name of the network interface is irrelevant.
- DocBook option documentation is no longer supported, all module documentation now uses markdown.

View File

@ -86,7 +86,7 @@ let
# Erlang/Elixir uses a somewhat special format for IP addresses
erlAddr = addr: fileContents
(pkgs.runCommand addr {
nativeBuildInputs = with pkgs; [ elixir ];
nativeBuildInputs = [ cfg.package.elixirPackage ];
code = ''
case :inet.parse_address('${addr}') do
{:ok, addr} -> IO.inspect addr
@ -96,7 +96,7 @@ let
passAsFile = [ "code" ];
} ''elixir "$codePath" >"$out"'');
format = pkgs.formats.elixirConf { };
format = pkgs.formats.elixirConf { elixir = cfg.package.elixirPackage; };
configFile = format.generate "config.exs"
(replaceSec
(attrsets.updateManyAttrsByPath [{
@ -146,7 +146,7 @@ let
initSecretsScript = writeShell {
name = "akkoma-init-secrets";
runtimeInputs = with pkgs; [ coreutils elixir ];
runtimeInputs = with pkgs; [ coreutils cfg.package.elixirPackage ];
text = let
key-base = web.secret_key_base;
jwt-signer = ex.":joken".":default_signer";

View File

@ -8,7 +8,7 @@ let
user = "mobilizon";
group = "mobilizon";
settingsFormat = pkgs.formats.elixirConf { elixir = pkgs.elixir_1_14; };
settingsFormat = pkgs.formats.elixirConf { elixir = cfg.package.elixirPackage; };
configFile = settingsFormat.generate "mobilizon-config.exs" cfg.settings;
@ -309,7 +309,7 @@ in
genCookie = "IO.puts(Base.encode32(:crypto.strong_rand_bytes(32)))";
evalElixir = str: ''
${pkgs.elixir_1_14}/bin/elixir --eval '${str}'
${cfg.package.elixirPackage}/bin/elixir --eval '${str}'
'';
in
''

View File

@ -43,7 +43,7 @@ let
elvis-erlang = callPackage ./elvis-erlang { };
# BEAM-based languages.
elixir = elixir_1_14;
elixir = elixir_1_15;
elixir_1_15 = lib'.callElixir ../interpreters/elixir/1.15.nix {
inherit erlang;

View File

@ -172,6 +172,10 @@ beamPackages.mixRelease rec {
passthru = {
tests = with nixosTests; { inherit akkoma akkoma-confined; };
inherit mixNixDeps;
# Used to make sure the service uses the same version of elixir as
# the package
elixirPackage = beamPackages.elixir;
};
meta = with lib; {

View File

@ -8,6 +8,7 @@
, cmake
, nixosTests
, mobilizon-frontend
, ...
}:
let
@ -126,6 +127,7 @@ mixRelease rec {
${mix2nix}/bin/mix2nix $SRC/mix.lock > pkgs/servers/mobilizon/mix.nix
cat $SRC/js/package.json > pkgs/servers/mobilizon/package.json
'';
elixirPackage = beamPackages.elixir;
};
meta = with lib; {

View File

@ -4,6 +4,7 @@
, fetchFromGitHub
, nodejs
, nixosTests
, ...
}:
let

View File

@ -740,7 +740,9 @@ with pkgs;
inherit (darwin) DarwinTools;
};
mix2nix = callPackage ../development/tools/mix2nix { };
mix2nix = callPackage ../development/tools/mix2nix {
elixir = elixir_1_14;
};
n98-magerun = callPackage ../development/tools/misc/n98-magerun { };
@ -1546,7 +1548,10 @@ with pkgs;
adminer = callPackage ../servers/adminer { };
akkoma = callPackage ../servers/akkoma { };
akkoma = callPackage ../servers/akkoma {
elixir = elixir_1_14;
beamPackages = beamPackages.extend (self: super: { elixir = elixir_1_14; });
};
akkoma-frontends = recurseIntoAttrs {
akkoma-fe = callPackage ../servers/akkoma/akkoma-fe { };
admin-fe = callPackage ../servers/akkoma/admin-fe { };
@ -3995,6 +4000,7 @@ with pkgs;
livebook = callPackage ../servers/web-apps/livebook {
elixir = elixir_1_15;
beamPackages = beamPackages.extend (self: super: { elixir = elixir_1_15; });
};
lsix = callPackage ../tools/graphics/lsix { };
@ -4099,7 +4105,10 @@ with pkgs;
play-with-mpv = callPackage ../tools/video/play-with-mpv { };
plausible = callPackage ../servers/web-apps/plausible { };
plausible = callPackage ../servers/web-apps/plausible {
elixir = elixir_1_14;
beamPackages = beamPackages.extend (self: super: { elixir = elixir_1_14; });
};
pam-reattach = callPackage ../os-specific/darwin/pam-reattach { };
@ -6021,6 +6030,8 @@ with pkgs;
moar = callPackage ../tools/misc/moar { };
mobilizon = callPackage ../servers/mobilizon {
elixir = elixir_1_14;
beamPackages = beamPackages.extend (self: super: { elixir = elixir_1_14; });
mobilizon-frontend = callPackage ../servers/mobilizon/frontend.nix { };
};
@ -12146,7 +12157,10 @@ with pkgs;
tautulli = python3Packages.callPackage ../servers/tautulli { };
pleroma = callPackage ../servers/pleroma { };
pleroma = callPackage ../servers/pleroma {
elixir = elixir_1_14;
beamPackages = beamPackages.extend (self: super: { elixir = elixir_1_14; });
};
plfit = callPackage ../tools/misc/plfit {
python = null;
@ -35358,7 +35372,10 @@ with pkgs;
wavebox = libsForQt5.callPackage ../applications/networking/instant-messengers/wavebox { };
sonic-pi = libsForQt5.callPackage ../applications/audio/sonic-pi { };
sonic-pi = libsForQt5.callPackage ../applications/audio/sonic-pi {
elixir = elixir_1_14;
beamPackages = beamPackages.extend (self: super: { elixir = elixir_1_14; });
};
stag = callPackage ../applications/misc/stag {
curses = ncurses;