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: "/"
schedule:
interval: "weekly"
commit-message:
- commit-message:
prefix: "ci"

View File

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

View File

@ -1,15 +1,10 @@
{ pkgs
, lib ? pkgs.lib
, unitDir ? "unit"
, packageFun ? "package.nix"
, root ? "${./pkgs}/${unitDir}"
}:
{ pkgs, lib ? pkgs.lib, unitDir ? "unit", packageFun ? "package.nix", root ? "${./pkgs}/${unitDir}" }:
let
shards = lib.attrNames (builtins.readDir root);
namesForShard = shard: lib.mapAttrs'
(name: _: { inherit name; value = root + "/${shard}/${name}"; })
(builtins.readDir (root + "/${shard}"));
(name: _: { inherit name; value = "${root}/${shard}/${name}"; })
(builtins.readDir "${root}/${shard}");
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
units

View File

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

6
flake.lock generated
View File

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

View File

@ -20,11 +20,11 @@
# Unstable names are variables.
packages =
let
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 [ ]));
in
onlyAvailable (legacyPackages // unitPackages);
onlyAvailable (legacyPackages // import ./callUnitRoot.nix { inherit pkgs; });
checks = {
nixpkgs-fmt = pkgs.writeShellScriptBin "nixpkgs-fmt-check" ''
@ -33,18 +33,6 @@
deadnix = pkgs.writeShellScriptBin "deadnix-check" ''
${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 {

View File

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

View File

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