From 92afe8abef9c9437b509b0949573e6cee8c555cb Mon Sep 17 00:00:00 2001 From: undefined Date: Sat, 15 Feb 2025 23:23:57 +0800 Subject: [PATCH] workspace: drop gitpod --- .gitpod.yml | 28 ---------------------------- README-EN.md | 4 +--- flake.lock | 27 +++++++++++++++++++++++++++ flake.nix | 26 ++++++++++++++++++++++++++ shell.nix | 22 ---------------------- 5 files changed, 54 insertions(+), 53 deletions(-) delete mode 100644 .gitpod.yml create mode 100644 flake.lock create mode 100644 flake.nix delete mode 100644 shell.nix diff --git a/.gitpod.yml b/.gitpod.yml deleted file mode 100644 index 8037f9cbd..000000000 --- a/.gitpod.yml +++ /dev/null @@ -1,28 +0,0 @@ -image: gitpod/workspace-mongodb -tasks: - - name: MongoDB - init: mkdir -p /home/gitpod/db - command: mongod --dbpath /home/gitpod/db - - name: App - init: | - mkdir -p /home/gitpod/.hydro - echo '{"host":"127.0.0.1","port":"27017","name":"hydro","username":"","password":""}' >/home/gitpod/.hydro/config.json && \ - nvm install 18 - nvm use 18 - nvm alias default 18 - yarn - yarn build:ui:production - npx hydrooj cli system set server.port 2333 - npx hydrooj cli user create root@hydro.local root rootroot 2 - npx hydrooj cli user setSuperAdmin 2 - command: yarn debug - env: - DEFAULT_STORE_PATH: /home/gitpod/file -vscode: - extensions: - - dbaeumer.vscode-eslint - - vscode-icons-team.vscode-icons - - samuelcolvin.jinjahtml - - tabnine.tabnine-vscode - - gruntfuggly.todo-tree - - ryanluker.vscode-coverage-gutters diff --git a/README-EN.md b/README-EN.md index e500e113e..9b080a50d 100644 --- a/README-EN.md +++ b/README-EN.md @@ -1,6 +1,6 @@ # Hydro -![GitHub Workflow Status](https://img.shields.io/github/workflow/status/hydro-dev/hydro/CI) +![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/hydro-dev/hydro/build.yml?branch=master) ![hydrooj](https://img.shields.io/npm/dm/hydrooj) ![npm](https://img.shields.io/npm/v/hydrooj?label=hydrooj) ![node-current](https://img.shields.io/node/v/hydrooj) @@ -18,8 +18,6 @@ Feel free to create an account and then navigate to `MyAccount > MyDomains > Cre [中文](https://hydro.js.org/) -[Open pre-configured test environment in Gitpod](https://gitpod.io/#https://github.com/hydro-dev/Hydro) - We are now looking for help with Korean and Japanese translation, if you are a native speaker of these languages, please contact us, pull requests are always welcome. ## Contact US diff --git a/flake.lock b/flake.lock new file mode 100644 index 000000000..42c04dd83 --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1739446958, + "narHash": "sha256-+/bYK3DbPxMIvSL4zArkMX0LQvS7rzBKXnDXLfKyRVc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "2ff53fe64443980e139eaa286017f53f88336dd0", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 000000000..da4a28850 --- /dev/null +++ b/flake.nix @@ -0,0 +1,26 @@ +{ + description = "Hydro development environment"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + }; + + outputs = { self, nixpkgs }: + let + system = "x86_64-linux"; + pkgs = nixpkgs.legacyPackages.${system}; + in { + packages.${system}.default = pkgs.hello; + devShells.${system}.default = pkgs.mkShell { + buildInputs = [ + pkgs.nodejs + pkgs.yarn-berry + pkgs.pm2 + pkgs.git + pkgs.gcc + pkgs.go-judge + pkgs.mongodb-ce + ]; + }; + }; +} \ No newline at end of file diff --git a/shell.nix b/shell.nix deleted file mode 100644 index 0f87cb5e5..000000000 --- a/shell.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ - pkgs ? import {}, - hydro ? import (pkgs.fetchFromGitHub { - owner = "hydro-dev"; - repo = "nix-channel"; - rev = "e1cb1ea6ac79c5e64bd25036be00ee98e51cfd71"; - hash = "sha256-p7Em18OYAtIsA9+8VtHY1gW/NzRHfHKvoK8rsQRgs5Q="; - }) {} -}: -let -in pkgs.stdenv.mkDerivation { - name = "hydro-workspace"; - buildInputs = [ - pkgs.nodejs - pkgs.yarn - pkgs.pm2 - pkgs.git - pkgs.gcc - hydro.mongodb4 - hydro.sandbox - ]; -} \ No newline at end of file