packages: added logseq-spa but it fails to compile and needs logseq's static compiled. todo
This commit is contained in:
parent
173ee08316
commit
15916d79ef
10
flake.nix
10
flake.nix
|
@ -19,6 +19,8 @@
|
||||||
system:
|
system:
|
||||||
let
|
let
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
lib = pkgs.lib;
|
||||||
|
stdenv = pkgs.stdenv;
|
||||||
craneLib = crane.mkLib pkgs;
|
craneLib = crane.mkLib pkgs;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
@ -26,6 +28,9 @@
|
||||||
jellyfin-tui = import ./packages/jellyfin-tui.nix {
|
jellyfin-tui = import ./packages/jellyfin-tui.nix {
|
||||||
inherit pkgs craneLib;
|
inherit pkgs craneLib;
|
||||||
};
|
};
|
||||||
|
logseq-publish-spa = import ./packages/logseq-spa.nix {
|
||||||
|
inherit pkgs lib stdenv;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
templates = {
|
templates = {
|
||||||
elixir-devshell = {
|
elixir-devshell = {
|
||||||
|
@ -39,6 +44,11 @@
|
||||||
type = "app";
|
type = "app";
|
||||||
program = "${self.packages.${system}.jellyfin-tui}/bin/jellyfin-tui";
|
program = "${self.packages.${system}.jellyfin-tui}/bin/jellyfin-tui";
|
||||||
};
|
};
|
||||||
|
logseq-publish-spa = {
|
||||||
|
type = "app";
|
||||||
|
program = "${self.packages.${system}.logseq-publish-spa}/bin/logseq-publish-spa";
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
48
packages/logseq-spa.nix
Normal file
48
packages/logseq-spa.nix
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
{
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
})
|
Loading…
Reference in a new issue