File tree Expand file tree Collapse file tree 2 files changed +19
-5
lines changed
Expand file tree Collapse file tree 2 files changed +19
-5
lines changed Original file line number Diff line number Diff line change 2222 hostname = "binaries.prisma.sh" ;
2323 channel = "all_commits" ;
2424 binaryTarget = binaryTargetBySystem . ${ nixpkgs . system } ;
25- target = "${ binaryTarget } -openssl-${ opensslVersion } " ;
25+ isDarwin = nixpkgs . lib . strings . hasPrefix "darwin" binaryTarget ;
26+ target = if isDarwin then
27+ binaryTarget
28+ else
29+ "${ binaryTarget } -openssl-${ opensslVersion } " ;
2630 baseUrl = "https://${ hostname } /${ channel } " ;
2731 files =
2832 [
3943 variable = "PRISMA_QUERY_ENGINE_BINARY" ;
4044 }
4145 {
42- name = "libquery_engine.so.node" ;
46+ name = if isDarwin then
47+ "libquery_engine.dylib.node"
48+ else
49+ "libquery_engine.so.node" ;
4350 hash = libquery-engine-hash ;
4451 path = "lib/libquery_engine.node" ;
4552 variable = "PRISMA_QUERY_ENGINE_LIBRARY" ;
@@ -104,10 +111,11 @@ rec {
104111 pname = "prisma-bin" ;
105112 version = commit ;
106113 nativeBuildInputs = [
107- nixpkgs . autoPatchelfHook
108114 nixpkgs . zlib
109115 openssl
110116 nixpkgs . stdenv . cc . cc . lib
117+ ] ++ nixpkgs . lib . optionals ( ! isDarwin ) [
118+ nixpkgs . autoPatchelfHook
111119 ] ;
112120 phases = [
113121 "buildPhase"
Original file line number Diff line number Diff line change 1414 libquery-engine-hash = "sha256-oalG9QKuxURtdgs5DgJZZtyWMz3ZpywHlov+d1ct2vA=" ;
1515 schema-engine-hash = "sha256-5bp8iiq6kc9c37G8dNKVHKWJHvaxFaetR4DOR/0/eWs=" ;
1616 } ;
17+ aarch64-darwin = {
18+ prisma-fmt-hash = "sha256-UPig7U2zXOccalIUE0j07xJdmqAUJ7cpXFTo+2Gbsc8=" ;
19+ query-engine-hash = "sha256-ihP1BEAvXQ+5XXHEXCYAVTnuETpfxmdtsIGRTljKtS0=" ;
20+ libquery-engine-hash = "sha256-4T63O+OyoEIJ0TLKoOoil06whd+41QxiXXg+0cgpX/8=" ;
21+ schema-engine-hash = "sha256-+O4IelHbZt4X+6UWol8TpL+BBDTS5JT+0hQR7ELVmZc=" ;
22+ } ;
1723 } ;
1824 test-npm =
1925 let
2733 echo "testing npm"
2834 ${ prisma . shellHook }
2935 cd npm
30- npm ci
36+ ${ nixpkgs . nodejs } /bin/ npm ci
3137 ./node_modules/.bin/prisma generate
3238 '' ;
3339 } ;
4349 echo "testing pnpm"
4450 ${ prisma . shellHook }
4551 cd pnpm
46- pnpm install
52+ ${ nixpkgs . pnpm } /bin/ pnpm install
4753 ./node_modules/.bin/prisma generate
4854 '' ;
4955 } ;
You can’t perform that action at this time.
0 commit comments