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,116 @@
{
"name": "lemmy-ui",
"description": "An isomorphic UI for lemmy",
"version": "0.15.1",
"author": "Dessalines <tyhou13@gmx.com>",
"license": "AGPL-3.0",
"scripts": {
"build:dev": "webpack --mode=development",
"build:prod": "webpack --mode=production",
"clean": "yarn run rimraf dist",
"dev": "yarn start",
"lint": "node generate_translations.js && tsc --noEmit && eslint --report-unused-disable-directives --ext .js,.ts,.tsx src",
"prebuild:dev": "yarn clean && node generate_translations.js",
"prebuild:prod": "yarn clean && node generate_translations.js",
"prepare": "husky install",
"start": "yarn build:dev --watch"
},
"repository": "https://github.com/LemmyNet/lemmy-ui",
"dependencies": {
"@typescript-eslint/parser": "^5.6.0",
"autosize": "^5.0.1",
"check-password-strength": "^2.0.3",
"choices.js": "^10.0.0",
"classnames": "^2.3.1",
"emoji-short-name": "^1.0.0",
"express": "~4.17.1",
"i18next": "^21.5.4",
"inferno": "^7.4.11",
"inferno-create-element": "^7.4.11",
"inferno-helmet": "^5.2.1",
"inferno-hydrate": "^7.4.11",
"inferno-i18next-dess": "^0.0.1",
"inferno-router": "^7.4.11",
"inferno-server": "^7.4.11",
"isomorphic-cookie": "^1.2.4",
"jwt-decode": "^3.1.2",
"markdown-it": "^12.1.0",
"markdown-it-container": "^3.0.0",
"markdown-it-html5-embed": "^1.0.0",
"markdown-it-sub": "^1.0.0",
"markdown-it-sup": "^1.0.0",
"moment": "^2.29.1",
"register-service-worker": "^1.7.2",
"rxjs": "^7.4.0",
"sass": "^1.47.0",
"serialize-javascript": "^6.0.0",
"tippy.js": "^6.3.7",
"toastify-js": "^1.11.2",
"tributejs": "^5.1.3",
"websocket-ts": "^1.1.1"
},
"devDependencies": {
"@babel/core": "^7.16.0",
"@babel/plugin-transform-runtime": "^7.16.4",
"@babel/plugin-transform-typescript": "^7.16.1",
"@babel/preset-env": "7.16.8",
"@babel/preset-typescript": "^7.16.0",
"@babel/runtime": "^7.16.3",
"@types/autosize": "^4.0.0",
"@types/express": "^4.17.13",
"@types/node": "^17.0.8",
"@types/node-fetch": "^2.5.11",
"@types/serialize-javascript": "^5.0.1",
"@typescript-eslint/eslint-plugin": "^5.6.0",
"babel-loader": "^8.2.3",
"babel-plugin-inferno": "^6.3.0",
"bootstrap": "^5.1.3",
"bootswatch": "^5.1.3",
"clean-webpack-plugin": "^4.0.0",
"copy-webpack-plugin": "^10.0.0",
"css-loader": "^6.5.1",
"eslint": "^8.4.0",
"eslint-plugin-prettier": "^4.0.0",
"husky": "^7.0.4",
"import-sort-style-module": "^6.0.0",
"iso-639-1": "^2.1.10",
"lemmy-js-client": "0.15.0",
"lint-staged": "^12.1.2",
"mini-css-extract-plugin": "^2.4.5",
"node-fetch": "^2.6.1",
"prettier": "^2.5.1",
"prettier-plugin-import-sort": "^0.0.7",
"prettier-plugin-organize-imports": "^2.3.4",
"prettier-plugin-packagejson": "^2.2.15",
"rimraf": "^3.0.2",
"run-node-webpack-plugin": "^1.3.0",
"sass-loader": "^12.3.0",
"sortpack": "^2.2.0",
"style-loader": "^3.3.1",
"terser": "^5.10.0",
"typescript": "^4.5.2",
"webpack": "5.66.0",
"webpack-cli": "^4.9.1",
"webpack-dev-server": "4.7.3",
"webpack-node-externals": "^3.0.0"
},
"engines": {
"node": ">=8.9.0"
},
"engineStrict": true,
"lint-staged": {
"*.{ts,tsx,js}": [
"prettier --write",
"eslint --fix"
],
"package.json": [
"sortpack"
]
},
"importSort": {
".js, .jsx, .ts, .tsx": {
"style": "module",
"parser": "typescript"
}
}
}

View file

@ -0,0 +1,7 @@
{
"version": "0.15.1",
"serverSha256": "sha256-HHr9mG0AuI/86+EjODE/GT9lhl5DeNkzQ4k077b7ICU=",
"serverCargoSha256": "sha256-ErMNsyHfBiYZA4gjaxPHO+fQseUVIKy/928oGqw+Adg=",
"uiSha256": "sha256-Al6Q1xXkjqIb2v2S4JbmlQAAFCKwzkAW924uolC0tu8=",
"uiYarnDepsSha256": "sha256-Zadp74ZHmbxCHxpDAYOa6Ot2kWujIj8ZzrSaIEsYgMY="
}

View file

@ -0,0 +1,51 @@
{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, openssl
, postgresql
, libiconv
, Security
, protobuf
}:
let
pinData = lib.importJSON ./pin.json;
version = pinData.version;
in
rustPlatform.buildRustPackage rec {
inherit version;
pname = "lemmy-server";
src = fetchFromGitHub {
owner = "LemmyNet";
repo = "lemmy";
rev = version;
sha256 = pinData.serverSha256;
};
cargoSha256 = pinData.serverCargoSha256;
buildInputs = [ postgresql ]
++ lib.optionals stdenv.isDarwin [ libiconv Security ];
# Using OPENSSL_NO_VENDOR is not an option on darwin
# As of version 0.10.35 rust-openssl looks for openssl on darwin
# with a hardcoded path to /usr/lib/libssl.x.x.x.dylib
# https://github.com/sfackler/rust-openssl/blob/master/openssl-sys/build/find_normal.rs#L115
OPENSSL_LIB_DIR = "${lib.getLib openssl}/lib";
OPENSSL_INCLUDE_DIR = "${openssl.dev}/include";
PROTOC = "${protobuf}/bin/protoc";
PROTOC_INCLUDE = "${protobuf}/include";
nativeBuildInputs = [ protobuf ];
passthru.updateScript = ./update.sh;
meta = with lib; {
description = "🐀 Building a federated alternative to reddit in rust";
homepage = "https://join-lemmy.org/";
license = licenses.agpl3Only;
maintainers = with maintainers; [ happysalada ];
mainProgram = "lemmy_server";
};
}

View file

@ -0,0 +1,78 @@
{ lib
, mkYarnPackage
, libsass
, nodejs
, python3
, pkg-config
, fetchFromGitHub
, fetchYarnDeps
}:
let
pinData = lib.importJSON ./pin.json;
pkgConfig = {
node-sass = {
nativeBuildInputs = [ ];
buildInputs = [ libsass pkg-config python3 ];
postInstall = ''
LIBSASS_EXT=auto yarn --offline run build
rm build/config.gypi
'';
};
};
name = "lemmy-ui";
version = pinData.version;
src = fetchFromGitHub {
owner = "LemmyNet";
repo = name;
rev = version;
fetchSubmodules = true;
sha256 = pinData.uiSha256;
};
in
mkYarnPackage {
inherit src pkgConfig name version;
extraBuildInputs = [ libsass ];
packageJSON = ./package.json;
offlineCache = fetchYarnDeps {
yarnLock = src + "/yarn.lock";
sha256 = pinData.uiYarnDepsSha256;
};
yarnPreBuild = ''
export npm_config_nodedir=${nodejs}
'';
buildPhase = ''
# Yarn writes cache directories etc to $HOME.
export HOME=$PWD/yarn_home
ln -sf $PWD/node_modules $PWD/deps/lemmy-ui/
yarn --offline build:prod
'';
preInstall = ''
mkdir $out
cp -R ./deps/lemmy-ui/dist $out
cp -R ./node_modules $out
'';
distPhase = "true";
passthru.updateScript = ./update.sh;
meta = with lib; {
description = "Building a federated alternative to reddit in rust";
homepage = "https://join-lemmy.org/";
license = licenses.agpl3Only;
maintainers = with maintainers; [ happysalada billewanick ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,51 @@
#!/usr/bin/env nix-shell
#! nix-shell -i oil -p jq sd nix-prefetch-github ripgrep moreutils
# TODO set to `verbose` or `extdebug` once implemented in oil
shopt --set xtrace
# we need failures inside of command subs to get the correct dependency sha256
shopt --unset inherit_errexit
const directory = $(dirname $0 | xargs realpath)
const owner = "LemmyNet"
const ui_repo = "lemmy-ui"
const server_repo = "lemmy"
const latest_rev = $(curl -q https://api.github.com/repos/${owner}/${server_repo}/releases/latest | \
jq -r '.tag_name')
const latest_version = $(echo $latest_rev)
const current_version = $(jq -r '.version' $directory/pin.json)
if ($latest_version === $current_version) {
echo "lemmy is already up-to-date"
return 0
} else {
# for some strange reason, hydra fails on reading upstream package.json directly
const source = "https://raw.githubusercontent.com/$owner/$ui_repo/$latest_version"
const package_json = $(curl -qf $source/package.json)
echo $package_json > $directory/package.json
const server_tarball_meta = $(nix-prefetch-github $owner $server_repo --rev $latest_rev)
const server_tarball_hash = "sha256-$(echo $server_tarball_meta | jq -r '.sha256')"
const ui_tarball_meta = $(nix-prefetch-github $owner $ui_repo --rev $latest_rev)
const ui_tarball_hash = "sha256-$(echo $ui_tarball_meta | jq -r '.sha256')"
jq ".version = \"$latest_version\" | \
.\"serverSha256\" = \"$server_tarball_hash\" | \
.\"uiSha256\" = \"$ui_tarball_hash\" | \
.\"serverCargoSha256\" = \"\" | \
.\"uiYarnDepsSha256\" = \"\"" $directory/pin.json | sponge $directory/pin.json
const new_cargo_sha256 = $(nix-build -A lemmy-server 2>&1 | \
tail -n 2 | \
head -n 1 | \
sd '\s+got:\s+' '')
const new_offline_cache_sha256 = $(nix-build -A lemmy-ui 2>&1 | \
tail -n 2 | \
head -n 1 | \
sd '\s+got:\s+' '')
jq ".\"serverCargoSha256\" = \"$new_cargo_sha256\" | \
.\"uiYarnDepsSha256\" = \"$new_offline_cache_sha256\"" \
$directory/pin.json | sponge $directory/pin.json
}