uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
97
pkgs/servers/sql/materialize/default.nix
Normal file
97
pkgs/servers/sql/materialize/default.nix
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, fetchzip
|
||||
, rustPlatform
|
||||
, bootstrap_cmds
|
||||
, DiskArbitration
|
||||
, Foundation
|
||||
, cmake
|
||||
, libiconv
|
||||
, openssl
|
||||
, perl
|
||||
, pkg-config}:
|
||||
|
||||
let
|
||||
fetchNpmPackage = {name, version, hash, js_prod_file, js_dev_file, ...} @ args:
|
||||
let
|
||||
package = fetchzip {
|
||||
url = "https://registry.npmjs.org/${name}/-/${baseNameOf name}-${version}.tgz";
|
||||
inherit hash;
|
||||
};
|
||||
|
||||
static = "./src/materialized/src/http/static";
|
||||
cssVendor = "./src/materialized/src/http/static/css/vendor";
|
||||
jsProdVendor = "./src/materialized/src/http/static/js/vendor";
|
||||
jsDevVendor = "./src/materialized/src/http/static-dev/js/vendor";
|
||||
|
||||
files = with args; [
|
||||
{ src = js_prod_file; dst = "${jsProdVendor}/${name}.js"; }
|
||||
{ src = js_dev_file; dst = "${jsDevVendor}/${name}.js"; }
|
||||
] ++ lib.optional (args ? css_file) { src = css_file; dst = "${cssVendor}/${name}.css"; }
|
||||
++ lib.optional (args ? extra_file) { src = extra_file.src; dst = "${static}/${extra_file.dst}"; };
|
||||
in
|
||||
lib.concatStringsSep "\n" (lib.forEach files ({src, dst}: ''
|
||||
mkdir -p "${dirOf dst}"
|
||||
cp "${package}/${src}" "${dst}"
|
||||
''));
|
||||
|
||||
npmPackages = import ./npm_deps.nix;
|
||||
in
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "materialize";
|
||||
version = "0.17.0";
|
||||
MZ_DEV_BUILD_SHA = "9f8cf75b461d288335cb6a7a73aaa670bab4a466";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "MaterializeInc";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-wKYU5S77VoOX7UA9/d21Puz9NYs/om08eNM69/m3Orc=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-GTkn/fUprkpsDeQxtzdmS7Fub9QODO5/4nh9ERswOY0=";
|
||||
|
||||
nativeBuildInputs = [ cmake perl pkg-config ]
|
||||
# Provides the mig command used by the krb5-src build script
|
||||
++ lib.optional stdenv.isDarwin bootstrap_cmds;
|
||||
|
||||
# Needed to get openssl-sys to use pkg-config.
|
||||
OPENSSL_NO_VENDOR = 1;
|
||||
|
||||
buildInputs = [ openssl ]
|
||||
++ lib.optionals stdenv.isDarwin [ libiconv DiskArbitration Foundation ];
|
||||
|
||||
# Skip tests that use the network
|
||||
checkFlags = [
|
||||
"--exact"
|
||||
"--skip test_client"
|
||||
"--skip test_client_errors"
|
||||
"--skip test_client_all_subjects"
|
||||
"--skip test_client_subject_and_references"
|
||||
"--skip test_no_block"
|
||||
"--skip test_safe_mode"
|
||||
"--skip test_tls"
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
${lib.concatStringsSep "\n" (map fetchNpmPackage npmPackages)}
|
||||
substituteInPlace ./misc/dist/materialized.service \
|
||||
--replace /usr/bin $out/bin \
|
||||
--replace _Materialize root
|
||||
'';
|
||||
|
||||
cargoBuildFlags = [ "--bin materialized" ];
|
||||
|
||||
postInstall = ''
|
||||
install --mode=444 -D ./misc/dist/materialized.service $out/etc/systemd/system/materialized.service
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://materialize.com";
|
||||
description = "A streaming SQL materialized view engine for real-time applications";
|
||||
license = licenses.bsl11;
|
||||
platforms = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" ];
|
||||
maintainers = [ maintainers.petrosagg ];
|
||||
};
|
||||
}
|
||||
62
pkgs/servers/sql/materialize/npm_deps.nix
Normal file
62
pkgs/servers/sql/materialize/npm_deps.nix
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
# materialized doesn't use npm to pull in its few node dependencies but instead
|
||||
# manually pulls the tar archives for each package and pulls out a couple of
|
||||
# files.
|
||||
#
|
||||
# The list of modules can be found in this file
|
||||
# https://github.com/MaterializeInc/materialize/blob/master/src/materialized/build/npm.rs
|
||||
[
|
||||
{
|
||||
name = "@hpcc-js/wasm";
|
||||
version = "0.3.14";
|
||||
hash = "sha256-EsbuFk9qtlm9yWpG29RnqVAHrP0rk3xyibQLy8qgRT4=";
|
||||
js_prod_file = "dist/index.min.js";
|
||||
js_dev_file = "dist/index.js";
|
||||
extra_file = {
|
||||
src = "dist/graphvizlib.wasm";
|
||||
dst = "js/vendor/@hpcc-js/graphvizlib.wasm";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "babel-standalone";
|
||||
version = "6.26.0";
|
||||
hash = "sha256-zdeTj4aOEzWvrnh90T80jL+RD8qg8PaeG0Ceua82Dz4=";
|
||||
js_prod_file = "babel.min.js";
|
||||
js_dev_file = "babel.js";
|
||||
}
|
||||
{
|
||||
name = "d3";
|
||||
version = "5.16.0";
|
||||
hash = "sha256-aQQRhnJxV5/9C+cQslctP3v/AePGfbSw8L3chObJzK4=";
|
||||
js_prod_file = "dist/d3.min.js";
|
||||
js_dev_file = "dist/d3.js";
|
||||
}
|
||||
{
|
||||
name = "d3-flame-graph";
|
||||
version = "3.1.1";
|
||||
hash = "sha256-Ls3MqALr6+/A+n8jqFw7frIB++6d1W3lAXKU0qFZ2ok=";
|
||||
css_file = "dist/d3-flamegraph.css";
|
||||
js_prod_file = "dist/d3-flamegraph.min.js";
|
||||
js_dev_file = "dist/d3-flamegraph.js";
|
||||
}
|
||||
{
|
||||
name = "pako";
|
||||
version = "1.0.11";
|
||||
hash = "sha256-St7nKpcYlJQl8qMmPkEHwmTufOHAeZK4lBZHo8VRXLA=";
|
||||
js_prod_file = "dist/pako.min.js";
|
||||
js_dev_file = "dist/pako.js";
|
||||
}
|
||||
{
|
||||
name = "react";
|
||||
version = "16.14.0";
|
||||
hash = "sha256-X/8Bc4XvC8IqQWbW/PCRJQpmOBI/0AZT/hSFBf/uJU8=";
|
||||
js_prod_file = "umd/react.production.min.js";
|
||||
js_dev_file = "umd/react.development.js";
|
||||
}
|
||||
{
|
||||
name = "react-dom";
|
||||
version = "16.14.0";
|
||||
hash = "sha256-2mYm9dwBFrWws6CB5bL6ghROTzX84RLM31hdnEbhG10=";
|
||||
js_prod_file = "umd/react-dom.production.min.js";
|
||||
js_dev_file = "umd/react-dom.development.js";
|
||||
}
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue