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
photoprism: init at 220302-0059f429 #170953
Conversation
1e41077
to
6224cfa
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.
Did you take package-lock.json
directly from upstream? Can we turn generate-dependencies.sh
into an update script that also downloads the newest package-lock.json
?
6224cfa
to
86b1c82
Compare
Yup, that's right. Should I somehow make the script get the version from the .nix file, or is a |
1e58a2d
to
f790151
Compare
7b40b2d
to
3ff79d0
Compare
It should either get the newest version from GitHub or use |
3ff79d0
to
835c936
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.
Can we put libtensorflow
, backend
, and frontend
in separate files?
Also, did you consider using nodePackages
? That's what I did for deltachat-desktop
and it works the following way:
package.json
is downloaded and added to Nixpkgs- that file is referenced in
pkgs/development/node-packages/node-packages.json
- whenever
pkgs/development/node-packages/generate.sh
is run the dependencies for PhotoPrism are included inpkgs/development/node-packages/node-packages.nix
- in
pkgs/development/node-packages/default.nix
you have
photoprism = super."photoprism-../../servers/photoprism".override {
meta.broken = true; # use the top-level package instead
};
- in
pkgs/servers/photoprism/frontend.nix
you use
nodejs-12_x.pkgs.photoprism.override {
...
}
The advantage is that it doesn't add as many lines of code to Nixpkgs, the disadvantage is that it doesn't respect package-lock.json
.
557347b
to
b9210a1
Compare
b9210a1
to
0d98b85
Compare
pkgs/servers/photoprism/frontend.nix
Outdated
mkdir $out | ||
cp -r assets $out/ |
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.
mkdir $out | |
cp -r assets $out/ | |
install -Dt $out assets |
though I'm not sure assets
is the best directory name since it's very nonstandard, but it's okay for now.
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.
We could instead use something more standard and change PHOTOPRISM_ASSETS_PATH
.
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.
Maybe share/photoprism
?
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.
Seems like a good one :)
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.
Do we need to wrap to change the environment variable?
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.
Yeah that should work.
What's the default value for this environment variable, i.e. why did $out/assets work?
darktable | ||
rawtherapee | ||
ffmpeg | ||
libheif | ||
exiftool |
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.
Where are these used? Do we need to put them in $PATH
using makeWrapper
instead?
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.
Those are all runtime deps. Should we make a wrapper instead?
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.
Yes, I don't see how buildInputs
would work.
Sorry for the wall of nitpicky comments! |
Co-authored-by: Robert Schütz <github@dotlambda.de>
Co-authored-by: Robert Schütz <github@dotlambda.de>
Co-authored-by: Robert Schütz <github@dotlambda.de>
Co-authored-by: Robert Schütz <github@dotlambda.de>
Co-authored-by: Robert Schütz <github@dotlambda.de>
Co-authored-by: Robert Schütz <github@dotlambda.de>
Co-authored-by: Robert Schütz <github@dotlambda.de>
Co-authored-by: Robert Schütz <github@dotlambda.de>
Co-authored-by: Robert Schütz <github@dotlambda.de>
Co-authored-by: Robert Schütz <github@dotlambda.de>
Co-authored-by: Robert Schütz <github@dotlambda.de>
Co-authored-by: Robert Schütz <github@dotlambda.de>
Co-authored-by: Robert Schütz <github@dotlambda.de>
No problem at all! Thanks a lot for the very helpful comments :) |
any chance this will get merged before |
Hey, I ended up not using photoprism a lot so this PR is a little stale (but should still work!). Feel free to take it over if you're interested! |
superseded by #199674 |
Description of changes
Photoprism is a server-based application for browsing, organizing, and sharing your personal photo collection.
Most of this work was done by @newAM. I added aarch64 support and polished it up tiny bit.
I have an instance up and running on my RPi for a month now, and it's been working great.
Fixes #96043
Supersedes #99016
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes