Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hyperspace fix ci #82

Closed
wants to merge 30 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
f73a3ef
first commit
a-kenji Aug 31, 2022
5a2083d
init: gitignore
a-kenji Aug 31, 2022
3136c5d
init: flake.nix
a-kenji Aug 31, 2022
56b8e33
Init hyperbeam flake
xmzlyw Aug 31, 2022
26724a9
Refactor
Kranzes Aug 31, 2022
9d1b57d
Add 'pkgs/hyperspace/' from commit '26724a956c09fb89046d24271c170ab3f…
alejandrosame Oct 7, 2023
50295cc
hyperspace: fix build after syncing nixpkgs with parent flake lock
alejandrosame Oct 7, 2023
3139f84
hyperspace: migrate autobase package
alejandrosame Oct 8, 2023
823873a
hyperspace: reformat nested flake.nix to comply with checks
alejandrosame Oct 8, 2023
76219dc
hyperspace: refactor autobase package
alejandrosame Oct 8, 2023
cfd3833
hyperspace: migrate hypercore package
alejandrosame Oct 8, 2023
04b8a9c
hyperspace: migrate hyperbeam package
alejandrosame Oct 8, 2023
faed418
hyperspace: migrate corestore package
alejandrosame Oct 8, 2023
f5bfecd
hyperspace: migrate hyperblobs package
alejandrosame Oct 8, 2023
1b90321
hyperspace: migrate hyperswarm package
alejandrosame Oct 8, 2023
fded826
by-name: support dream2nix modules
DavHau Oct 10, 2023
693d9fa
autobase: migrate to using dream2nix by-name
DavHau Oct 10, 2023
cdb7301
Merge pull request #1 from DavHau/hyperspace
alejandrosame Oct 10, 2023
cb104c5
hyperspace: migrate packages to use dream2nix modules
alejandrosame Oct 14, 2023
453a3d5
hyperspace: add meta and change package name
augustebaum Oct 24, 2023
89ed722
hyperspace: disable tests for `hyperswarm`
augustebaum Oct 24, 2023
e7be932
hyperspace: move `name` and `version` to the top
augustebaum Oct 24, 2023
ba1baa4
infra: add debug flags to CI checks
alejandrosame Oct 25, 2023
822e3bb
hyperspace: remove all new packages for debugging
augustebaum Oct 26, 2023
8f9c3a6
hyperspace: add autobase and corestore
augustebaum Oct 27, 2023
886ef26
hyperspace: add hyperbeam and hyperblobs
augustebaum Oct 27, 2023
a8666d0
hyperspace: add hypercore and hyperswarm
alejandrosame Oct 30, 2023
a6571c6
hyperspace: remove hypercore
augustebaum Oct 31, 2023
95b5630
hyperspace: add back hypercore for sanity
augustebaum Oct 31, 2023
142ad52
hyperspace: add only hypercore for extra sanity
augustebaum Nov 1, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
- uses: DeterminateSystems/magic-nix-cache-action@main
with:
upstream-cache: https://ngi.cachix.org/
- run: nix flake check
- run: nix flake check --print-build-logs
2 changes: 1 addition & 1 deletion .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ jobs:
with:
name: ngi
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix flake check
- run: nix flake check --print-build-logs
211 changes: 208 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 9 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
# See <https://github.com/ngi-nix/ngipkgs/issues/24> for plans to support Darwin.
inputs.systems.url = "github:nix-systems/x86_64-linux";
inputs.flake-utils.inputs.systems.follows = "systems";
inputs.dream2nix.url = "github:nix-community/dream2nix";
inputs.dream2nix.inputs.nixpkgs.follows = "nixpkgs";
inputs.treefmt-nix.url = "github:numtide/treefmt-nix";
inputs.treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
inputs.sops-nix.url = "github:Mic92/sops-nix";
Expand All @@ -17,6 +19,7 @@
self,
nixpkgs,
flake-utils,
dream2nix,
treefmt-nix,
sops-nix,
...
Expand Down Expand Up @@ -44,11 +47,14 @@
})) (readDir dir)
);
callPackage = pkgs.newScope (
result // {inherit callPackage nixosTests;}
pkgs.lib.attrsets.mergeAttrsList [
result
{inherit callPackage nixosTests;}
]
);
args = {
inherit (pkgs) lib;
inherit callPackage;
inherit callPackage dream2nix pkgs;
};
result = (import ./pkgs/by-name args) // (import ./pkgs args);
in
Expand Down Expand Up @@ -142,6 +148,6 @@
};

# Overlays a package set (e.g. nixpkgs) with the packages defined in this flake.
overlays.default = final: prev: importPackages prev;
overlays.default = final: prev: (importPackages prev);
};
}
38 changes: 32 additions & 6 deletions pkgs/by-name/default.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
{
lib,
callPackage,
dream2nix,
lib,
pkgs,
}: let
baseDirectory = ./.;

inherit
(builtins)
pathExists
readDir
;

Expand All @@ -18,15 +21,38 @@
names = name: type:
if type != "directory"
then assert name == "README.md" || name == "default.nix"; {}
else {${name} = baseDirectory + "/${name}/package.nix";};
else {${name} = baseDirectory + "/${name}";};

packageDirectories = concatMapAttrs names (readDir baseDirectory);

packageFiles = concatMapAttrs names (readDir baseDirectory);
callModule = moduleDir: let
evaluated = lib.evalModules {
specialArgs = {
inherit dream2nix;
packageSets.nixpkgs = pkgs;
};
modules = [
moduleDir
{
paths.projectRoot = ../..;
paths.projectRootFile = "flake.nix";
paths.package = moduleDir;
paths.lockFile = "lock.json";
}
];
};
in
evaluated.config.public;

self =
mapAttrs (
_: file:
callPackage file {}
_: directory:
if pathExists (directory + "/package.nix")
then callPackage (directory + "/package.nix") {}
else if pathExists (directory + "/module.nix")
then callModule (directory + "/module.nix")
else throw "No package.nix or module.nix found in ${directory}"
)
packageFiles;
packageDirectories;
in
self
Loading
Loading