diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..f3f76a8 --- /dev/null +++ b/flake.lock @@ -0,0 +1,77 @@ +{ + "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": { + "locked": { + "lastModified": 1787209939, + "narHash": "sha256-WvvHR4kSQLAbtouMC/ruZ5UpLwlUcY3K4FAllMN+yGk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "391b592eb44808b3bd0cb80bb71b63a5a118b8bb", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "prisma-utils": { + "locked": { + "lastModified": 1775221764, + "narHash": "sha256-fwpba4vL4JrMJEbHeorLkn6z3+kjO+5RRZB6fh8ZIwY=", + "owner": "VanCoding", + "repo": "nix-prisma-utils", + "rev": "984c6b0eb4b36cf3ebfb29dc7247e221d15a083e", + "type": "github" + }, + "original": { + "owner": "VanCoding", + "repo": "nix-prisma-utils", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs", + "prisma-utils": "prisma-utils" + } + }, + "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 0000000..abcf80a --- /dev/null +++ b/flake.nix @@ -0,0 +1,31 @@ +{ + description = "vocabook dev environment with working Prisma engines on NixOS"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + prisma-utils.url = "github:VanCoding/nix-prisma-utils"; + }; + + outputs = + { nixpkgs, flake-utils, prisma-utils, ... }: + flake-utils.lib.eachDefaultSystem ( + system: + let + pkgs = nixpkgs.legacyPackages.${system}; + prisma = prisma-utils.lib.prisma-factory { + inherit pkgs; + hash = "sha256-dgsaGFfvH7xYadygnwN6uJwOo6DwHTo219x7to2+1IM="; + npmLock = ./package-lock.json; + }; + in + { + devShells.default = pkgs.mkShell { + buildInputs = [ + pkgs.nodejs_24 + ]; + env = prisma.env; + }; + } + ); +}