Compare commits

..

No commits in common. "bced319f324d2f6c67247059a52e1753508ae679" and "4586c00f4e7bad8991c75cd9252b22b5fd56a4bc" have entirely different histories.

8 changed files with 19 additions and 41 deletions

View File

@ -4,5 +4,5 @@ updates:
directory: "/" directory: "/"
schedule: schedule:
interval: "weekly" interval: "weekly"
commit-message: - commit-message:
prefix: "ci" prefix: "ci"

View File

@ -10,7 +10,6 @@ jobs:
check: check:
- nixpkgs-fmt - nixpkgs-fmt
- deadnix - deadnix
- nur
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repository - name: Checkout repository

View File

@ -1,15 +1,10 @@
{ pkgs { pkgs, lib ? pkgs.lib, unitDir ? "unit", packageFun ? "package.nix", root ? "${./pkgs}/${unitDir}" }:
, lib ? pkgs.lib
, unitDir ? "unit"
, packageFun ? "package.nix"
, root ? "${./pkgs}/${unitDir}"
}:
let let
shards = lib.attrNames (builtins.readDir root); shards = lib.attrNames (builtins.readDir root);
namesForShard = shard: lib.mapAttrs' namesForShard = shard: lib.mapAttrs'
(name: _: { inherit name; value = root + "/${shard}/${name}"; }) (name: _: { inherit name; value = "${root}/${shard}/${name}"; })
(builtins.readDir (root + "/${shard}")); (builtins.readDir "${root}/${shard}");
namesToPath = lib.foldl' lib.recursiveUpdate { } (map namesForShard shards); namesToPath = lib.foldl' lib.recursiveUpdate { } (map namesForShard shards);
units = lib.mapAttrs (_: path: pkgs.callPackage (path + "/${packageFun}") { }) namesToPath; units = lib.mapAttrs (_: path: pkgs.callPackage "${path}/${packageFun}" { }) namesToPath;
in in
units units

View File

@ -7,13 +7,11 @@
# nix-build -A mypackage # nix-build -A mypackage
{ pkgs ? import <nixpkgs> { } }: { pkgs ? import <nixpkgs> { } }:
let
legacy = import ./pkgs/top-level/all-packages.nix { inherit pkgs; }; import ./pkgs/top-level/all-packages.nix { inherit pkgs; }
units = import ./callUnitRoot.nix { inherit pkgs; root = ./pkgs/unit; }; // {
in
legacy // units // {
# The `lib`, `modules`, and `overlay` names are special # The `lib`, `modules`, and `overlay` names are special
lib = import ./lib { inherit pkgs; }; # functions lib = import ./lib { inherit pkgs; }; # functions
modules = import ./modules; # NixOS modules modules = import ./modules; # NixOS modules
overlays = import ./overlays; # nixpkgs overlays overlays = import ./overlays; # nixpkgs overlays
} } // import ./callUnitRoot.nix { inherit pkgs; }

6
flake.lock generated
View File

@ -17,11 +17,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1677995890, "lastModified": 1677383253,
"narHash": "sha256-eOnCn0o3I6LP48fAi8xWFcn49V2rL7oX5jCtJTeN1LI=", "narHash": "sha256-UfpzWfSxkfXHnb4boXZNaKsAcUrZT9Hw+tao1oZxd08=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "a1240f6b4a0bcc84fc48008b396a140d9f3638f6", "rev": "9952d6bc395f5841262b006fbace8dd7e143b634",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -20,11 +20,11 @@
# Unstable names are variables. # Unstable names are variables.
packages = packages =
let let
legacyPackages = import ./pkgs/top-level/all-packages.nix { inherit pkgs; }; legacyPackages = import ./pkgs/top-level/all-packages.nix { inherit pkgs; };
unitPackages = import ./callUnitRoot.nix { inherit pkgs; };
onlyAvailable = lib.filterAttrs (_: drv: builtins.elem system (drv.meta.platforms or [ ])); onlyAvailable = lib.filterAttrs (_: drv: builtins.elem system (drv.meta.platforms or [ ]));
in in
onlyAvailable (legacyPackages // unitPackages); onlyAvailable (legacyPackages // import ./callUnitRoot.nix { inherit pkgs; });
checks = { checks = {
nixpkgs-fmt = pkgs.writeShellScriptBin "nixpkgs-fmt-check" '' nixpkgs-fmt = pkgs.writeShellScriptBin "nixpkgs-fmt-check" ''
@ -33,18 +33,6 @@
deadnix = pkgs.writeShellScriptBin "deadnix-check" '' deadnix = pkgs.writeShellScriptBin "deadnix-check" ''
${pkgs.deadnix}/bin/deadnix --fail . ${pkgs.deadnix}/bin/deadnix --fail .
''; '';
# Ensures that the NUR bot can evaluate and find all our packages.
# Normally we'd also run with `--option restrict-eval true`, but
# this is incompatible with flakes because reasons.
nur = pkgs.writeShellScriptBin "nur-check" ''
nix-env -f . -qa \* --meta \
--allowed-uris https://static.rust-lang.org \
--option allow-import-from-derivation true \
--drv-path --show-trace \
-I nixpkgs=$(nix-instantiate --find-file nixpkgs) \
-I ./ \
--json | ${pkgs.jq}/bin/jq -r 'values | .[].name'
'';
}; };
devShells.ci = pkgs.mkShellNoCC { devShells.ci = pkgs.mkShellNoCC {

View File

@ -32,4 +32,4 @@ lib.makeScope newScope (self: lib.makeOverridable
jetbrainsWithPlugins = jetbrainsWithPlugins self variant; jetbrainsWithPlugins = jetbrainsWithPlugins self variant;
}) })
) )
{ }) { })

View File

@ -29,17 +29,15 @@ stdenv.mkDerivation rec {
--add-flags "--working-dir \''${XDG_DATA_HOME:-\$HOME/.local/share}/ATLauncher" --add-flags "--working-dir \''${XDG_DATA_HOME:-\$HOME/.local/share}/ATLauncher"
''; '';
meta = { meta = with lib; {
description = "Minecraft launcher"; description = "Minecraft launcher";
longDescription = '' longDescription = ''
ATLauncher is a Launcher for Minecraft which integrates multiple different ATLauncher is a Launcher for Minecraft which integrates multiple different
ModPacks to allow you to download and install ModPacks easily and quickly. ModPacks to allow you to download and install ModPacks easily and quickly.
''; '';
sourceProvenance = [ sourceProvenance = with sourceTypes; [ binaryBytecode ];
(lib.sourceTypes.binaryBytecode or { shortName = "binaryBytecode"; isSource = false; }) license = licenses.gpl3Only;
]; platforms = platforms.all;
license = lib.licenses.gpl3Only;
platforms = lib.platforms.all;
homepage = "https://atlauncher.com/"; homepage = "https://atlauncher.com/";
}; };
} }