-
-
Notifications
You must be signed in to change notification settings - Fork 13.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
excalidraw_export: init at v1.1.0 #341078
base: master
Are you sure you want to change the base?
Conversation
1d7cc85
to
74fcdc9
Compare
I wasn't sure which way I should provide this package I also noticed that the script I had to run updated all the packages, as they were outdated. Should I perhaps separate these two concerns in different PR's (updating the existing packages (1), then adding the new package (2))? |
Yes, there seems to be consensus among Node-involved Nixpkgs maintainers that we should avoid adding new packages to |
74fcdc9
to
fda911b
Compare
fda911b
to
4b80ab5
Compare
Updated to use |
4b80ab5
to
d75b5c1
Compare
cairo | ||
pango | ||
]; | ||
nativeBuildInputs = [ pkg-config ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this necessary? I can't find any references to it in the upstream source, though maybe I didn't look deep enough into its dependencies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's needed since one of the dependencies depends on some binaries being on built on the system. Without it, the installation seems to fail. I might be misunderstanding something though, but at least with it, it seems to work.
npm error /nix/store/8jind2ncd72hlzym9pghjjdj79fvqzv5-bash-5.2p32/bin/sh: line 1: pkg-config: command not found
npm error gyp: Call to 'pkg-config pixman-1 --libs' returned exit status 127 while in binding.gyp. while trying to load binding.gyp
npm error gyp ERR! configure error
npm error gyp ERR! stack Error: `gyp` failed with exit code: 1
npm error gyp ERR! stack at ChildProcess.<anonymous> (/nix/store/vc64zpxndmp3xh9699yb2vpbl81pxbk0-nodejs-20.17.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:297:18)
npm error gyp ERR! stack at ChildProcess.emit (node:events:519:28)
npm error gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12)
npm error gyp ERR! System Linux 6.8.10-asahi
npm error gyp ERR! command "/nix/store/vc64zpxndmp3xh9699yb2vpbl81pxbk0-nodejs-20.17.0/bin/node" "/nix/store/vc64zpxndmp3xh9699yb2vpbl81pxbk0-nodejs-20.17.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--update-binary" "--module=/build/source/node_modules/canvas/build/Release/canvas.node" "--module_name=canvas" "--module_path=/build/source/node_modules/canvas/build/Release" "--napi_version=9" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v115" "--nodedir=/nix/store/s6jmwml9fhazzvrva1jhmzmr5qrbbhgd-nodejs-20.17.0-source"
npm error gyp ERR! cwd /build/source/node_modules/canvas
npm error gyp ERR! node -v v20.17.0
npm error gyp ERR! node-gyp -v v10.1.0
npm error gyp ERR! not ok
npm error node-pre-gyp ERR! build error
npm error node-pre-gyp ERR! stack Error: Failed to execute '/nix/store/vc64zpxndmp3xh9699yb2vpbl81pxbk0-nodejs-20.17.0/bin/node /nix/store/vc64zpxndmp3xh9699yb2vpbl81pxbk0-nodejs-20.17.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --update-binary --module=/build/source/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/build/source/node_modules/canvas/build/Release --napi_version=9 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v115 --nodedir=/nix/store/s6jmwml9fhazzvrva1jhmzmr5qrbbhgd-nodejs-20.17.0-source' (1)
npm error node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/build/source/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
npm error node-pre-gyp ERR! stack at ChildProcess.emit (node:events:519:28)
npm error node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1105:16)
npm error node-pre-gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:305:5)
npm error node-pre-gyp ERR! System Linux 6.8.10-asahi
npm error node-pre-gyp ERR! command "/nix/store/vc64zpxndmp3xh9699yb2vpbl81pxbk0-nodejs-20.17.0/bin/node" "/build/source/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--update-binary"
npm error node-pre-gyp ERR! cwd /build/source/node_modules/canvas
npm error node-pre-gyp ERR! node -v v20.17.0
npm error node-pre-gyp ERR! node-pre-gyp -v v1.0.11
npm error node-pre-gyp ERR! not ok
npm error Log files were not written due to an error writing to the directory: /nix/store/31h9lfa8p68kgd9ahn36s1gzcvgz0fjw-excalidraw_export-1.1.0-npm-deps/_logs
npm error You can rerun the command with `--loglevel=verbose` to see the logs in your terminal
error: builder for '/nix/store/n2ww9gn8928b8gknb3vmay9amzc5rsxj-excalidraw_export-1.1.0.drv' failed with exit code 1;
last 10 log lines:
> npm error node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1105:16)
> npm error node-pre-gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:305:5)
> npm error node-pre-gyp ERR! System Linux 6.8.10-asahi
> npm error node-pre-gyp ERR! command "/nix/store/vc64zpxndmp3xh9699yb2vpbl81pxbk0-nodejs-20.17.0/bin/node" "/build/source/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--update-binary"
> npm error node-pre-gyp ERR! cwd /build/source/node_modules/canvas
> npm error node-pre-gyp ERR! node -v v20.17.0
> npm error node-pre-gyp ERR! node-pre-gyp -v v1.0.11
> npm error node-pre-gyp ERR! not ok
> npm error Log files were not written due to an error writing to the directory: /nix/store/31h9lfa8p68kgd9ahn36s1gzcvgz0fjw-excalidraw_export-1.1.0-npm-deps/_logs
> npm error You can rerun the command with `--loglevel=verbose` to see the logs in your terminal
For full logs, run 'nix log /nix/store/n2ww9gn8928b8gknb3vmay9amzc5rsxj-excalidraw_export-1.1.0.drv'.
d75b5c1
to
0248cb7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm, thank you ❤️
homepage = "https://github.com/Timmmm/excalidraw_export"; | ||
license = lib.licenses.mit; | ||
maintainers = with lib.maintainers; [ venikx ]; | ||
mainProgram = "excalidraw_export"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed the darwin builds are failing, and I don't have a darwin machine. I guess it would be better practice to limit the platforms?
mainProgram = "excalidraw_export"; | |
mainProgram = "excalidraw_export"; | |
platforms = [ | |
"aarch64-linux" | |
"x86_64-linux" | |
]; |
Description of changes
The following npm package makes it possible to convert
.excalidraw
files to.svg
files: https://github.com/Timmmm/excalidraw_export and is used by https://github.com/wdavew/org-excalidraw to handle excalidraw files inside org-mode in Emacs.Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.