49 lines
925 B
Nix
49 lines
925 B
Nix
{
|
|
lib,
|
|
stdenv,
|
|
pkgs,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "logseq-spa";
|
|
version = "0.3.1";
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
owner = "logseq";
|
|
repo = "publish-spa";
|
|
rev = "353b3654d00d6a5df2bb7b8bfef93766cdaad01c";
|
|
hash = "sha256-rbK6lXb7ZyWPdsSze2to0h9g+XCGqyEyLlCAMqayzOQ=";
|
|
};
|
|
nativeBuildInputs = [
|
|
yarn
|
|
nodejs
|
|
makeWrapper
|
|
pkg-config
|
|
];
|
|
|
|
buildInputs = [
|
|
];
|
|
|
|
buildPhase = ''
|
|
runHook preBuild
|
|
npm i
|
|
runHook postBuild
|
|
'';
|
|
|
|
# TODO build static for logseq
|
|
installPhase = ''
|
|
runHook preInstall
|
|
mkdir -p $out/bin
|
|
cp publish_spa.mjs $out/bin/logseq-publish-spa
|
|
chmod +x $out/bin/logseq-publish-spa
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = {
|
|
description = "Logseq single page application exporter";
|
|
homepage = "https://github.com/logseq/publish-spa";
|
|
license = lib.licenses.mit;
|
|
platforms = lib.platforms.linux;
|
|
};
|
|
})
|