79478403

Date: 2025-03-01 23:11:50
Score: 0.5
Natty:
Report link

Hat tip to @[email protected] who gave me the answer on Mastodon.

buildNpmPackage inherits from mkDerivation, so you can just get the directory by overriding postInstall.

buildNpmPackage rec {
  npmDepsHash = "sha256-+4lLBQ+UQ2XT0wwE6jADxG1UNZjLkQCLvvN1SdiUwZY=";
  pname = "mysite";
  src = fs.toSource {
    root = ./.;
    fileset = sourceFiles;
  };
  postInstall = ''
cp -rv public/ $out
'';
  version = "0.0.1";
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Eleanor Holley