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

hydron: unstable-2019-02-17 -> 3.0.4 #107810

Merged
merged 1 commit into from Jan 15, 2021

Conversation

freezeboy
Copy link
Contributor

Motivation for this change
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.

@Chiiruno
Copy link
Contributor

Chiiruno commented Dec 28, 2020 via email

buildGoPackage {
pname = "hydron-unstable";
version = "2019-02-17";
buildGoPackage rec {
Copy link
Member

Choose a reason for hiding this comment

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

Can we use buildGoModule?

@Chiiruno
Copy link
Contributor

Chiiruno commented Dec 28, 2020 via email

@SuperSandro2000
Copy link
Member

Result of nixpkgs-review pr 107810 run on x86_64-linux 1

1 package built:
  • hydron

@freezeboy
Copy link
Contributor Author

Trying to use buildGoModule right now

@freezeboy
Copy link
Contributor Author

quicktemplate and statik looks ok, but hydron has problems

hydron case:

github.com/chai2010/webp

vendor/github.com/chai2010/webp/capi.go:24:10: fatal error: webp.h: No such file or directory
24 | #include "webp.h"
| ^~~~~~~~
compilation terminated.

and I am not sure why this happens with modules and not packages

pkgs/servers/hydron/default.nix Outdated Show resolved Hide resolved
pkgs/servers/hydron/default.nix Outdated Show resolved Hide resolved
@SuperSandro2000
Copy link
Member

quicktemplate and statik looks ok, but hydron has problems

hydron case:

github.com/chai2010/webp

vendor/github.com/chai2010/webp/capi.go:24:10: fatal error: webp.h: No such file or directory
24 | #include "webp.h"
| ^~~~~~~~
compilation terminated.

and I am not sure why this happens with modules and not packages

I think buildGoModule could properly isolate the build dependencies.

@SuperSandro2000
Copy link
Member

Not sure why the header file (https://github.com/chai2010/webp/blob/master/internal/include/webp.h) is deleting while vendoring.

@SuperSandro2000
Copy link
Member

SuperSandro2000 commented Dec 29, 2020

diff --git a/pkgs/servers/hydron/default.nix b/pkgs/servers/hydron/default.nix
index 18dba9ce55e..1fd56e6fd2d 100644
--- a/pkgs/servers/hydron/default.nix
+++ b/pkgs/servers/hydron/default.nix
@@ -1,13 +1,11 @@
-{ stdenv, buildGoPackage, fetchFromGitHub, pkgconfig, ffmpeg-full, graphicsmagick
-, quicktemplate, go-bindata, easyjson }:
+{ stdenv, buildGoModule, fetchFromGitHub
+, pkg-config, ffmpeg
+, graphicsmagick, quicktemplate, go-bindata, easyjson }:

-buildGoPackage rec {
+buildGoModule rec {
   pname = "hydron";
   version = "3.0.4";

-  goPackagePath = "github.com/bakape/hydron";
-  goDeps = ./deps.nix;
-
   src = fetchFromGitHub {
     owner = "bakape";
     repo = "hydron";
@@ -15,9 +13,13 @@ buildGoPackage rec {
     sha256 = "BfMkKwz7ITEnAIMGUHlBH/Dn9yLjWKoqFWupPo1s2cs=";
   };

-  nativeBuildInputs = [ pkgconfig go-bindata ];
+  vendorSha256 = "1ngig5zw0gf1mkjjsfvvn09rncb36rg274cbi3glp8wzfcr8aip3";

-  buildInputs = [ ffmpeg-full graphicsmagick quicktemplate easyjson ];
+  runVend = true;
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [ ffmpeg ];

   meta = with stdenv.lib; {
     homepage = "https://github.com/bakape/hydron";

@freezeboy
Copy link
Contributor Author

Thank you I applied it, (and removed some unused deps)

@ofborg ofborg bot requested a review from kalbasit December 29, 2020 10:26
@SuperSandro2000
Copy link
Member

@freezeboy please fix the merge conflict.

@freezeboy
Copy link
Contributor Author

Fixed

@SuperSandro2000
Copy link
Member

This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch)
If you find some bugs or got suggestions for further things to search or run please reach out to SuperSandro2000 on IRC.

Result of nixpkgs-review pr 107810 run on x86_64-darwin 1

1 package built:
  • hydron

@SuperSandro2000
Copy link
Member

This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch)
If you find some bugs or got suggestions for further things to search or run please reach out to SuperSandro2000 on IRC.

Result of nixpkgs-review pr 107810 run on x86_64-linux 1

1 package built:
  • hydron

Copy link
Member

@SuperSandro2000 SuperSandro2000 left a comment

Choose a reason for hiding this comment

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

other than that LGTM

pkgs/servers/hydron/deps.nix Show resolved Hide resolved
@SuperSandro2000 SuperSandro2000 merged commit 2d0dc97 into NixOS:master Jan 15, 2021
@freezeboy freezeboy deleted the update-hydron branch January 15, 2021 10:23
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

3 participants