Skip to content

Commit

Permalink
More fun changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelsgirao committed Dec 22, 2023
1 parent 29ea2b5 commit ed3a411
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 48 deletions.
26 changes: 13 additions & 13 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 22 additions & 6 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
# perSystem = { config, self', inputs', pkgs, system, ... }: {
perSystem = { config, pkgs, ... }:
let
node = pkgs.nodejs-slim;
node = pkgs.nodejs_18;
in
{
# Per-system attributes can be defined here. The self' and inputs'
Expand Down Expand Up @@ -67,17 +67,33 @@

devShells.default = pkgs.mkShell {
#Add executable packages to the nix-shell environment.
packages = with pkgs.nodePackages; [
packages = with pkgs; [
openssl
node
npm
prettier
prisma
nodePackages.npm
nodePackages.prettier
nodePackages.prisma
typescript
];
nativeBuildInputs = with pkgs; [
openssl
];
buildInputs = with pkgs; [
openssl
];


# PRISMA_MIGRATION_ENGINE_BINARY = "${pkgs.prisma-engines}/bin/migration-engine";


PRISMA_SKIP_POSTINSTALL_GENERATE = 1;
PRISMA_GENERATE_SKIP_AUTOINSTALL = 1;
PRISMA_CLI_QUERY_ENGINE_TYPE = "binary";
PRISMA_CLIENT_ENGINE_TYPE = "binary";


PRISMA_SCHEMA_ENGINE_BINARY = "${pkgs.prisma-engines}/bin/schema-engine";
PRISMA_QUERY_ENGINE_BINARY = "${pkgs.prisma-engines}/bin/query-engine";
PRISMA_QUERY_ENGINE_LIBRARY = "${pkgs.prisma-engines}/lib/libquery_engine.node";
PRISMA_INTROSPECTION_ENGINE_BINARY = "${pkgs.prisma-engines}/bin/introspection-engine";
PRISMA_FMT_BINARY = "${pkgs.prisma-engines}/bin/prisma-fmt";

Expand Down
39 changes: 20 additions & 19 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"dependencies": {
"@discordjs/rest": "^1.6.0",
"@prisma/client": "5.4.1",
"@prisma/client": "4.13.0",
"@types/better-sqlite3": "^5.4.3",
"axios": "^0.27.2",
"cheerio": "1.0.0-rc.10",
Expand All @@ -43,7 +43,7 @@
"eslint-config-prettier": "^8.3.0",
"pino-pretty": "^9.1.0",
"prettier": "^2.3.2",
"prisma": "5.4.1",
"prisma": "4.13.0",
"typescript": "^5.0.4"
},
"scripts": {
Expand Down
24 changes: 16 additions & 8 deletions package.nix
Original file line number Diff line number Diff line change
@@ -1,22 +1,30 @@
{ lib, buildNpmPackage, typescript, nodePackages, ... }:
{ lib, buildNpmPackage, typescript, nodePackages, prisma-engines, openssl, ... }:
buildNpmPackage rec {
pname = "ist-discord-bot";
version = "2.8.4";

src = lib.cleanSource ./.;


PRISMA_SCHEMA_ENGINE_BINARY = "${pkgs.prisma-engines}/bin/schema-engine";
PRISMA_QUERY_ENGINE_BINARY = "${pkgs.prisma-engines}/bin/query-engine";
PRISMA_QUERY_ENGINE_LIBRARY = "${pkgs.prisma-engines}/lib/libquery_engine.node";
PRISMA_INTROSPECTION_ENGINE_BINARY = "${pkgs.prisma-engines}/bin/introspection-engine";
PRISMA_FMT_BINARY = "${pkgs.prisma-engines}/bin/prisma-fmt";
PRISMA_SCHEMA_ENGINE_BINARY = "${prisma-engines}/bin/schema-engine";
PRISMA_QUERY_ENGINE_BINARY = "${prisma-engines}/bin/query-engine";
PRISMA_INTROSPECTION_ENGINE_BINARY = "${prisma-engines}/bin/introspection-engine";
PRISMA_FMT_BINARY = "${prisma-engines}/bin/prisma-fmt";

# npmDepsHash = lib.fakeHash;
npmDepsHash = "sha256-TACCzj+LlSDpK/3mcdPFMPX9IliQOK9zIHknqpCJeS4=";
PRISMA_SKIP_POSTINSTALL_GENERATE = 1;
PRISMA_GENERATE_SKIP_AUTOINSTALL = 1;
PRISMA_CLI_QUERY_ENGINE_TYPE = "binary";
PRISMA_CLIENT_ENGINE_TYPE = "binary";


npmDepsHash = "sha256-GtacSNGPLBd+8YpPJwIVRjffPFTMjSaVoCNVVAm2Zmo=";

dontNpmBuild = true;

buildInputs = [
openssl
];

configurePhase = ''
${nodePackages.prisma}/bin/prisma generate
'';
Expand Down

0 comments on commit ed3a411

Please sign in to comment.