treewide: Reformat project with alejandra

This commit is contained in:
Tristan Daniël Maat 2022-10-10 13:03:08 +01:00
parent 58e52dd119
commit 046a88905d
Signed by: tlater
GPG key ID: 49670FD774E43268
17 changed files with 405 additions and 353 deletions

View file

@ -1,8 +1,12 @@
{ inputs, lib, pkgs, ... }:
let
{
inputs,
lib,
pkgs,
...
}: let
inherit (lib) makeExtensible foldr attrValues;
tlater-lib = makeExtensible (self:
let callLibs = file: import file { inherit self lib pkgs inputs; };
in { minecraft = callLibs ./minecraft.nix; });
in tlater-lib.extend (self: super: foldr (a: b: a // b) { } (attrValues super))
tlater-lib = makeExtensible (self: let
callLibs = file: import file {inherit self lib pkgs inputs;};
in {minecraft = callLibs ./minecraft.nix;});
in
tlater-lib.extend (self: super: foldr (a: b: a // b) {} (attrValues super))

View file

@ -1,6 +1,8 @@
{ lib, pkgs, ... }:
{
lib,
pkgs,
...
}: {
# Make a modpack given its mod inputs.
#
# Mods should be attrsets in this format:
@ -13,7 +15,11 @@
#
# This may be nice to read from a json ;)
#
mkModpack = { name, version, mods }:
mkModpack = {
name,
version,
mods,
}:
pkgs.stdenv.mkDerivation {
inherit name version;
srcs = map pkgs.local.fetchFromCurseForge mods;
@ -28,7 +34,11 @@
'';
};
mkModpackZip = { name, version, mods }:
mkModpackZip = {
name,
version,
mods,
}:
pkgs.stdenv.mkDerivation {
inherit name version;
srcs = map pkgs.local.fetchFromCurseForge mods;
@ -37,7 +47,7 @@
preUnpack = "mkdir -p src/";
unpackCmd = "cp $curSrc src/";
buildInputs = [ pkgs.zip];
buildInputs = [pkgs.zip];
buildPhase = ''
zip voor-kia-mods.zip *.jar