From a4d8f5232e079e9f1737e9029e5dd5e556e3f18f Mon Sep 17 00:00:00 2001 From: L-Nafaryus Date: Thu, 18 Jul 2024 15:49:05 +0500 Subject: [PATCH] flake: huge rework flake: fix name conventions flake: configurations -> lib.preconfiguredModules flake.packages: rework platform dependency with convient module and evaluator `lib.collectPackages` packages.bonfire-docs: convient evaluators `nixosModulesDoc` and `packagesDoc` new: packages.postgresql: container image new: packages.redis: container image remove: packages.lego: needed dns provider was added to lego and nixpkgs packages.netgen: broken --- README.md | 4 +- configurations/default.nix | 7 - flake.nix | 99 ++++------ lib/default.nix | 94 +++++++++- .../preconfiguredModules}/bonvim.nix | 0 nixosConfigurations/astora/default.nix | 12 +- nixosConfigurations/astora/users.nix | 8 +- nixosConfigurations/catarina/default.nix | 10 +- nixosConfigurations/catarina/users.nix | 1 - nixosConfigurations/default.nix | 33 ++++ nixosModules/default.nix | 44 ++++- nixosModules/services/spoofdpi.nix | 6 +- .../bonfire-docs}/bonfire-logo.png | Bin packages/bonfire-docs/book.toml | 1 + packages/bonfire-docs/default.nix | 175 ++++-------------- packages/bonfire-docs/nixosModulesDoc.nix | 64 +++++++ packages/bonfire-docs/packagesDoc.nix | 137 ++++++++++++++ packages/bonfire-docs/src/SUMMARY.md | 12 +- .../src/{options => nixosModules}/README.md | 6 +- .../bonfire-docs/src/{faq.md => notes.md} | 2 +- packages/bonfire-docs/src/packages/README.md | 36 ++++ packages/bonvim/default.nix | 39 ++-- packages/cargo-shuttle/default.nix | 11 +- packages/dearpygui/default.nix | 4 +- packages/default.nix | 106 ++++++++--- packages/lego/default.nix | 41 ---- packages/netgen/default.nix | 6 +- packages/nix-minimal/default.nix | 4 +- packages/nix-runner/default.nix | 7 +- packages/openfoam/default.nix | 4 +- packages/postgresql/default.nix | 58 ++++++ packages/redis/default.nix | 58 ++++++ packages/spoofdpi/default.nix | 4 +- packages/ultimmc/default.nix | 5 +- 34 files changed, 744 insertions(+), 354 deletions(-) delete mode 100644 configurations/default.nix rename {configurations => lib/preconfiguredModules}/bonvim.nix (100%) create mode 100644 nixosConfigurations/default.nix rename {etc => packages/bonfire-docs}/bonfire-logo.png (100%) create mode 100644 packages/bonfire-docs/nixosModulesDoc.nix create mode 100644 packages/bonfire-docs/packagesDoc.nix rename packages/bonfire-docs/src/{options => nixosModules}/README.md (72%) rename packages/bonfire-docs/src/{faq.md => notes.md} (94%) delete mode 100644 packages/lego/default.nix create mode 100644 packages/postgresql/default.nix create mode 100644 packages/redis/default.nix diff --git a/README.md b/README.md index 6723299..ea67d90 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@

- - bonfire-logo + + bonfire-logo

diff --git a/configurations/default.nix b/configurations/default.nix deleted file mode 100644 index d356b4d..0000000 --- a/configurations/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ - self, - inputs, - ... -}: { - bonvim = ./bonvim.nix; -} diff --git a/flake.nix b/flake.nix index b68e7f2..3455fe6 100644 --- a/flake.nix +++ b/flake.nix @@ -2,8 +2,14 @@ description = "Derivation lit"; nixConfig = { - extra-substituters = ["https://bonfire.cachix.org"]; - extra-trusted-public-keys = ["bonfire.cachix.org-1:mzAGBy/Crdf8NhKail5ciK7ZrGRbPJJobW6TwFb7WYM="]; + extra-substituters = [ + "https://cache.elnafo.ru" + "https://bonfire.cachix.org" + ]; + extra-trusted-public-keys = [ + "cache.elnafo.ru:j3VD+Hn+is2Qk3lPXDSdPwHJQSatizk7V82iJ2RP1yo=" + "bonfire.cachix.org-1:mzAGBy/Crdf8NhKail5ciK7ZrGRbPJJobW6TwFb7WYM=" + ]; }; inputs = { @@ -48,67 +54,28 @@ }; }; - outputs = { - self, - nixpkgs, - home-manager, - nixos-mailserver, - sops-nix, - crane, - fenix, - catppuccin, - oscuro, - ... - } @ inputs: let - lib = import ./lib {inherit (nixpkgs) lib;}; + outputs = {self, ...} @ inputs: let + lib = inputs.nixpkgs.lib; + + bonLib = import ./lib {inherit lib;}; + bonModules = self.nixosModules; + # no bonPkgs, it must be defined by appropriate system + skip a possible infinite recursion in { - inherit lib; + lib = bonLib; - nixosConfigurations = { - astora = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - modules = [ - home-manager.nixosModules.home-manager - ./nixosConfigurations/astora - self.nixosModules.bonfire - self.nixosModules.spoofdpi - (import ./nixosModules { - lib = nixpkgs.lib; - self = self; - }) - .configModule - ]; - specialArgs = {inherit self inputs;}; - }; + packages = import ./packages {inherit lib bonLib self inputs;}; - catarina = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - modules = [ - nixos-mailserver.nixosModules.mailserver - sops-nix.nixosModules.sops - oscuro.nixosModules.oscuro - ./nixosConfigurations/catarina - self.nixosModules.bonfire - self.nixosModules.spoofdpi - self.nixosModules.papermc - self.nixosModules.qbittorrent-nox - (import ./nixosModules { - lib = nixpkgs.lib; - self = self; - }) - .configModule - ]; - specialArgs = {inherit self;}; - }; + nixosModules = import ./nixosModules { + inherit lib bonLib self; + check = false; }; - nixosModules = - lib.importNamedModules - (import ./nixosModules { - lib = nixpkgs.lib; - self = self; - }) - .modules; + nixosConfigurations = import ./nixosConfigurations {inherit lib inputs bonModules bonLib self;}; + + hydraJobs = { + # filter broken packages ? + packages = lib.filterAttrsRecursive (name: value: !bonLib.isBroken value) self.packages; + }; templates = { rust = { @@ -117,16 +84,14 @@ }; }; - packages = import ./packages {inherit self inputs;}; + apps = import ./apps { + inherit self; + inherit (inputs) nixpkgs; + }; - apps = import ./apps {inherit self nixpkgs;}; - - devShells = import ./devShells {inherit self nixpkgs;}; - - configurations = import ./configurations {inherit self inputs;}; - - hydraJobs = { - inherit (self) packages; + devShells = import ./devShells { + inherit self; + inherit (inputs) nixpkgs; }; }; } diff --git a/lib/default.nix b/lib/default.nix index e50baa3..ad1cc85 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -1,17 +1,97 @@ {lib, ...}: rec { maintainers = import ./maintainers.nix; - moduleName = path: + nameFromPath = path: if builtins.baseNameOf (toString path) == "default.nix" then builtins.baseNameOf (lib.removeSuffix "/default.nix" (toString path)) else builtins.baseNameOf (lib.removeSuffix ".nix" (toString path)); - moduleNames = pathList: map (path: moduleName path) pathList; + preconfiguredModules = lib.listToAttrs (map (path: { + name = nameFromPath path; + value = import path; + }) + [ + ./preconfiguredModules/bonvim.nix + ]); - importModules = pathList: map (path: import path) pathList; + isBroken = derivation: derivation ? meta && derivation.meta ? broken && derivation.meta.broken; - importNamedModules = pathList: - lib.listToAttrs ( - lib.zipListsWith (name: value: {inherit name value;}) (moduleNames pathList) (importModules pathList) - ); + functionType = lib.types.mkOptionType { + name = "function"; + check = value: builtins.isFunction value; + }; + + platformType = lib.types.mkOptionType { + name = "platform"; + check = value: builtins.isString value && lib.any (v: v == value) lib.platforms.all; + }; + + packageType = with lib; + types.submodule { + options = { + source = mkOption { + type = types.oneOf [types.path functionType]; + description = "Path to file with expression to build derivation or expression"; + }; + platforms = mkOption { + type = types.listOf platformType; + description = "List of supported platforms"; + }; + builder = mkOption { + type = functionType; + description = "Function with platform specific inputs that call final build function"; + example = "{pkgs, ...}: pkgs.callPackage"; + }; + extraArgs = mkOption { + type = types.attrs; + default = {}; + description = "Extra arguments passed to builder inputs. Platform is not configured for this arguments"; + }; + }; + }; + + packagesModuleOptions = {...}: + with lib; { + options = { + packages = mkOption { + type = types.attrsOf packageType; + default = {}; + description = "Set of defined packages"; + }; + }; + }; + + collectPackages = platformInputs: packagesAttrs: let + packages = + (lib.evalModules { + modules = [ + packagesModuleOptions + ({...}: { + packages = packagesAttrs; + }) + ]; + }) + .config + .packages; + packagesList = lib.attrsToList packages; + + evaluateDerivation = system: name: package: let + platInputs = + if functionType.check platformInputs + then (platformInputs system) // package.extraArgs + else throw "`plaformInputs` must be a function: `system` -> {...}"; + platformBuilder = package.builder platInputs; + derivation = platformBuilder package.source platInputs; + in {${name} = derivation;}; + + evaluatedPackages = map ({ + name, + value, + }: + lib.genAttrs value.platforms ( + system: evaluateDerivation system name value + )) + packagesList; + in + lib.mapAttrs (name: value: lib.mergeAttrsList value) (lib.zipAttrs evaluatedPackages); } diff --git a/configurations/bonvim.nix b/lib/preconfiguredModules/bonvim.nix similarity index 100% rename from configurations/bonvim.nix rename to lib/preconfiguredModules/bonvim.nix diff --git a/nixosConfigurations/astora/default.nix b/nixosConfigurations/astora/default.nix index b5c3618..c932f3d 100644 --- a/nixosConfigurations/astora/default.nix +++ b/nixosConfigurations/astora/default.nix @@ -14,8 +14,16 @@ experimental-features = ["nix-command" "flakes" "repl-flake"]; trusted-users = ["l-nafaryus"]; allowed-users = ["l-nafaryus"]; - substituters = ["https://nix-community.cachix.org"]; - trusted-public-keys = ["nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="]; + substituters = [ + "https://cache.elnafo.ru" + "https://bonfire.cachix.org" + "https://nix-community.cachix.org" + ]; + trusted-public-keys = [ + "cache.elnafo.ru:j3VD+Hn+is2Qk3lPXDSdPwHJQSatizk7V82iJ2RP1yo=" + "bonfire.cachix.org-1:mzAGBy/Crdf8NhKail5ciK7ZrGRbPJJobW6TwFb7WYM=" + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + ]; auto-optimise-store = true; }; gc = { diff --git a/nixosConfigurations/astora/users.nix b/nixosConfigurations/astora/users.nix index 963abbe..66f0390 100644 --- a/nixosConfigurations/astora/users.nix +++ b/nixosConfigurations/astora/users.nix @@ -2,7 +2,7 @@ config, pkgs, lib, - self, + bonPkgs, inputs, ... }: { @@ -83,6 +83,8 @@ gxplugins-lv2 xtuner aether-lv2 + aeolus + grandorgue qbittorrent transmission_3-qt @@ -91,7 +93,7 @@ onlyoffice-bin jdk - self.packages.${pkgs.system}.ultimmc + bonPkgs.ultimmc liberation_ttf @@ -120,7 +122,7 @@ wl-clipboard cliphist tree - self.packages.${pkgs.system}.bonvim + bonPkgs.bonvim ]; xdg.portal = { diff --git a/nixosConfigurations/catarina/default.nix b/nixosConfigurations/catarina/default.nix index 000a0ea..7a87d58 100644 --- a/nixosConfigurations/catarina/default.nix +++ b/nixosConfigurations/catarina/default.nix @@ -2,11 +2,9 @@ config, pkgs, lib, - self, + bonPkgs, ... -}: let - bonfire-pkgs = self.packages.${pkgs.system}; -in { +}: { system.stateVersion = "23.11"; imports = [ @@ -23,10 +21,12 @@ in { trusted-users = ["l-nafaryus"]; allowed-users = ["l-nafaryus" "hydra" "hydra-www"]; substituters = [ + "https://cache.elnafo.ru" "https://bonfire.cachix.org" "https://nix-community.cachix.org" ]; trusted-public-keys = [ + "cache.elnafo.ru:j3VD+Hn+is2Qk3lPXDSdPwHJQSatizk7V82iJ2RP1yo=" "bonfire.cachix.org-1:mzAGBy/Crdf8NhKail5ciK7ZrGRbPJJobW6TwFb7WYM=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" ]; @@ -139,7 +139,7 @@ in { "bonfire.elnafo.ru" = { forceSSL = true; useACMEHost = "elnafo.ru"; - locations."/".root = "${bonfire-pkgs.bonfire-docs}"; + locations."/".root = "${bonPkgs.bonfire-docs}"; }; "hydra.elnafo.ru" = { diff --git a/nixosConfigurations/catarina/users.nix b/nixosConfigurations/catarina/users.nix index b10cb3b..1757f44 100644 --- a/nixosConfigurations/catarina/users.nix +++ b/nixosConfigurations/catarina/users.nix @@ -1,7 +1,6 @@ { config, pkgs, - lib, ... }: { # Users diff --git a/nixosConfigurations/default.nix b/nixosConfigurations/default.nix new file mode 100644 index 0000000..5310279 --- /dev/null +++ b/nixosConfigurations/default.nix @@ -0,0 +1,33 @@ +{ + lib, + inputs, + bonModules, + bonLib, + self, + ... +}: { + astora = lib.nixosSystem { + system = "x86_64-linux"; + modules = with inputs; [ + home-manager.nixosModules.home-manager + bonModules.bonfire + ./astora + ]; + specialArgs = { + inherit inputs; + bonPkgs = self.packages.x86_64-linux; + }; + }; + + catarina = lib.nixosSystem { + system = "x86_64-linux"; + modules = with inputs; [ + nixos-mailserver.nixosModules.mailserver + sops-nix.nixosModules.sops + oscuro.nixosModules.oscuro + bonModules.bonfire + ./catarina + ]; + specialArgs = {bonPkgs = self.packages.x86_64-linux;}; + }; +} diff --git a/nixosModules/default.nix b/nixosModules/default.nix index 6f8aae2..6cb53e6 100644 --- a/nixosModules/default.nix +++ b/nixosModules/default.nix @@ -1,10 +1,11 @@ { lib, - check ? true, + bonLib, self, + check ? true, ... -}: rec { - modules = [ +}: let + moduleList = [ ./misc/bonfire/default.nix ./services/papermc.nix ./services/qbittorrent-nox.nix @@ -17,11 +18,38 @@ ... }: { config = { - # Module type checking + # module type checking _module.check = check; - #_module.args.baseModules = modules; - #_module.args.pkgs = lib.mkDefault pkgs; - _module.args.bonpkgs = self.packages.${pkgs.system}; + # extra arguments + _module.args = { + bonPkgs = self.packages.${pkgs.system}; + }; }; }; -} + + importedModules = + map (path: {...}: { + # imports provide path for each module needed for documentation + # inject module configuration + imports = [path configModule]; + }) + moduleList; + + importedModuleNames = map (path: bonLib.nameFromPath path) moduleList; + + bonfireModule = { + config, + pkgs, + ... + }: { + # collect all modules + imports = importedModules; + }; +in + lib.listToAttrs ( + lib.zipListsWith (name: value: {inherit name value;}) importedModuleNames importedModules + ) + // { + bonfire = bonfireModule; + default = bonfireModule; + } diff --git a/nixosModules/services/spoofdpi.nix b/nixosModules/services/spoofdpi.nix index affc8f4..ecbb137 100644 --- a/nixosModules/services/spoofdpi.nix +++ b/nixosModules/services/spoofdpi.nix @@ -1,7 +1,7 @@ { config, lib, - bonpkgs, + bonPkgs, ... }: with lib; let @@ -12,8 +12,8 @@ in { package = mkOption { type = types.package; - default = bonpkgs.spoofdpi; - defaultText = literalExpression "bonpkgs.spoofdpi"; + default = bonPkgs.spoofdpi; + defaultText = literalExpression "bonPkgs.spoofdpi"; description = "The package to use."; }; diff --git a/etc/bonfire-logo.png b/packages/bonfire-docs/bonfire-logo.png similarity index 100% rename from etc/bonfire-logo.png rename to packages/bonfire-docs/bonfire-logo.png diff --git a/packages/bonfire-docs/book.toml b/packages/bonfire-docs/book.toml index 9c4f0a9..623b4f7 100644 --- a/packages/bonfire-docs/book.toml +++ b/packages/bonfire-docs/book.toml @@ -14,3 +14,4 @@ no-section-label = true git-repository-url = "https://vcs.elnafo.ru/L-Nafaryus/bonfire" git-repository-icon = "fa-git" cname = "elnafo.ru" +fold.enable = true diff --git a/packages/bonfire-docs/default.nix b/packages/bonfire-docs/default.nix index fe1486b..c8ace96 100644 --- a/packages/bonfire-docs/default.nix +++ b/packages/bonfire-docs/default.nix @@ -1,150 +1,39 @@ { - bonfire, + bonLib, + bonModules, + self, lib, pkgs, ... }: let - version = bonfire.shortRev or bonfire.dirtyShortRev or "unknown"; - projectPath = ../../.; - modulesPath = ../../nixosModules; + version = "unknown"; - links = [ - { - hostname = "vcs-elnafo"; - url = "https://vcs.elnafo.ru/L-Nafaryus/bonfire/src/branch/master"; - } - { - hostname = "github"; - url = "https://github.com/L-Nafaryus/bonfire/blob/master"; - } - ]; + nixosModulesDoc = import ./nixosModulesDoc.nix { + inherit lib pkgs version; - formatDeclaration = declaration: - if lib.hasPrefix (toString modulesPath) (toString declaration) - then let - subpath = lib.removePrefix (toString projectPath + "/") (toString declaration); - in - map ({ - hostname, - url, - }: { - url = "${url}/${subpath}"; - name = "<${hostname}:bonfire/${subpath}>"; - }) - links - else - # skip external declarations - lib.singleton declaration; - - nixosModules = import modulesPath { - inherit lib; - self = bonfire; - check = false; - }; - - evaluatedModules = lib.evalModules { - modules = nixosModules.modules ++ [nixosModules.configModule]; - }; - - optionsDoc = pkgs.nixosOptionsDoc { - options = builtins.removeAttrs evaluatedModules.options [ - "_module" - "system" + modules = bonModules; + root = ../../.; + declarations = [ + { + name = "elnafo-vcs"; + url = "https://vcs.elnafo.ru/L-Nafaryus/bonfire/src/branch/master"; + } + { + name = "github"; + url = "https://github.com/L-Nafaryus/bonfire/blob/master"; + } ]; - - transformOptions = option: - option - // { - declarations = lib.unique ( - lib.flatten (map (declaration: formatDeclaration declaration) option.declarations) - ++ option.declarations - ); - }; - documentType = "none"; - revision = version; + projectName = "bonfire"; + modulesPrefix = ../../nixosModules; }; - systems = builtins.attrNames bonfire.packages; - derivations = lib.flatten ( - map (packages: ( - map (name: packages.${name}) (builtins.attrNames packages) - )) (map (system: bonfire.packages.${system}) systems) - ); + packagesDoc = import ./packagesDoc.nix { + inherit lib pkgs; - renderMaintainers = maintainers: - lib.concatStringsSep ", " ( - let - maintainer = mt: - if mt ? github - then "[${mt.name}](https://github.com/${mt.github})" - else mt.name; - email = mt: - if mt ? email - then "<[${mt.email}](mailto:${mt.email})>" - else ""; - in - map (mt: maintainer mt + email mt) maintainers - ); - - renderPlatforms = platforms: - if platforms != lib.platforms.none - then - if platforms == lib.platforms.all - then "all" - else lib.concatStringsSep ", " (map (platform: "__${platform}__") platforms) - else ""; - - renderPackage = drv: '' - ## ${drv.pname} - - ${lib.optionalString (drv.meta ? description) drv.meta.description} - - ${lib.optionalString (drv.meta ? homepage) "[Homepage](${drv.meta.homepage})"} - - Version: __${drv.version}__ - - ${lib.optionalString (drv.meta ? license) "License: [${drv.meta.license.fullName}](${drv.meta.license.url})"} - - Outputs: ${lib.concatStringsSep ", " (map (o: "__${o}__") drv.outputs)} - - ${lib.optionalString (drv.meta ? mainProgram) "Provided programs: __${drv.meta.mainProgram}__"} - - ${lib.optionalString (drv.meta ? maintainers) "Maintainers: ${renderMaintainers drv.meta.maintainers}"} - - ${lib.optionalString (drv.meta ? platforms) "Platforms: ${renderPlatforms drv.meta.platforms}"} - ''; - - renderImage = drv: '' - ## ${drv.imageName} - - ${lib.optionalString (drv.meta ? description) drv.meta.description} - - ${lib.optionalString (drv.meta ? homepage) "[Homepage](${drv.meta.homepage})"} - - Tag: __${drv.imageTag}__ - - ${lib.optionalString (drv.fromImage != null) "From: __${drv.fromImage.imageName}__"} - - ${lib.optionalString (drv.meta ? license) "License: ${ - if lib.isList drv.meta.license - then (map (license: "[${drv.meta.license.fullName}](${drv.meta.license.url})") drv.meta.license) - else "[${drv.meta.license.fullName}](${drv.meta.license.url})" - }"} - - ${lib.optionalString (drv.meta ? maintainers) "Maintainers: ${renderMaintainers drv.meta.maintainers}"} - - ${lib.optionalString (drv.meta ? platforms) "Platforms: ${renderPlatforms drv.meta.platforms}"} - ''; - - packagesDoc = - pkgs.writeText "packages.md" - (lib.concatStringsSep "\n" (map (drv: - if drv ? imageTag - then renderImage drv - else if drv ? pname - then renderPackage drv - else "") - derivations)); + packages = self.packages; + repoUrl = "https://vcs.elnafo.ru/L-Nafaryus/bonfire/src/branch/master"; + hydraUrl = "https://hydra.elnafo.ru/job/bonfire/master"; + }; in pkgs.stdenvNoCC.mkDerivation { pname = "bonfire-docs"; @@ -166,9 +55,15 @@ in buildPhase = '' runHook preBuild + ln -s ${../../README.md} src/README.md - ln -s ${optionsDoc.optionsCommonMark} src/options/modules.md - ln -s ${packagesDoc} src/packages/packages.md + + ${lib.concatStringsSep "\n" (map (module_: "ln -s ${module_.commonMarkdown} src/nixosModules/${module_.name}.md") nixosModulesDoc.documentation)} + substituteInPlace src/SUMMARY.md --replace '{{nixosModulesSummary}}' '${lib.concatStringsSep "\n" nixosModulesDoc.summary}' + + ${lib.concatStringsSep "\n" (map (package_: "ln -s ${package_.commonMarkdown} src/packages/${package_.name}.md") packagesDoc.documentation)} + substituteInPlace src/SUMMARY.md --replace '{{packagesSummary}}' '${lib.concatStringsSep "\n" packagesDoc.summary}' + mdbook build runHook postBuild ''; @@ -188,9 +83,9 @@ in }; meta = with lib; { - description = "Bonfire HTML documentation."; + description = "Bonfire documentation."; license = licenses.mit; - maintainers = with bonfire.lib.maintainers; [L-Nafaryus]; + maintainers = with bonLib.maintainers; [L-Nafaryus]; platforms = lib.platforms.all; }; } diff --git a/packages/bonfire-docs/nixosModulesDoc.nix b/packages/bonfire-docs/nixosModulesDoc.nix new file mode 100644 index 0000000..46917f4 --- /dev/null +++ b/packages/bonfire-docs/nixosModulesDoc.nix @@ -0,0 +1,64 @@ +{ + lib, + pkgs, + modules, + excludedModules ? ["default"], + root ? null, + declarations ? {}, + projectName ? "", + modulesPrefix ? "", + version ? "unknown", +}: let + moduleNames = lib.filter (key: builtins.all (restricted: key != restricted) excludedModules) (lib.attrNames modules); + moduleValues = map (key: modules.${key}) moduleNames; + + genDeclaration = storeDeclaration: declarations: + map (declaration: let + subpath = lib.removePrefix (toString root + "/") (toString storeDeclaration); + project = + if projectName != "" + then "${projectName}/" + else ""; + in { + name = "<${declaration.name}:${project}${subpath}>"; + url = "${declaration.url}/${subpath}"; + }) + declarations; + + formatDeclaration = storeDeclaration: + if lib.hasPrefix (toString modulesPrefix) (toString storeDeclaration) + then genDeclaration storeDeclaration declarations + # skip external declarations + else lib.singleton storeDeclaration; + + transformOptions = option: + option + // { + declarations = lib.unique ( + lib.flatten (map (declaration: formatDeclaration declaration) option.declarations) + ++ option.declarations + ); + }; + + genDocumentation = module: + pkgs.nixosOptionsDoc { + options = builtins.removeAttrs (lib.evalModules {modules = [module];}).options [ + "_module" + "system" + ]; + + transformOptions = transformOptions; + documentType = "none"; + revision = version; + }; +in { + documentation = + lib.zipListsWith (name: moduleDocumentation: { + name = name; + commonMarkdown = moduleDocumentation.optionsCommonMark; + }) + moduleNames + (map (module: genDocumentation module) moduleValues); + + summary = map (name: " - [${name}](nixosModules/${name}.md)") moduleNames; +} diff --git a/packages/bonfire-docs/packagesDoc.nix b/packages/bonfire-docs/packagesDoc.nix new file mode 100644 index 0000000..c342d44 --- /dev/null +++ b/packages/bonfire-docs/packagesDoc.nix @@ -0,0 +1,137 @@ +{ + lib, + pkgs, + packages, + excludedPackages ? ["default"], + repoUrl ? null, + hydraUrl ? null, +}: let + supportedSystems = builtins.attrNames packages; + + derivations = lib.flatten ( + map (packages_: ( + map (name: packages_.${name}) (builtins.attrNames packages_) + )) (map (system: packages.${system}) supportedSystems) + ); + + extractName = drv: + if drv ? pname + then drv.pname + else if drv ? imageName + then drv.imageName + else "unknown"; + + derivationNames = map (drv: extractName drv) derivations; + + genDocumentation = drv: let + name = extractName drv; + + type = + if drv ? pname + then "package" + else if drv ? imageTag + then "image" + else "unknown"; + + description = lib.optionalString (drv.meta ? description) drv.meta.description; + homepage = lib.optionalString (drv.meta ? homepage) "[Homepage](${drv.meta.homepage})"; + source = lib.optionalString (repoUrl != null) "[Source](${repoUrl}/packages/${name}/default.nix)"; + + versionOrTag = + if type == "package" + then "Version: __${drv.version}__" + else if type == "image" + then "Tag: __${drv.imageTag}__" + else ""; + + license = lib.optionalString (drv.meta ? license) "License: ${ + if lib.isList drv.meta.license + then (map (license: "[${drv.meta.license.fullName}](${drv.meta.license.url})") drv.meta.license) + else "[${drv.meta.license.fullName}](${drv.meta.license.url})" + }"; + + maintainers = let + maintainer = mt: + if mt ? github + then "[${mt.name}](https://github.com/${mt.github})" + else mt.name; + email = mt: + if mt ? email + then "<[${mt.email}](mailto:${mt.email})>" + else ""; + in + lib.optionalString (drv.meta ? maintainers) ("Maintainers: " + + lib.concatStringsSep ", " ( + map (mt: maintainer mt + email mt) drv.meta.maintainers + )); + + platforms = lib.optionalString (drv.meta ? platforms && drv.meta.platforms != lib.platforms.none) ( + let + # limit package platforms to supported by flake only + filteredPlatforms = lib.intersectLists drv.meta.platforms supportedSystems; + in + "Platforms: " + + lib.concatStringsSep ", " (map (platform: + if hydraUrl != null + then "[${platform}](${hydraUrl}/packages.${platform}.${name})" + else "__${platform}__") + filteredPlatforms) + ); + + mainProgram = lib.optionalString (drv.meta ? mainProgram) "Main program: __${drv.meta.mainProgram}__"; + + outputs = lib.optionalString (drv ? outputs) ("Outputs: " + lib.concatStringsSep ", " (map (o: "__${o}__") drv.outputs)); + + fromImage = lib.optionalString (drv ? fromImage && drv.fromImage != null) "From: __${drv.fromImage.imageName}__"; + + stats = let + stats_ = [ + (lib.optionalString + (drv.meta ? broken && drv.meta.broken) + " _broken_") + (lib.optionalString + (drv.meta ? unfree && drv.meta.unfree) + " _unfree_") + (lib.optionalString + (drv.meta ? unsupported && drv.meta.unsupported) + " _unsupported_") + (lib.optionalString + (drv.meta ? insecure && drv.meta.insecure) + " _insecure_") + ]; + in + lib.optionalString (builtins.any (s: s == true) stats_) "[ ${lib.concatStringsSep "," stats_} ]"; + in { + commonMarkdown = pkgs.writeText "meta.md" '' + ## ${name} + + ${stats} + + ${description} + + ${source} ${lib.optionalString (homepage != "") "| ${homepage}"} + + ${versionOrTag} ${fromImage} + + ${mainProgram} + + ${outputs} + + ${license} + + ${maintainers} + + ${platforms} + ''; + }; +in { + documentation = + lib.zipListsWith (name: packageDocumentation: { + name = name; + commonMarkdown = packageDocumentation.commonMarkdown; + }) + derivationNames + (map (drv: genDocumentation drv) derivations); + + summary = map (name: " - [${name}](packages/${name}.md)") derivationNames; +} diff --git a/packages/bonfire-docs/src/SUMMARY.md b/packages/bonfire-docs/src/SUMMARY.md index a4a718b..46549e7 100644 --- a/packages/bonfire-docs/src/SUMMARY.md +++ b/packages/bonfire-docs/src/SUMMARY.md @@ -2,13 +2,17 @@ [Introduction](README.md) +# Outputs + - [Packages](packages/README.md) - - [packages](packages/packages.md) +{{packagesSummary}} -- [Module options](options/README.md) - - [nixosModules](options/modules.md) +- [NixOS Modules](nixosModules/README.md) +{{nixosModulesSummary}} -- [FAQ](faq.md) +# Trivia + +- [Side Notes](notes.md) - [Contributing](contributing.md) diff --git a/packages/bonfire-docs/src/options/README.md b/packages/bonfire-docs/src/nixosModules/README.md similarity index 72% rename from packages/bonfire-docs/src/options/README.md rename to packages/bonfire-docs/src/nixosModules/README.md index 7a0ec82..7517619 100644 --- a/packages/bonfire-docs/src/options/README.md +++ b/packages/bonfire-docs/src/nixosModules/README.md @@ -1,4 +1,4 @@ -# Module options +# NixOS modules First, you need to add this project to your flake inputs: @@ -21,6 +21,10 @@ After, you can use in a NixOS configuration like so system = "x86_64-linux"; modules = [ bonfire.nixosModules.bonfire + # or default because bonfire is default module + bonfire.nixosModules.default + # or just standalone module + bonfire.nixosModules.bar ... ]; }; diff --git a/packages/bonfire-docs/src/faq.md b/packages/bonfire-docs/src/notes.md similarity index 94% rename from packages/bonfire-docs/src/faq.md rename to packages/bonfire-docs/src/notes.md index 2ef8ef7..e1704df 100644 --- a/packages/bonfire-docs/src/faq.md +++ b/packages/bonfire-docs/src/notes.md @@ -1,4 +1,4 @@ -# Frequently asked questions and hints +# Side Notes * How to update and push flake inputs: diff --git a/packages/bonfire-docs/src/packages/README.md b/packages/bonfire-docs/src/packages/README.md index e69de29..a8ba387 100644 --- a/packages/bonfire-docs/src/packages/README.md +++ b/packages/bonfire-docs/src/packages/README.md @@ -0,0 +1,36 @@ +# Packages + +First, you need to add this project to your flake inputs: + +```nix +{ + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + bonfire.url = "github:L-Nafaryus/bonfire"; + }; + outputs = { nixpkgs, bonfire, ... }: + { ... } +} +``` + +After, you can use in a NixOS configuration like so + +```nix +{ + nixosConfigurations.foo = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { bonPkgs = bonfire.packages.x86_64-linux; }; + modules = [ + { pkgs, bonPkgs, ... }: { + environment.systemPackages = [ + pkgs.bar + bonPkgs.baz + ]; + } + ... + ]; + }; + # or pass in your devShells, nixosModules, etc +} +``` + diff --git a/packages/bonvim/default.nix b/packages/bonvim/default.nix index b74ade5..e359cb5 100644 --- a/packages/bonvim/default.nix +++ b/packages/bonvim/default.nix @@ -1,16 +1,31 @@ { pkgs, - nixvim-pkgs, - bonconfigs, - fenix-pkgs, + nixvimPkgs, + fenixPkgs, + bonLib, + lib, ... -}: -nixvim-pkgs.makeNixvimWithModule { - pkgs = pkgs; - module = import bonconfigs.bonvim; - extraSpecialArgs = { - rustc = fenix-pkgs.complete.rustc; - cargo = fenix-pkgs.complete.cargo; - rust-analyzer = fenix-pkgs.complete.rust-analyzer; +}: let + drv = nixvimPkgs.makeNixvimWithModule { + pkgs = pkgs; + module = bonLib.preconfiguredModules.bonvim; + extraSpecialArgs = { + rustc = fenixPkgs.complete.rustc; + cargo = fenixPkgs.complete.cargo; + rust-analyzer = fenixPkgs.complete.rust-analyzer; + }; }; -} +in + drv + // { + pname = "bonvim"; + version = "unknown"; + meta = with lib; + drv.meta + // { + description = "NixVim distribution for NeoVim with a customized collection of plugins inspired by the LazyVim distribution."; + license = licenses.mit; + maintainers = with bonLib.maintainers; [L-Nafaryus]; + platforms = platforms.linux; + }; + } diff --git a/packages/cargo-shuttle/default.nix b/packages/cargo-shuttle/default.nix index e44c962..bf492f0 100644 --- a/packages/cargo-shuttle/default.nix +++ b/packages/cargo-shuttle/default.nix @@ -1,6 +1,6 @@ { - bonfire, - crane-lib, + bonLib, + craneLib, lib, pkgs, version ? "v0.44.0", @@ -34,12 +34,13 @@ description = "A cargo command for the shuttle platform"; license = licenses.asl20; homepage = "https://shuttle.rs/"; - maintainers = with bonfire.lib.maintainers; [L-Nafaryus]; + maintainers = with bonLib.maintainers; [L-Nafaryus]; + platforms = platforms.x86_64; }; }; in let - cargoArtifacts = crane-lib.buildDepsOnly pkg; + cargoArtifacts = craneLib.buildDepsOnly pkg; in - crane-lib.buildPackage ( + craneLib.buildPackage ( pkg // {inherit cargoArtifacts;} ) diff --git a/packages/dearpygui/default.nix b/packages/dearpygui/default.nix index ce3c616..a68b4dd 100644 --- a/packages/dearpygui/default.nix +++ b/packages/dearpygui/default.nix @@ -1,5 +1,5 @@ { - bonfire, + bonLib, stdenv, lib, pkgs, @@ -58,7 +58,7 @@ pkgs.python3.pkgs.buildPythonPackage { description = "Dear PyGui: A fast and powerful Graphical User Interface Toolkit for Python with minimal dependencies."; license = licenses.mit; platforms = platforms.linux; - maintainers = with bonfire.lib.maintainers; [L-Nafaryus]; + maintainers = with bonLib.maintainers; [L-Nafaryus]; broken = pkgs.stdenv.isDarwin; }; } diff --git a/packages/default.nix b/packages/default.nix index 58ae8fd..914878b 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -1,48 +1,98 @@ # self.packages.${system} # { + lib, + bonLib, self, inputs, ... }: let - forAllSystems = inputs.nixpkgs.lib.genAttrs ["x86_64-linux"]; - nixpkgsFor = forAllSystems (system: import inputs.nixpkgs {inherit system;}); + platformInputs = system: rec { + pkgs = inputs.nixpkgs.legacyPackages.${system}; + lib = pkgs.lib; + + inherit bonLib; + bonModules = self.nixosModules; + bonPkgs = self.packages.${system}; + + craneLib = inputs.crane.mkLib pkgs; + fenixPkgs = inputs.fenix.packages.${system}; + nixvimPkgs = inputs.nixvim.legacyPackages.${system}; + }; in - forAllSystems (system: let - pkgs = nixpkgsFor.${system}; + bonLib.collectPackages platformInputs { + bonfire-docs = { + source = ./bonfire-docs; + platforms = ["x86_64-linux"]; + builder = {pkgs, ...}: pkgs.callPackage; + extraArgs = {inherit self;}; + }; - bonfire = self; - bonlib = self.lib; - bonpkgs = self.packages.${system}; - bonconfigs = self.configurations; + netgen = { + source = ./netgen; + platforms = ["x86_64-linux"]; + builder = {pkgs, ...}: pkgs.callPackage; + }; - crane = self.inputs.crane; - crane-lib = self.inputs.crane.mkLib pkgs; + dearpygui = { + source = ./dearpygui; + platforms = ["x86_64-linux"]; + builder = {pkgs, ...}: pkgs.callPackage; + }; - fenix = self.inputs.fenix; - fenix-pkgs = self.inputs.fenix.packages.${system}; + openfoam = { + source = ./openfoam; + platforms = ["x86_64-linux"]; + builder = {pkgs, ...}: pkgs.callPackage; + }; - nixvim-pkgs = self.inputs.nixvim.legacyPackages.${system}; - in { - bonfire-docs = pkgs.callPackage ./bonfire-docs {inherit bonfire;}; + spoofdpi = { + source = ./spoofdpi; + platforms = ["x86_64-linux"]; + builder = {pkgs, ...}: pkgs.callPackage; + }; - netgen = pkgs.callPackage ./netgen {inherit bonfire;}; + ultimmc = { + source = ./ultimmc; + platforms = ["x86_64-linux"]; + builder = {pkgs, ...}: pkgs.libsForQt5.callPackage; + }; - dearpygui = pkgs.callPackage ./dearpygui {inherit bonfire;}; + cargo-shuttle = { + source = ./cargo-shuttle; + platforms = ["x86_64-linux"]; + builder = {pkgs, ...}: pkgs.callPackage; + }; - openfoam = pkgs.callPackage ./openfoam {inherit bonfire;}; + bonvim = { + source = ./bonvim; + platforms = ["x86_64-linux"]; + builder = {...}: import; + }; - spoofdpi = pkgs.callPackage ./spoofdpi {inherit bonfire;}; + # Container images - lego = pkgs.callPackage ./lego {inherit bonfire;}; + nix-minimal = { + source = ./nix-minimal; + platforms = ["x86_64-linux"]; + builder = {pkgs, ...}: pkgs.callPackage; + }; - ultimmc = pkgs.libsForQt5.callPackage ./ultimmc {inherit bonfire;}; + nix-runner = { + source = ./nix-runner; + platforms = ["x86_64-linux"]; + builder = {pkgs, ...}: pkgs.callPackage; + }; - cargo-shuttle = pkgs.callPackage ./cargo-shuttle {inherit bonfire crane-lib;}; + postgresql = { + source = ./postgresql; + platforms = ["x86_64-linux"]; + builder = {pkgs, ...}: pkgs.callPackage; + }; - nix-minimal = pkgs.callPackage ./nix-minimal {inherit bonpkgs bonlib;}; - - nix-runner = pkgs.callPackage ./nix-runner {inherit bonpkgs bonlib;}; - - bonvim = import ./bonvim {inherit nixvim-pkgs pkgs bonconfigs fenix-pkgs;}; - }) + redis = { + source = ./redis; + platforms = ["x86_64-linux"]; + builder = {pkgs, ...}: pkgs.callPackage; + }; + } diff --git a/packages/lego/default.nix b/packages/lego/default.nix deleted file mode 100644 index 70452c8..0000000 --- a/packages/lego/default.nix +++ /dev/null @@ -1,41 +0,0 @@ -{ - bonfire, - lib, - fetchFromGitHub, - buildGoModule, - nixosTests, - version ? "c847ac4a4c55d6a5a457f6ef494cf45a47299e01", - hash ? "sha256-g9OxhM+iNUrAZgM1we8qPsismPy5a0eN654tSYuM/No=", - vendorHash ? "sha256-wG0x86lptEY3x+7kVN7v1XZniliMOxaJ6Y95YS6ivJY=", - ... -}: -buildGoModule rec { - pname = "lego"; - inherit version; - - src = fetchFromGitHub { - owner = "go-acme"; - repo = "lego"; - rev = version; - hash = hash; - }; - - inherit vendorHash; - - doCheck = false; - - subPackages = ["cmd/lego"]; - - ldflags = [ - "-X main.version=${version}" - ]; - - meta = with lib; { - description = "Let's Encrypt client and ACME library written in Go"; - license = licenses.mit; - homepage = "https://go-acme.github.io/lego/"; - maintainers = with bonfire.lib.maintainers; [L-Nafaryus]; - }; - - passthru.tests.lego = nixosTests.acme; -} diff --git a/packages/netgen/default.nix b/packages/netgen/default.nix index 310bc9a..7a82e08 100644 --- a/packages/netgen/default.nix +++ b/packages/netgen/default.nix @@ -1,5 +1,5 @@ { - bonfire, + bonLib, stdenv, lib, pkgs, @@ -69,8 +69,8 @@ description = "NETGEN is an automatic 3d tetrahedral mesh generator"; license = licenses.lgpl21Only; platforms = platforms.linux; - maintainers = with bonfire.lib.maintainers; [L-Nafaryus]; - broken = pkgs.stdenv.isDarwin; + maintainers = with bonLib.maintainers; [L-Nafaryus]; + broken = true; }; }; in diff --git a/packages/nix-minimal/default.nix b/packages/nix-minimal/default.nix index 6769ee2..b408bd4 100644 --- a/packages/nix-minimal/default.nix +++ b/packages/nix-minimal/default.nix @@ -1,7 +1,7 @@ { pkgs, lib, - bonlib, + bonLib, extraPaths ? [], ... }: let @@ -145,6 +145,6 @@ in ''; platforms = platforms.linux; license = licenses.lgpl21Plus; - maintainers = with bonlib.maintainers; [L-Nafaryus]; + maintainers = with bonLib.maintainers; [L-Nafaryus]; }; } diff --git a/packages/nix-runner/default.nix b/packages/nix-runner/default.nix index 00edfd1..7b504fc 100644 --- a/packages/nix-runner/default.nix +++ b/packages/nix-runner/default.nix @@ -1,15 +1,14 @@ { pkgs, lib, - bonpkgs, - bonlib, + bonPkgs, extraPaths ? [], ... }: pkgs.dockerTools.buildImage { name = "nix-runner"; tag = "latest"; - fromImage = bonpkgs.nix-minimal; + fromImage = bonPkgs.nix-minimal; copyToRoot = pkgs.buildEnv { name = "image-root"; @@ -27,7 +26,7 @@ pkgs.dockerTools.buildImage { } // { meta = - bonpkgs.nix-minimal.meta + bonPkgs.nix-minimal.meta // { description = "Image for action runners with a Nix package manager"; longDescription = '' diff --git a/packages/openfoam/default.nix b/packages/openfoam/default.nix index f441747..73e9c96 100644 --- a/packages/openfoam/default.nix +++ b/packages/openfoam/default.nix @@ -1,5 +1,5 @@ { - bonfire, + bonLib, stdenv, lib, pkgs, @@ -79,7 +79,7 @@ in let description = "OpenFOAM is a free, open source CFD software released and developed by OpenFOAM Foundation"; license = licenses.gpl3; platforms = platforms.linux; - maintainers = with bonfire.lib.maintainers; [L-Nafaryus]; + maintainers = with bonLib.maintainers; [L-Nafaryus]; broken = pkgs.stdenv.isDarwin; }; }; diff --git a/packages/postgresql/default.nix b/packages/postgresql/default.nix new file mode 100644 index 0000000..0e5e859 --- /dev/null +++ b/packages/postgresql/default.nix @@ -0,0 +1,58 @@ +{ + pkgs, + lib, + bonLib, + extraPaths ? [], + ... +}: let + user = "postgres"; + dataDir = "/var/lib/postgresql"; + entryPoint = pkgs.writeTextDir "entrypoint.sh" '' + initdb -U ${user} + postgres -k ${dataDir} + ''; +in + pkgs.dockerTools.buildImage { + name = "postgresql"; + tag = "latest"; + + copyToRoot = pkgs.buildEnv { + name = "image-root"; + pathsToLink = ["/bin" "/etc" "/"]; + paths = with pkgs; + [ + bash + postgresql + entryPoint + ] + ++ extraPaths; + }; + runAsRoot = with pkgs; '' + #!${runtimeShell} + ${dockerTools.shadowSetup} + groupadd -r ${user} + useradd -r -g ${user} --home-dir=${dataDir} ${user} + mkdir -p ${dataDir} + chown -R ${user}:${user} ${dataDir} + ''; + + config = { + Entrypoint = ["bash" "/entrypoint.sh"]; + StopSignal = "SIGINT"; + User = "${user}:${user}"; + Env = ["PGDATA=${dataDir}"]; + WorkingDir = dataDir; + ExposedPorts = { + "5432/tcp" = {}; + }; + }; + } + // { + meta = with lib; { + homepage = "https://www.postgresql.org"; + description = "A powerful, open source object-relational database system."; + platforms = platforms.linux; + license = licenses.postgresql; + maintainers = with bonLib.maintainers; [L-Nafaryus]; + }; + } diff --git a/packages/redis/default.nix b/packages/redis/default.nix new file mode 100644 index 0000000..030bef8 --- /dev/null +++ b/packages/redis/default.nix @@ -0,0 +1,58 @@ +{ + pkgs, + lib, + bonLib, + extraPaths ? [], + ... +}: let + user = "redis"; + dataDir = "/var/lib/redis"; + entryPoint = pkgs.writeTextDir "entrypoint.sh" '' + redis-server \ + --daemonize no \ + --dir "${dataDir}" + ''; +in + pkgs.dockerTools.buildImage { + name = "redis"; + tag = "latest"; + + copyToRoot = pkgs.buildEnv { + name = "image-root"; + pathsToLink = ["/bin" "/etc" "/"]; + paths = with pkgs; + [ + bash + redis + entryPoint + ] + ++ extraPaths; + }; + runAsRoot = with pkgs; '' + #!${runtimeShell} + ${dockerTools.shadowSetup} + groupadd -r ${user} + useradd -r -g ${user} --home-dir=${dataDir} ${user} + mkdir -p ${dataDir} + chown -R ${user}:${user} ${dataDir} + ''; + + config = { + Entrypoint = ["bash" "/entrypoint.sh"]; + StopSignal = "SIGINT"; + User = "${user}:${user}"; + WorkingDir = dataDir; + ExposedPorts = { + "6379/tcp" = {}; + }; + }; + } + // { + meta = with lib; { + homepage = "https://redis.io"; + description = "An open source, advanced key-value store."; + platforms = platforms.linux; + license = licenses.bsd3; + maintainers = with bonLib.maintainers; [L-Nafaryus]; + }; + } diff --git a/packages/spoofdpi/default.nix b/packages/spoofdpi/default.nix index 753dcee..c100350 100644 --- a/packages/spoofdpi/default.nix +++ b/packages/spoofdpi/default.nix @@ -1,5 +1,5 @@ { - bonfire, + bonLib, lib, pkgs, version ? "0.8", @@ -28,7 +28,7 @@ pkgs.buildGoModule { homepage = "https://github.com/xvzc/SpoofDPI"; description = "A simple and fast anti-censorship tool written in Go"; license = licenses.asl20; - maintainers = with bonfire.lib.maintainers; [L-Nafaryus]; + maintainers = with bonLib.maintainers; [L-Nafaryus]; broken = false; mainProgram = "spoof-dpi"; }; diff --git a/packages/ultimmc/default.nix b/packages/ultimmc/default.nix index db75c0e..b6f8de2 100644 --- a/packages/ultimmc/default.nix +++ b/packages/ultimmc/default.nix @@ -1,5 +1,5 @@ { - bonfire, + bonLib, lib, stdenv, fetchFromGitHub, @@ -13,6 +13,7 @@ xorg, libpulseaudio, libGL, + ... }: stdenv.mkDerivation rec { version = "faf3c966c43465d6f6c245ed78556222240398ee"; @@ -78,6 +79,6 @@ stdenv.mkDerivation rec { description = "Cracked Minecraft Launcher"; license = licenses.asl20; platforms = platforms.linux; - maintainers = with bonfire.lib.maintainers; [L-Nafaryus]; + maintainers = with bonLib.maintainers; [L-Nafaryus]; }; }