Skip to content

Commit 2a5f346

Browse files
committed
use prisma from unstable instead of from prisma-utils
1 parent c9ac018 commit 2a5f346

File tree

3 files changed

+34
-89
lines changed

3 files changed

+34
-89
lines changed

flake.lock

Lines changed: 10 additions & 62 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,49 @@
22
description = "CourseMate";
33
inputs = {
44
nixpkgs.url = "github:NixOS/nixpkgs/release-24.11";
5+
unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
6+
57
flake-utils.url = "github:numtide/flake-utils";
6-
prisma-utils.url = "github:VanCoding/nix-prisma-utils";
78
fenix = {
89
url = "github:nix-community/fenix/monthly";
910
inputs.nixpkgs.follows = "nixpkgs";
1011
};
1112
};
1213

13-
outputs = { nixpkgs, flake-utils, prisma-utils, fenix, ... }:
14+
outputs = { nixpkgs, unstable, flake-utils, fenix, ... }:
1415
flake-utils.lib.eachDefaultSystem (system:
1516
let
16-
pkgs = import nixpkgs { inherit system; };
17-
prisma = import ./nix/prisma.nix { inherit prisma-utils pkgs; };
17+
pkgs = nixpkgs.legacyPackages.${system};
18+
unstable-pkgs = unstable.legacyPackages.${system};
1819
rust-pkgs = import ./nix/rust-toolchain.nix { inherit fenix system; };
1920
in
20-
{
21-
devShell = pkgs.mkShell {
22-
src = ./.;
21+
rec {
22+
devShells.default = pkgs.mkShell {
2323
buildInputs = with pkgs; [
2424
gnumake
2525
bun
2626
biome
27-
pkg-config
28-
openssl
2927
lefthook
30-
pkgs.prisma
3128
dotenv-cli
32-
] ++ [
33-
rust-pkgs
29+
unstable-pkgs.prisma
3430
];
31+
3532
shellHook = ''
36-
# no longer necessary
37-
# export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${pkgs.stdenv.cc.cc.lib}/lib
38-
'' + prisma.shellHook;
33+
# requird by prisma
34+
export PRISMA_QUERY_ENGINE_BINARY="${unstable-pkgs.prisma-engines}/bin/query-engine";
35+
export PRISMA_QUERY_ENGINE_LIBRARY="${unstable-pkgs.prisma-engines}/lib/libquery_engine.node";
36+
export PRISMA_INTROSPECTION_ENGINE_BINARY="${unstable-pkgs.prisma-engines}/bin/introspection-engine";
37+
export PRISMA_FMT_BINARY="${unstable-pkgs.prisma-engines}/bin/prisma-fmt";
38+
'';
39+
};
40+
devShells.scraper = pkgs.mkShell {
41+
buildInputs = devShells.default.buildInputs ++ (with pkgs; [
42+
pkg-config
43+
openssl
44+
rust-pkgs
45+
]);
46+
shellHook = devShells.default.shellHook;
3947
};
4048
});
4149
}
50+

nix/prisma.nix

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)