pds: Update
This commit is contained in:
parent
575170595a
commit
86f7e7930b
1 changed files with 9 additions and 15 deletions
|
@ -4,7 +4,7 @@
|
||||||
removeReferencesTo,
|
removeReferencesTo,
|
||||||
srcOnly,
|
srcOnly,
|
||||||
python3,
|
python3,
|
||||||
pnpm,
|
pnpm_9,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
nodejs,
|
nodejs,
|
||||||
vips,
|
vips,
|
||||||
|
@ -35,7 +35,7 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
nodeSources = srcOnly nodejs;
|
nodeSources = srcOnly nodejs;
|
||||||
customPython3 = python3.withPackages (p: [ p.setuptools ]);
|
pythonEnv = python3.withPackages (p: [ p.setuptools ]);
|
||||||
in
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
|
@ -51,20 +51,18 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
|
|
||||||
sourceRoot = "${finalAttrs.src.name}/service";
|
sourceRoot = "${finalAttrs.src.name}/service";
|
||||||
|
|
||||||
npmDepsHash = "sha256-uQKhODaVHLj+JEq6LYiJ/zXuu7kDCLmpxOs/VCc0GqQ=";
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
makeBinaryWrapper
|
makeBinaryWrapper
|
||||||
nodejs
|
nodejs
|
||||||
customPython3
|
pythonEnv
|
||||||
pkg-config
|
pkg-config
|
||||||
pnpm.configHook
|
pnpm_9.configHook
|
||||||
];
|
];
|
||||||
|
|
||||||
# Required for `sharp` NPM dependency
|
# Required for `sharp` NPM dependency
|
||||||
buildInputs = [ vips ];
|
buildInputs = [ vips ];
|
||||||
|
|
||||||
pnpmDeps = pnpm.fetchDeps {
|
pnpmDeps = pnpm_9.fetchDeps {
|
||||||
inherit (finalAttrs)
|
inherit (finalAttrs)
|
||||||
pname
|
pname
|
||||||
version
|
version
|
||||||
|
@ -77,14 +75,10 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
runHook preBuild
|
runHook preBuild
|
||||||
|
|
||||||
for f in $(find -path '*/node_modules/better-sqlite3' -type d); do
|
pushd ./node_modules/.pnpm/better-sqlite3@*/node_modules/better-sqlite3
|
||||||
(cd "$f" && (
|
npm run build-release --offline --nodedir="${nodeSources}"
|
||||||
npm run build-release --offline --nodedir=${nodeSources}
|
find build -type f -exec remove-references-to -t "${nodeSources}" {} \;
|
||||||
find build -type f -exec \
|
popd
|
||||||
${lib.getExe removeReferencesTo} \
|
|
||||||
-t "${nodeSources}" {} \;
|
|
||||||
))
|
|
||||||
done
|
|
||||||
|
|
||||||
makeWrapper "${lib.getExe nodejs}" "$out/bin/pds" \
|
makeWrapper "${lib.getExe nodejs}" "$out/bin/pds" \
|
||||||
--add-flags --enable-source-maps \
|
--add-flags --enable-source-maps \
|
||||||
|
|
Loading…
Add table
Reference in a new issue