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:
Anton Arapov 2021-04-03 12:58:10 +02:00 committed by Alan Daniels
commit 56de2bcd43
30691 changed files with 3076956 additions and 0 deletions

View file

@ -0,0 +1,50 @@
{ stdenv, fetchFromGitHub, pkgs, lib, nodejs-14_x, nodePackages, pkg-config, libjpeg
, pixman, cairo, pango }:
let
nodejs = nodejs-14_x;
# No official version ever released
src = fetchFromGitHub {
owner = "matrix-discord";
repo = "mx-puppet-discord";
rev = "bb6438a504182a7a64048b992179427587ccfded";
sha256 = "0g2p5xwxxgvlnq0fg0x4q9x4asqyppdv6b5z6bvncm62kc70z6xk";
};
myNodePackages = import ./node-composition.nix {
inherit pkgs nodejs;
inherit (stdenv.hostPlatform) system;
};
in myNodePackages.package.override {
pname = "mx-puppet-discord";
version = "2021-08-01";
inherit src;
nativeBuildInputs = [ nodePackages.node-pre-gyp pkg-config ];
buildInputs = [ libjpeg pixman cairo pango ];
postInstall = ''
# Patch shebangs in node_modules, otherwise the webpack build fails with interpreter problems
patchShebangs --build "$out/lib/node_modules/mx-puppet-discord/node_modules/"
# compile Typescript sources
npm run build
# Make an executable to run the server
mkdir -p $out/bin
cat <<EOF > $out/bin/mx-puppet-discord
#!/bin/sh
exec ${nodejs}/bin/node $out/lib/node_modules/mx-puppet-discord/build/index.js "\$@"
EOF
chmod +x $out/bin/mx-puppet-discord
'';
meta = with lib; {
description = "A discord puppeting bridge for matrix";
license = licenses.asl20;
homepage = "https://github.com/matrix-discord/mx-puppet-discord";
maintainers = with maintainers; [ expipiplus1 ];
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,22 @@
#!/usr/bin/env nix-shell
#! nix-shell -i bash -p nodePackages.node2nix
# No official release
rev=bb6438a504182a7a64048b992179427587ccfded
u=https://raw.githubusercontent.com/matrix-discord/mx-puppet-discord/$rev
# Download package.json and package-lock.json
curl -O $u/package.json
curl $u/package-lock.json |
sed -e 's|git+ssh://git@|git+https://|g' > package-lock.json
node2nix \
--nodejs-14 \
--node-env ../../development/node-packages/node-env.nix \
--input package.json \
--lock package-lock.json \
--output node-packages.nix \
--composition node-composition.nix
sed -i 's|<nixpkgs>|../../..|' node-composition.nix
rm -f package.json package-lock.json

View file

@ -0,0 +1,17 @@
# This file has been generated by node2nix 1.9.0. Do not edit!
{pkgs ? import ../../.. {
inherit system;
}, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-14_x"}:
let
nodeEnv = import ../../development/node-packages/node-env.nix {
inherit (pkgs) stdenv lib python2 runCommand writeTextFile writeShellScript;
inherit pkgs nodejs;
libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
};
in
import ./node-packages.nix {
inherit (pkgs) fetchurl nix-gitignore stdenv lib fetchgit;
inherit nodeEnv;
}

File diff suppressed because it is too large Load diff