-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
Adding stl-thumb derivation #370942
base: master
Are you sure you want to change the base?
Adding stl-thumb derivation #370942
Conversation
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.
-
For consistency with other packages, consider running
nix-shell -p nixpkgs-hammering --run "nixpkgs-hammer stl-thumb"
in the root Nixpkgs directory, and make the edits the program tells you to. -
Please review the Commit Conventions and squash your commits appropriately. There should be two commits total:
maintainers: add SyntaxualSugar
stl-thumb: init at 0.5.0
@@ -0,0 +1,62 @@ | |||
{ | |||
lib, | |||
pkgs, |
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.
pkgs, |
We don't call pkgs
inside Nixpkgs.
{ | ||
lib, | ||
pkgs, | ||
stdenv, |
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.
stdenv, |
Please remove all unused inputs.
--add-needed ${libGL}/lib/libEGL.so \ | ||
$out/bin/stl-thumb | ||
''; | ||
meta = with lib; { |
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.
meta = with lib; { | |
meta = { |
Nested with;
expressions is an anti-pattern.
src = fetchFromGitHub { | ||
owner = "unlimitedbacon"; | ||
repo = pname; | ||
rev = "6bc90573b2cddda3f8916b2716898298475406c0"; |
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.
rev = "6bc90573b2cddda3f8916b2716898298475406c0"; | |
tag = "v${version}"; |
|
||
src = fetchFromGitHub { | ||
owner = "unlimitedbacon"; | ||
repo = pname; |
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.
repo = pname; | |
repo = "stl-thumb"; |
Avoid interpolating pname
.
}: | ||
pkgs.rustPlatform.buildRustPackage rec { | ||
pname = "stl-thumb"; | ||
version = "0.5.0-6bc9057"; |
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.
version = "0.5.0-6bc9057"; | |
version = "0.5.0"; |
sha256 = "sha256-G5zk1FR18rhWdC1S1cGOcsAHRpq03A7+ivNs4sUpl54="; | ||
}; | ||
|
||
doCheck = false; |
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.
Please add a comment explaining why we're skipping tests.
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.
There are 3 tests in the project and all of them need an xdg runtime configured. I haven't been able to figure out how to get it working within the check phase.
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.
If they only need a dir create a dir with mktemp -d
then and pass it to a environment variable in preCheck
fontconfig | ||
libX11 | ||
]; | ||
propagatedBuildInputs = [ |
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.
Why are we propagating these?
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 believe I was propagating them while trying to get the tests to work. For my education, what is the downside of propagating inputs?
Thank you for all of the feedback! I will clean up the changes and come back with a new pull request. |
There's... really no need. Just force-push this one. It's best if we don't lose the review history. |
c5966af
to
419da30
Compare
the maintainers commit has a weird diff |
|
stl-thumb is a thumbnail generator for STL and OBJ files (helpful for file managers). It is tested against Gnome and KDE (KDE with an extra plugin needed), and Windows, but any file manager should work.
stl-thumb
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.