Merge pull request #277459 from tengkuizdihar/init-treedome
treedome: init at 0.3.3
This commit is contained in:
commit
6ba4ceb9b6
4910
pkgs/by-name/tr/treedome/Cargo.lock
generated
Normal file
4910
pkgs/by-name/tr/treedome/Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
68
pkgs/by-name/tr/treedome/package.json
Normal file
68
pkgs/by-name/tr/treedome/package.json
Normal file
@ -0,0 +1,68 @@
|
||||
{
|
||||
"name": "treedome",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "tsc && vite build",
|
||||
"preview": "vite preview",
|
||||
"tauri": "tauri",
|
||||
"clean": "rm -rf node_modules",
|
||||
"prettier-format": "prettier --config .prettierrc 'src/**/*.ts*' --write"
|
||||
},
|
||||
"resolutions": {
|
||||
"@types/react": "^17.0.1",
|
||||
"@types/react-dom": "^17.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@emotion/react": "^11.11.1",
|
||||
"@emotion/styled": "^11.11.0",
|
||||
"@fontsource/noto-sans": "^5.0.8",
|
||||
"@fontsource/noto-sans-mono": "^5.0.8",
|
||||
"@leeoniya/ufuzzy": "^1.0.8",
|
||||
"@mantine/core": "^6.0.16",
|
||||
"@mantine/form": "^6.0.16",
|
||||
"@mantine/hooks": "^6.0.16",
|
||||
"@mantine/modals": "^6.0.16",
|
||||
"@mantine/notifications": "^6.0.16",
|
||||
"@mantine/spotlight": "^6.0.17",
|
||||
"@mantine/tiptap": "^6.0.16",
|
||||
"@minoru/react-dnd-treeview": "^3.4.4",
|
||||
"@mui/icons-material": "^5.14.0",
|
||||
"@mui/material": "^5.14.0",
|
||||
"@tabler/icons-react": "^2.28.0",
|
||||
"@tauri-apps/api": "^1.4.0",
|
||||
"@tiptap/extension-code-block-lowlight": "^2.0.4",
|
||||
"@tiptap/extension-highlight": "^2.0.4",
|
||||
"@tiptap/extension-image": "^2.0.4",
|
||||
"@tiptap/extension-link": "^2.0.4",
|
||||
"@tiptap/extension-placeholder": "^2.0.4",
|
||||
"@tiptap/extension-subscript": "^2.0.4",
|
||||
"@tiptap/extension-superscript": "^2.0.4",
|
||||
"@tiptap/extension-text-align": "^2.0.4",
|
||||
"@tiptap/extension-underline": "^2.0.4",
|
||||
"@tiptap/pm": "^2.0.4",
|
||||
"@tiptap/react": "^2.0.4",
|
||||
"@tiptap/starter-kit": "^2.0.4",
|
||||
"@types/lodash": "^4.14.195",
|
||||
"jotai": "^2.2.2",
|
||||
"lodash": "^4.17.21",
|
||||
"lowlight": "^2.9.0",
|
||||
"rc-tree": "^5.7.8",
|
||||
"react": "^18.2.0",
|
||||
"react-dnd": "^16.0.1",
|
||||
"react-dom": "^18.2.0",
|
||||
"wouter": "^2.11.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tauri-apps/cli": "^1.4.0",
|
||||
"@types/node": "^20.4.4",
|
||||
"@types/react": "^18.2.15",
|
||||
"@types/react-dom": "^18.2.7",
|
||||
"@vitejs/plugin-react": "^4.0.3",
|
||||
"prettier": "^3.0.0",
|
||||
"typescript": "^5.1.6",
|
||||
"vite": "^4.4.6"
|
||||
}
|
||||
}
|
144
pkgs/by-name/tr/treedome/package.nix
Normal file
144
pkgs/by-name/tr/treedome/package.nix
Normal file
@ -0,0 +1,144 @@
|
||||
{ lib
|
||||
, cargo-tauri
|
||||
, cmake
|
||||
, dbus
|
||||
, fetchFromGitea
|
||||
, fetchYarnDeps
|
||||
, freetype
|
||||
, gsettings-desktop-schemas
|
||||
, gtk3
|
||||
, libsoup
|
||||
, mkYarnPackage
|
||||
, openssl
|
||||
, pkg-config
|
||||
, rustPlatform
|
||||
, webkitgtk
|
||||
, wrapGAppsHook
|
||||
, sqlite
|
||||
}:
|
||||
|
||||
let
|
||||
pname = "treedome";
|
||||
version = "0.3.3";
|
||||
|
||||
src = fetchFromGitea {
|
||||
domain = "codeberg.org";
|
||||
owner = "solver-orgz";
|
||||
repo = "treedome";
|
||||
rev = version;
|
||||
sha256 = "sha256-492EAKCXyc4s9FvkpqppZ/GllYuYe0YsXgbRl/oQBgE=";
|
||||
};
|
||||
|
||||
frontend-build = mkYarnPackage {
|
||||
inherit version src;
|
||||
pname = "treedome-ui";
|
||||
|
||||
offlineCache = fetchYarnDeps {
|
||||
yarnLock = "${src}/yarn.lock";
|
||||
sha256 = "sha256-rV5jKKnbMutaG5o8gRKgs/uoKwbIkxAPIcx6VWG7mm4=";
|
||||
};
|
||||
|
||||
packageJSON = ./package.json;
|
||||
|
||||
configurePhase = ''
|
||||
ln -s $node_modules node_modules
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
export HOME=$(mktemp -d)
|
||||
yarn --offline run build
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/dist
|
||||
cp -r dist/** $out/dist
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
doDist = false;
|
||||
};
|
||||
in
|
||||
rustPlatform.buildRustPackage {
|
||||
inherit version pname src;
|
||||
sourceRoot = "${src.name}/src-tauri";
|
||||
|
||||
cargoLock = {
|
||||
lockFile = ./Cargo.lock;
|
||||
outputHashes = {
|
||||
"fix-path-env-0.0.0" = "sha256-ewE3CwqLC8dvi94UrQsWbp0mjmrzEJIGPDYtdmQ/sGs=";
|
||||
};
|
||||
};
|
||||
|
||||
preConfigure = ''
|
||||
mkdir -p dist
|
||||
cp -R ${frontend-build}/dist/** dist
|
||||
'';
|
||||
|
||||
# copy the frontend static resources to final build directory
|
||||
# Also modify tauri.conf.json so that it expects the resources at the new location
|
||||
postPatch = ''
|
||||
substituteInPlace ./tauri.conf.json \
|
||||
--replace '"distDir": "../dist",' '"distDir": "dist",' \
|
||||
--replace '"beforeBuildCommand": "yarn run build",' '"beforeBuildCommand": "",'
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
cargo-tauri
|
||||
wrapGAppsHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
dbus
|
||||
openssl
|
||||
freetype
|
||||
libsoup
|
||||
gtk3
|
||||
webkitgtk
|
||||
gsettings-desktop-schemas
|
||||
sqlite
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
cargo tauri build
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin/
|
||||
mkdir -p $out/share/
|
||||
|
||||
cp target/release/bundle/deb/treedome_0.0.0_amd64/data/usr/bin/treedome $out/bin/treedome
|
||||
cp -R target/release/bundle/deb/treedome_0.0.0_amd64/data/usr/share/** $out/share/
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
# WEBKIT_DISABLE_COMPOSITING_MODE essential in NVIDIA + compositor https://github.com/NixOS/nixpkgs/issues/212064#issuecomment-1400202079
|
||||
postFixup = ''
|
||||
wrapProgram "$out/bin/treedome" \
|
||||
--set WEBKIT_DISABLE_COMPOSITING_MODE 1
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A local-first, encrypted, note taking application with tree-like structures, all written and saved in markdown";
|
||||
homepage = " https://codeberg.org/solver-orgz/treedome";
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = [ "x86_64-linux" ];
|
||||
mainProgram = "treedome";
|
||||
maintainers = with maintainers; [ tengkuizdihar ];
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user