{ stdenv, fetchFromGitHub, fetchpatch, makeWrapper , which, nodejs, mkYarnPackage, python2, nixosTests }: mkYarnPackage rec { name = "hedgedoc"; version = "1.7.1"; src = fetchFromGitHub { owner = "hedgedoc"; repo = "hedgedoc"; rev = version; sha256 = "0axad5581v25pynfj6pgy0h1xp92dyllnc7mk42z6hxbs4sgkrw1"; }; nativeBuildInputs = [ which makeWrapper ]; extraBuildInputs = [ python2 ]; yarnNix = ./yarn.nix; yarnLock = ./yarn.lock; packageJSON = ./package.json; postConfigure = '' rm deps/HedgeDoc/node_modules cp -R "$node_modules" deps/HedgeDoc chmod -R u+w deps/HedgeDoc ''; buildPhase = '' runHook preBuild cd deps/HedgeDoc pushd node_modules/sqlite3 export CPPFLAGS="-I${nodejs}/include/node" npm run install --build-from-source --nodedir=${nodejs}/include/node popd npm run build runHook postBuild ''; dontInstall = true; distPhase = '' runHook preDist mkdir -p $out cp -R {app.js,bin,lib,locales,node_modules,package.json,public} $out cat > $out/bin/hedgedoc <