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

Migrate hyperspace #67

Closed
wants to merge 22 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 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
98f30c1
hyperspace: move `name` and `version` to the top
augustebaum Oct 24, 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
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);
};
}
48 changes: 48 additions & 0 deletions pkgs/by-name/autobase/module.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
lib,
config,
dream2nix,
...
}: rec {
name = "autobase-${version}";
version = "1.0.0-alpha.9";

imports = [
dream2nix.modules.dream2nix.nodejs-package-lock-v3
dream2nix.modules.dream2nix.nodejs-granular-v3
];

mkDerivation = {
src = config.deps.fetchFromGitHub {
owner = "holepunchto";
repo = "autobase";
rev = "v${version}";
sha256 = "sha256-aKs39/9GG3tRq5UBBDWcz1h64kaCt+1Cru3C4fKv5RU=";
};

doCheck = true;
checkPhase = ''
npm run test
'';

meta = with lib; {
description = "Autobase lets you write concise multiwriter data structures with Hypercore";
homepage = "https://github.com/holepunchto/autobase";
license = licenses.mit;
};
};

deps = {nixpkgs, ...}: {
inherit
(nixpkgs)
fetchFromGitHub
stdenv
;

npm = nixpkgs.nodejs_16.pkgs.npm;
};

nodejs-package-lock-v3 = {
packageLockFile = ./package-lock.json;
};
}
Loading