Skip to content

Instantly share code, notes, and snippets.

@MostAwesomeDude
Created May 25, 2020 18:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MostAwesomeDude/072af859f2941dad0ef4b619ac34265e to your computer and use it in GitHub Desktop.
Save MostAwesomeDude/072af859f2941dad0ef4b619ac34265e to your computer and use it in GitHub Desktop.
{ lib, stdenv, fetchhg, cmake, pkgconfig, newScope }:
# Build instructions: https://relational-pipes.globalcode.info/v_0/release-v0.15.xhtml
let
mkRelPipe = { pname, hash, deps }:
stdenv.mkDerivation rec {
name = "relpipe-${pname}";
version = "0.15";
src = fetchhg {
url = "https://hg.globalcode.info/relpipe/relpipe-${pname}.cpp";
rev = "v${version}";
sha256 = hash;
};
buildInputs = [ cmake pkgconfig ] ++ deps;
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";
};
};
packages = (self: rec {
inherit mkRelPipe;
callPackage = newScope self;
# Our ordering here loosely follows upstream build order, but Nix frees us
# from following it strictly.
lib-common = callPackage ./lib-common.nix {};
lib-reader = callPackage ./lib-reader.nix {};
lib-writer = callPackage ./lib-writer.nix {};
lib-cli = callPackage ./lib-cli.nix {};
lib-xmlwriter = callPackage ./lib-xmlwriter.nix {};
in-fstab = callPackage ./in-fstab.nix {};
# in-cli = callPackage ./in-cli.nix {};
});
# in-xml in-xmltable in-csv in-recfile tr-cut tr-grep tr-sed tr-guile tr-awk tr-sql out-nullbyte out-ods out-tabular out-xml out-csv out-asn1 out-recfile in-filesystem
in lib.makeExtensible packages
{ mkRelPipe, lib-cli, lib-writer }:
mkRelPipe {
pname = "in-cli";
hash = "0q0sqg6jh4vngq97z3ijnc8jnfgm91bsbpd8x81w5c1ww525y034";
deps = [ lib-cli lib-writer ];
}
{ mkRelPipe, lib-cli, lib-writer }:
mkRelPipe {
pname = "in-fstab";
hash = "0l0m4pqx9x2rharzw6xgv441y6gh0gwhpkcqckfg4li1wc3py301";
deps = [ lib-cli lib-writer ];
}
{ mkRelPipe }:
mkRelPipe {
pname = "lib-cli";
hash = "12150c368wg2pz2a32pn3hrh11k8zssk4p80b9llvjjzqzc1f16d";
deps = [];
}
{ mkRelPipe }:
mkRelPipe {
pname = "lib-common";
hash = "1w90lhq5fab6s89jxisxd8vy96h5cvmz7sq12rm62p7kbi9i0fpn";
deps = [];
}
{ mkRelPipe, lib-common }:
mkRelPipe {
pname = "lib-reader";
hash = "1bxqgqprm1qmbnw7vgc5vpwggymkli87w0wzkixpgb4lzs0905y5";
deps = [ lib-common ];
}
{ mkRelPipe, lib-common }:
mkRelPipe {
pname = "lib-writer";
hash = "064bzh6h166rgpzx2j5ns0s8afd8zgmki64l4lgmv5ra2z49gf5q";
deps = [ lib-common ];
}
{ mkRelPipe }:
mkRelPipe {
pname = "lib-xmlwriter";
hash = "1ykbn0i4g8sg5grjdddhfd6mjmh540w950qq35sfxbhjk8iyr6n6";
deps = [];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment