Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
wrvsrx committed Mar 3, 2024
1 parent 27ba2d7 commit 04a90b6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
15 changes: 11 additions & 4 deletions pkgs/to-normal-packages/metacubexd/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@
, python3
, zlib
, husky
, cacert
}:
let
inherit (source) pname src;
version = lib.removePrefix "v" source.version;
node_modules = stdenv.mkDerivation {
pname = pname + "_node_modules";
pname = pname + "_cache";
inherit version src;
nativeBuildInputs = [
bun
Expand All @@ -28,22 +29,28 @@ let
vips
zlib
];
# patches = [ ./husky.patch ];
patches = [ ./husky.patch ];
impureEnvVars = lib.fetchers.proxyImpureEnvVars;
buildPhase = "bun install --frozen-lockfile --verbose --production";
buildPhase = ''
bun install --frozen-lockfile --verbose --production --ignore-scripts
'';

installPhase = "cp -r node_modules $out";
dontConfigure = true;
outputHash = "";
outputHashAlgo = "sha256";
outputHashMode = "recursive";
dontFixup = true;
};
in
stdenvNoCC.mkDerivation
{
inherit pname src version;
nativeBuildInputs = [ bun ];
configurePhase = "ln -s ${node_modules} node_modules";
buildPhase = "bun run build";
buildPhase = ''
bun run build
'';
installPhase = ''
mkdir -p $out
ln -s $node_modules $out/node_modules
Expand Down
5 changes: 3 additions & 2 deletions pkgs/to-normal-packages/metacubexd/husky.patch
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
diff --git a/package.json b/package.json
index c6fd398..4cb1c47 100644
index c6fd398..efceb92 100644
--- a/package.json
+++ b/package.json
@@ -9,7 +9,6 @@
@@ -9,7 +9,7 @@
"dev": "vite",
"format": "prettier -w .",
"lint": "eslint --fix .",
- "prepare": "husky",
+ "prepare": "node node_modules/.bin/husky",
"pwa-assets-generator": "pwa-assets-generator",
"serve": "vite preview"
},

0 comments on commit 04a90b6

Please sign in to comment.