diff --git a/flake.lock b/flake.lock new file mode 100644 index 000000000..befd76037 --- /dev/null +++ b/flake.lock @@ -0,0 +1,60 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1705309234, + "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", + "type": "github" + }, + "original": { + "id": "flake-utils", + "type": "indirect" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1706487304, + "narHash": "sha256-LE8lVX28MV2jWJsidW13D2qrHU/RUUONendL2Q/WlJg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "90f456026d284c22b3e3497be980b2e47d0b28ac", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "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", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 000000000..e6cd43d9c --- /dev/null +++ b/flake.nix @@ -0,0 +1,15 @@ +{ + description = "misskey dev"; + #inputs = { nixpkgs.url = "github:NixOS/nixpkgs/release-23.05"; }; + inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; }; + + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = import nixpkgs { + inherit system; + overlays = [ (final: prev: { nodejs = prev.nodejs_20; }) ]; + }; + #nixpkgs.legacyPackages.${system}; + in { devShells.default = import ./shell.nix { inherit pkgs; }; }); +} diff --git a/shell.nix b/shell.nix new file mode 100644 index 000000000..1d60a2062 --- /dev/null +++ b/shell.nix @@ -0,0 +1,9 @@ +{ pkgs ? import { } }: +with pkgs; +mkShell { + buildInputs = [ redis postgresql_15 nodejs nodePackages.pnpm cypress ]; + shellHook = '' + export CYPRESS_INSTALL_BINARY=0 + export CYPRESS_RUN_BINARY=${cypress}/bin/Cypress + ''; +}