diff options
| author | Preston Pan <ret2pop@nullring.xyz> | 2026-03-03 23:48:07 -0800 |
|---|---|---|
| committer | Preston Pan <ret2pop@nullring.xyz> | 2026-03-03 23:48:07 -0800 |
| commit | 3d0fcb949d7358e19a2520184f42d9eaa117a220 (patch) | |
| tree | 877560448214b4aab5e6b3eec1a9694a7d2d53f5 | |
| parent | 4dc487e777f2b7900bd4e4d57205a1a4829c3401 (diff) | |
fix flake again
| -rw-r--r-- | flake.lock | 55 | ||||
| -rw-r--r-- | flake.nix | 74 |
2 files changed, 60 insertions, 69 deletions
@@ -611,6 +611,22 @@ "type": "github" } }, + "nixpkgs_7": { + "locked": { + "lastModified": 1772542754, + "narHash": "sha256-WGV2hy+VIeQsYXpsLjdr4GvHv5eECMISX1zKLTedhdg=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "8c809a146a140c5c8806f13399592dbcb1bb5dc4", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nur": { "inputs": { "flake-parts": "flake-parts_3", @@ -630,6 +646,23 @@ "type": "github" } }, + "org-roam-ui-src": { + "flake": false, + "locked": { + "lastModified": 1731155379, + "narHash": "sha256-vgJswjY+y9MGzmFznhjFYDBwE+wuubnAKGfqyiDeRIo=", + "owner": "ikoamu", + "repo": "org-roam-ui", + "rev": "a68a24d2cc70ff213fbc971c225d1ff473ae6364", + "type": "github" + }, + "original": { + "owner": "ikoamu", + "ref": "publish-org-roam-ui", + "repo": "org-roam-ui", + "type": "github" + } + }, "pre-commit-hooks-nix": { "inputs": { "flake-compat": [ @@ -659,11 +692,31 @@ "type": "github" } }, + "publish-org-roam-ui": { + "inputs": { + "nixpkgs": "nixpkgs_7", + "org-roam-ui-src": "org-roam-ui-src" + }, + "locked": { + "lastModified": 1772610081, + "narHash": "sha256-gIPpwSYCC52RFp7IShK1GdPNOSVPFoIgyw7A8vO6hyE=", + "ref": "refs/heads/main", + "rev": "fa45b54f9544a1ca68ae470cbc031eac56d4ee7e", + "revCount": 101, + "type": "git", + "url": "git://nullring.xyz/publish-org-roam-ui.git" + }, + "original": { + "type": "git", + "url": "git://nullring.xyz/publish-org-roam-ui.git" + } + }, "root": { "inputs": { "git-hooks": "git-hooks", "hyprnixmacs": "hyprnixmacs", - "nixpkgs": "nixpkgs_6" + "nixpkgs": "nixpkgs_6", + "publish-org-roam-ui": "publish-org-roam-ui" } }, "rust-overlay": { @@ -11,15 +11,10 @@ publish-org-roam-ui = { url = "git://nullring.xyz/publish-org-roam-ui.git"; - flake = false; - }; - org-roam-ui = { - url = "github:ikoamu/org-roam-ui/publish-org-roam-ui"; - flake = false; }; }; - outputs = { nixpkgs, git-hooks, hyprnixmacs, self, publish-org-roam-ui, org-roam-ui, ... }: + outputs = { nixpkgs, git-hooks, hyprnixmacs, self, publish-org-roam-ui, ... }: let system = "x86_64-linux"; pkgs = import nixpkgs { inherit system; }; @@ -44,41 +39,6 @@ fi }; }; }; - publish-deps = pkgs.stdenv.mkDerivation { - name = "publish-scripts-node-modules"; - src = publish-org-roam-ui; # <-- Changed this line - nativeBuildInputs = [ pkgs.nodejs ]; - buildPhase = '' - export HOME=$TMPDIR - npm install - npm install fuse.js - ''; - installPhase = '' - mkdir -p $out - cp -r node_modules $out/ - ''; - outputHashMode = "recursive"; - outputHashAlgo = "sha256"; - outputHash = pkgs.lib.fakeHash; - }; - - org-roam-ui-deps = pkgs.stdenv.mkDerivation { - name = "org-roam-ui-node-modules"; - src = org-roam-ui; - nativeBuildInputs = [ pkgs.yarn pkgs.nodejs ]; - buildPhase = '' - export HOME=$TMPDIR - yarn config set cache-folder $TMPDIR/.yarn-cache - yarn install - ''; - installPhase = '' - mkdir -p $out - cp -r node_modules $out/ - ''; - outputHashMode = "recursive"; - outputHashAlgo = "sha256"; - outputHash = pkgs.lib.fakeHash; # We will update this after the first run! - }; emacsPackages = import "${hyprnixmacs}/modules/home/emacs-packages.nix"; ci-emacs = pkgs.emacs-nox.pkgs.withPackages emacsPackages; @@ -168,33 +128,11 @@ emacs -q --batch \ --eval '(add-hook (quote org-publish-after-export-hook) (lambda (file) (font-lock-ensure)))' \ --eval '(org-publish-all t)' \ --eval '(org-publish-all nil)' || (echo "FAIL:" && cat /build/*.log && exit 1) - -echo "Setting up Org-Roam-UI..." -export NIX_ENV=1 -export ROAM_DB_PATH=$HOME/.emacs.d/org-roam.db -export ROAM_IMG_PATH=$HOME/monorepo/mindmap/img -export ROAM_PATH=$HOME/monorepo/mindmap -export UI_SRC=${org-roam-ui} - -cp -r ${publish-org-roam-ui} $HOME/publish-script -chmod -R +w $HOME/publish-script -cd $HOME/publish-script - -# Inject NPM modules safely -cp -r ${publish-deps}/node_modules ./node_modules -chmod -R +w ./node_modules - -# Run the patched local.sh -bash local.sh || echo "Graph script hit a non-fatal error" - -# Inject Yarn modules safely -cp -r ${org-roam-ui-deps}/node_modules ./org-roam-ui/node_modules -chmod -R +w ./org-roam-ui/node_modules - -cd org-roam-ui/standalone -bash build-standalone-server.sh ../.. - -cp -r ../../out $HOME/website_html/graph_view + echo "Setting up Graph View..." +${publish-org-roam-ui.packages.${system}.default}/bin/build-org-roam-graph \ + $HOME/.emacs.d/org-roam.db \ + $HOME/monorepo/mindmap \ + $HOME/website_html/graph_view ''; installPhase = '' |
