Skip to content
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

imgproxy: init at 2.8.1 #77469

Merged
merged 2 commits into from Mar 7, 2020
Merged

imgproxy: init at 2.8.1 #77469

merged 2 commits into from Mar 7, 2020

Conversation

paluh
Copy link
Contributor

@paluh paluh commented Jan 10, 2020

Motivation for this change

imgproxy server is not available in nixpkgs. I've packaged only module. I'm not sure if I should also try to provide appropriate service package (this is my first package).

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@erikarvstedt
Copy link
Member

erikarvstedt commented Jan 10, 2020

Welcome to nixpkgs! 😸
Please add these fixes: erikarvstedt@4648cef

@paluh
Copy link
Contributor Author

paluh commented Jan 10, 2020

Welcome to nixpkgs! 

Thanks! :-)

I've merged your fixes directly. Do we want to have this merge commit in history or should I squash it into single one and push?

I've rerun nix-shell -p nix-review --run "nix-review rev HEAD" and everything seems fine.

@erikarvstedt
Copy link
Member

Please squash it.

@paluh
Copy link
Contributor Author

paluh commented Jan 10, 2020

Please squash it.

No problem. Done :-)
I've rerun the tests and pushed squased version.

P.S. I'm not sure why github incorporates some additional commit in this PR...

@paluh
Copy link
Contributor Author

paluh commented Jan 10, 2020

One sec. I've probably listed this additional commit during my rebase. Going to fix it...

@paluh
Copy link
Contributor Author

paluh commented Jan 10, 2020

Cleaned up. Sorry for this additional spam :-)

@ofborg ofborg bot removed the 6.topic: haskell label Jan 10, 2020
@erikarvstedt
Copy link
Member

This looks great now, congrats! We'll now have to wait for a committer to merge this.

{ lib, buildGoModule, fetchFromGitHub, pkg-config, vips, gobject-introspection }:

buildGoModule rec {
version = "2.8.1";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woops, forgot this one: Please move pname above version.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fwiw, I've stopped complaining about tiny issues like this, since I've been told there's too much bikeshedding like that, which can be demotivating for contributors.

pname = "imgproxy";

src = fetchFromGitHub {
owner ="imgproxy";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a space before "

@paluh
Copy link
Contributor Author

paluh commented Jan 10, 2020

Fixed and tested. @erikarvstedt thanks a lot for your time, review and support!

export CGO_LDFLAGS_ALLOW='-(s|w)'
'';

goPackagePath = "github.com/imgproxy/imgproxy";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

goPackagePath can be removed.


goPackagePath = "github.com/imgproxy/imgproxy";

modSha256 = "0kgd8lwcdns3skvd4bj4z85mq6hkk79mb0zzwky0wqxni8f73s6w";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please put modSha256 below the src definition.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've just dropped them and running test build on my machine. Should I bring them back?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, my deleted comment was of course an error, I meant that goPackagePath can be removed.

@erikarvstedt
Copy link
Member

Sorry, my go-package-fu is a bit rusty, otherwise I would have included all these changes in my inital patch.

version = "2.8.1";

src = fetchFromGitHub {
owner = "imgproxy";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

owner = pname;
repo = pname;

@paluh
Copy link
Contributor Author

paluh commented Jan 10, 2020

Sorry, my go-package-fu is a bit rusty (...)

No problem. I've removed goPackagePath but modSha256 seems to be required (test build failes with (..)called without required argument 'modSha256'). I've moved it as you suggested just below src`.

@erikarvstedt
Copy link
Member

Awesome, it's perfect now. Thanks for you patience! 😃

@paluh
Copy link
Contributor Author

paluh commented Jan 10, 2020

I've rerun test build. Everything is working fine.

Awesome, it's perfect now. Thanks for you patience!

I really appreciate your detailed review. Thanks again!

@erikarvstedt
Copy link
Member

@GrahamcOfBorg build imgproxy

Copy link
Contributor

@tomberek tomberek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Builds on NixOS. Functions as expected.

Copy link
Member

@stigtsp stigtsp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@paluh
Copy link
Contributor Author

paluh commented Jan 12, 2020

@erikarvstedt @stigtsp
Do you think that providing service expression for this app would be valuable? If so should I include it in this commit or can I do it in a separate one?

@erikarvstedt
Copy link
Member

It's best to do it in a separate PR.

@paluh
Copy link
Contributor Author

paluh commented Jan 12, 2020

It's best to do it in a separate PR.

Cool. I'm going to work on it along with the coding which I do for my internal project deployment.

maintainers/maintainer-list.nix Show resolved Hide resolved
pkgs/servers/imgproxy/default.nix Outdated Show resolved Hide resolved
@infinisil infinisil merged commit d50d469 into NixOS:master Mar 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants