-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
25 lines (23 loc) · 887 Bytes
/
flake.nix
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
{
description = "a flake containing all games and mods for Luanti";
inputs.nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
outputs ={ self, nixpkgs, ... }: with builtins; {
packages = nixpkgs.legacyPackages
|> attrNames
|> map (system: let pkgs = import nixpkgs { inherit system; }; in {
name = system;
value = (import src/packages.nix {
inherit (pkgs.stdenv) mkDerivation;
inherit (pkgs) unzip fetchurl lib;
}) // {
test = import ./test.nix { inherit pkgs; nix-luanti = self; };
fetchContentDB = pkgs.writeShellScriptBin "fetchContentDB" ''
echo "fetching ContentDB..."
${pkgs.nodejs}/bin/node ./src/utils/updater/fetchContentDB.js
'';
};
})
|> listToAttrs;
nixosModules.default = import ./src/module.nix;
};
}