mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
workspace: use direnv instead of corepack
This commit is contained in:
6 files changed
+80
-28
No files matched your search
@@ -21,8 +21,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
fetch-depth: 2
|
fetch-depth: 2
|
||||||
- name: Setup Corepack
|
|
||||||
run: corepack enable
|
|
||||||
- name: Set up Node
|
- name: Set up Node
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
@@ -49,6 +47,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
git config --global user.name undefined
|
git config --global user.name undefined
|
||||||
git config --global user.email i@undefined.moe
|
git config --global user.email i@undefined.moe
|
||||||
|
yarn set version stable
|
||||||
yarn
|
yarn
|
||||||
yarn dedupe
|
yarn dedupe
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ benchmark.json
|
|||||||
globalConfig.json
|
globalConfig.json
|
||||||
*.out
|
*.out
|
||||||
.clinic/
|
.clinic/
|
||||||
|
.direnv/
|
||||||
.yarn/cache
|
.yarn/cache
|
||||||
.yarn/build-state.yml
|
.yarn/build-state.yml
|
||||||
.yarn/unplugged
|
.yarn/unplugged
|
||||||
|
|||||||
Generated
+37
-3
@@ -1,12 +1,30 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
|
"flake-utils": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1731533236,
|
||||||
|
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1739446958,
|
"lastModified": 1766902085,
|
||||||
"narHash": "sha256-+/bYK3DbPxMIvSL4zArkMX0LQvS7rzBKXnDXLfKyRVc=",
|
"narHash": "sha256-coBu0ONtFzlwwVBzmjacUQwj3G+lybcZ1oeNSQkgC0M=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "2ff53fe64443980e139eaa286017f53f88336dd0",
|
"rev": "c0b0e0fddf73fd517c3471e546c0df87a42d53f4",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -18,8 +36,24 @@
|
|||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|||||||
@@ -1,26 +1,44 @@
|
|||||||
{
|
{
|
||||||
description = "Hydro development environment";
|
description = "Hydro development environment";
|
||||||
|
|
||||||
inputs = {
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||||
};
|
|
||||||
|
|
||||||
outputs = { self, nixpkgs }:
|
outputs = { self, nixpkgs, flake-utils }:
|
||||||
let
|
flake-utils.lib.eachDefaultSystem (system:
|
||||||
system = "x86_64-linux";
|
let
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
in {
|
composeConfig = {
|
||||||
packages.${system}.default = pkgs.hello;
|
version = "0.5";
|
||||||
devShells.${system}.default = pkgs.mkShell {
|
processes = {
|
||||||
buildInputs = [
|
hydro = {
|
||||||
pkgs.nodejs
|
command = "${pkgs.nodejs}/bin/node node_modules/.bin/hydrooj --debug --port=2333";
|
||||||
pkgs.yarn-berry
|
is_interactive = true;
|
||||||
pkgs.pm2
|
};
|
||||||
pkgs.git
|
go-judge = {
|
||||||
pkgs.gcc
|
command = "${pkgs.go-judge}/bin/go-judge";
|
||||||
pkgs.go-judge
|
};
|
||||||
pkgs.mongodb-ce
|
webpack = {
|
||||||
];
|
command = "${pkgs.yarn-berry}/bin/yarn build:ui:dev";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
apps.default = {
|
||||||
|
type = "app";
|
||||||
|
program = "${pkgs.writeShellScript "compose.sh" ''
|
||||||
|
${pkgs.process-compose}/bin/process-compose -f ${pkgs.writeText "process-compose.yml" (builtins.toJSON composeConfig)}
|
||||||
|
''}";
|
||||||
|
};
|
||||||
|
|
||||||
|
devShells.default = pkgs.mkShell {
|
||||||
|
buildInputs = with pkgs; [
|
||||||
|
nodejs
|
||||||
|
yarn-berry
|
||||||
|
gcc
|
||||||
|
go-judge
|
||||||
|
];
|
||||||
|
};
|
||||||
|
});
|
||||||
}
|
}
|
||||||
+1
-2
@@ -65,6 +65,5 @@
|
|||||||
"resolutions": {
|
"resolutions": {
|
||||||
"mongodb": "^7.0.0",
|
"mongodb": "^7.0.0",
|
||||||
"@types/express-serve-static-core": "patch:@types/express-serve-static-core@npm%3A4.19.6#~/.yarn/patches/@types-express-serve-static-core-npm-4.19.6-cc0017aaf4.patch"
|
"@types/express-serve-static-core": "patch:@types/express-serve-static-core@npm%3A4.19.6#~/.yarn/patches/@types-express-serve-static-core-npm-4.19.6-cc0017aaf4.patch"
|
||||||
},
|
}
|
||||||
"packageManager": "yarn@4.10.3"
|
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user