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

relpipe: init at 0.17.1 #89787

Closed
wants to merge 6 commits into from
Closed

Conversation

MostAwesomeDude
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.

@MostAwesomeDude
Copy link
Contributor Author

While testing the functionality in relpipe-in-sql, I tripped over the issue that is now fixed by #89879. That PR doesn't block this one, but does interfere constructively.

@Lassulus
Copy link
Member

Not sure if the merge commit will cause any noise when merging, Maybe you could remove it?

pkgs/tools/text/relpipe/default.nix Outdated Show resolved Hide resolved
pkgs/tools/text/relpipe/default.nix Outdated Show resolved Hide resolved
pkgs/tools/text/relpipe/default.nix Outdated Show resolved Hide resolved
Comment on lines 28 to 32
meta = {
maintainers = [ stdenv.lib.maintainers.MostAwesomeDude ];
homepage = https://relational-pipes.globalcode.info/;
license = stdenv.lib.licenses.gpl3;
description = "An open data format designed for streaming structured data between two processes";
};
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
meta = {
maintainers = [ stdenv.lib.maintainers.MostAwesomeDude ];
homepage = https://relational-pipes.globalcode.info/;
license = stdenv.lib.licenses.gpl3;
description = "An open data format designed for streaming structured data between two processes";
};
meta = with stdenv.lib; {
description = "An open data format designed for streaming structured data between two processes";
homepage = "https://relational-pipes.globalcode.info/";
license = licenses.gpl3;
maintainers = with maintainers; [ MostAwesomeDude ];
};

Copy link
Contributor

Choose a reason for hiding this comment

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

@MostAwesomeDude please address this review comment as well.

@SuperSandro2000
Copy link
Member

Please remove the merge conflict.

@SuperSandro2000
Copy link
Member

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

1 package built:
  • relpipe

@SuperSandro2000
Copy link
Member

Please remove the merge master commit.

Copy link
Contributor

@doronbehar doronbehar left a comment

Choose a reason for hiding this comment

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

Very good looking package!

pkgs/tools/text/relpipe/default.nix Outdated Show resolved Hide resolved
pkgs/tools/text/relpipe/default.nix Outdated Show resolved Hide resolved
pkgs/tools/text/relpipe/default.nix Outdated Show resolved Hide resolved
pkgs/tools/text/relpipe/default.nix Show resolved Hide resolved
pkgs/tools/text/relpipe/default.nix Outdated Show resolved Hide resolved
pkgs/tools/text/relpipe/default.nix Outdated Show resolved Hide resolved
pkgs/tools/text/relpipe/default.nix Outdated Show resolved Hide resolved
};
in symlinkJoin {
name = "relpipe";
paths = [
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be nice if it was possible to disable some of these packages, to spare some closure size for those who wish so.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure. Or we could split them into an attrset. The upstream intent is that a metapackage will have all of the utilities, but there's nothing wrong with exposing them ala carte.

MostAwesomeDude and others added 2 commits August 22, 2021 09:23
And do a couple fixups so that the package still builds.

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Co-authored-by: Doron Behar <doron.behar@gmail.com>
This is more accurate. Requested from code review.
@MostAwesomeDude
Copy link
Contributor Author

I think that I've handled all review comments, save for the following:

  • Closure size: Yes, let's go smaller. I don't know what folks would prefer to do, but I would be okay with putting e.g. relpipe.in-csv in there. Do we just make an attrset and merge it into the symlink farm? This seems like a nice feature that doesn't have to block this PR.
  • Python version: relpipe-tr-python is hardcoded upstream to build against Python 3.6 alone. This can probably be patched later in another PR, if we need more flexibility. I already tried the simple obvious tricks for making the build instructions more flexible, but they did not work.
  • Rebase: This branch is relatively old for not having any merge conflicts! I don't think I need to rebase yet though.

Thanks for coming with me on this marathon. I'm renaming the PR to indicate that the merge would make 0.17.1 available, not 0.16.

@MostAwesomeDude MostAwesomeDude changed the title relpipe: init at 0.16 relpipe: init at 0.17.1 Aug 22, 2021
@doronbehar
Copy link
Contributor

  • Rebase: This branch is relatively old for not having any merge conflicts! I don't think I need to rebase yet though.

👍

  • Closure size: Yes, let's go smaller. I don't know what folks would prefer to do, but I would be okay with putting e.g. relpipe.in-csv in there. Do we just make an attrset and merge it into the symlink farm? This seems like a nice feature that doesn't have to block this PR.

I don't understand the idea, but it'd be nice if you'd allow overriding the derivation in a way that will enable saving some closure size for those who wish so, with this change:

diff --git i/pkgs/tools/text/relpipe/default.nix w/pkgs/tools/text/relpipe/default.nix
index e0603972e92..1f66803413d 100644
--- i/pkgs/tools/text/relpipe/default.nix
+++ w/pkgs/tools/text/relpipe/default.nix
@@ -1,5 +1,19 @@
-{ lib, stdenv, fetchhg, cmake, pkg-config, installShellFiles, symlinkJoin
-, xercesc, libxmlxx, guile_2_2, unixODBC, python36, libjack2 }:
+{ lib
+, stdenv
+, fetchhg
+, cmake
+, pkg-config
+, installShellFiles
+, symlinkJoin
+, xercesc
+, libxmlxx
+, guile_2_2
+, unixODBC
+, python36
+, libjack2
+# Use attribute names strings to disable modules
+, disabledModules ? []
+}:
 
 # Build instructions: https://relational-pipes.globalcode.info/v_0/release-v0.16.xhtml
 let
@@ -37,6 +51,7 @@ let
 
   # Our ordering here loosely follows upstream build order, but Nix frees us
   # from following it strictly.
+  availableModules = {
   lib-common = mkRelPipe {
     pname = "lib-common";
     hash = "18s6nq0n1vn12p1akar12ki18fjp0s3y9vzs87wcdj3dk7v4z7dx";
@@ -185,11 +200,9 @@ let
     hash = "16q9ck2qwyy8f7yqcaab1dicwav325cmajqah9q89xrlkjx3mq2j";
     deps = [ lib-cli lib-common lib-reader libjack2 ];
   };
+  };
 in symlinkJoin {
   name = "relpipe-${version}";
-  paths = [
-    in-fstab in-cli in-xml in-xmltable in-csv in-recfile in-filesystem in-jack
-    tr-cut tr-grep tr-sed tr-awk tr-scheme tr-sql tr-python tr-validator
-    out-nullbyte out-ods out-tabular out-xml out-csv out-asn1 out-recfile out-jack
-  ];
+
+  paths = builtins.attrValues (builtins.removeAttrs availableModules disabledModules);
 }

It's a personal and common preference of mine and a lot of others to use 1 input per line, at the beginning of derivation.

* Python version: `relpipe-tr-python` is hardcoded upstream to build against Python 3.6 alone. This can probably be patched later in another PR, if we need more flexibility. I already tried the simple obvious tricks for making the build instructions more flexible, but they did not work.

Not a blocker IMO too.


meta = with lib; {
maintainers = [ maintainers.MostAwesomeDude ];
homepage = https://relational-pipes.globalcode.info/;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
homepage = https://relational-pipes.globalcode.info/;
homepage = "https://relational-pipes.globalcode.info/";

@Lassulus
Copy link
Member

so, any progress? need any help?

@MostAwesomeDude
Copy link
Contributor Author

Yeah, I'll let somebody else finish this. Thanks for reviewing.

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

4 participants