Compare commits
7 Commits
4586c00f4e
...
bced319f32
Author | SHA1 | Date | |
---|---|---|---|
bced319f32 | |||
|
a798e65465 | ||
d36de346ad | |||
b7f88d78b5 | |||
71f6ac0f46 | |||
561afaf18c | |||
f0dc2d521d |
2
.github/dependabot.yml
vendored
2
.github/dependabot.yml
vendored
@ -4,5 +4,5 @@ updates:
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
- commit-message:
|
||||
commit-message:
|
||||
prefix: "ci"
|
||||
|
1
.github/workflows/build.yml
vendored
1
.github/workflows/build.yml
vendored
@ -10,6 +10,7 @@ jobs:
|
||||
check:
|
||||
- nixpkgs-fmt
|
||||
- deadnix
|
||||
- nur
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
|
@ -1,10 +1,15 @@
|
||||
{ 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
|
||||
|
10
default.nix
10
default.nix
@ -7,11 +7,13 @@
|
||||
# nix-build -A mypackage
|
||||
|
||||
{ pkgs ? import <nixpkgs> { } }:
|
||||
|
||||
import ./pkgs/top-level/all-packages.nix { inherit pkgs; }
|
||||
// {
|
||||
let
|
||||
legacy = 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
|
||||
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
6
flake.lock
generated
@ -17,11 +17,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1677383253,
|
||||
"narHash": "sha256-UfpzWfSxkfXHnb4boXZNaKsAcUrZT9Hw+tao1oZxd08=",
|
||||
"lastModified": 1677995890,
|
||||
"narHash": "sha256-eOnCn0o3I6LP48fAi8xWFcn49V2rL7oX5jCtJTeN1LI=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9952d6bc395f5841262b006fbace8dd7e143b634",
|
||||
"rev": "a1240f6b4a0bcc84fc48008b396a140d9f3638f6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
16
flake.nix
16
flake.nix
@ -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 // import ./callUnitRoot.nix { inherit pkgs; });
|
||||
onlyAvailable (legacyPackages // unitPackages);
|
||||
|
||||
checks = {
|
||||
nixpkgs-fmt = pkgs.writeShellScriptBin "nixpkgs-fmt-check" ''
|
||||
@ -33,6 +33,18 @@
|
||||
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 {
|
||||
|
@ -32,4 +32,4 @@ lib.makeScope newScope (self: lib.makeOverridable
|
||||
jetbrainsWithPlugins = jetbrainsWithPlugins self variant;
|
||||
})
|
||||
)
|
||||
{ })
|
||||
{ })
|
||||
|
@ -29,15 +29,17 @@ stdenv.mkDerivation rec {
|
||||
--add-flags "--working-dir \''${XDG_DATA_HOME:-\$HOME/.local/share}/ATLauncher"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
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 = with sourceTypes; [ binaryBytecode ];
|
||||
license = licenses.gpl3Only;
|
||||
platforms = platforms.all;
|
||||
sourceProvenance = [
|
||||
(lib.sourceTypes.binaryBytecode or { shortName = "binaryBytecode"; isSource = false; })
|
||||
];
|
||||
license = lib.licenses.gpl3Only;
|
||||
platforms = lib.platforms.all;
|
||||
homepage = "https://atlauncher.com/";
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user