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
42
pkgs/applications/blockchains/electrs/default.nix
Normal file
42
pkgs/applications/blockchains/electrs/default.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, llvmPackages
|
||||
, rocksdb_6_23
|
||||
, Security
|
||||
}:
|
||||
|
||||
let
|
||||
rocksdb = rocksdb_6_23;
|
||||
in
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "electrs";
|
||||
version = "0.9.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "romanz";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-hdXc64gj7QtCnTq3f5mpQDEKLM6qaDBLkQE07xxNaDE=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-xMATO+H3bGkM/tLRimmLGYtrOAX8hzkw5Hb0c6iVAXY=";
|
||||
|
||||
# needed for librocksdb-sys
|
||||
nativeBuildInputs = [ llvmPackages.clang ];
|
||||
LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";
|
||||
|
||||
# link rocksdb dynamically
|
||||
ROCKSDB_INCLUDE_DIR = "${rocksdb}/include";
|
||||
ROCKSDB_LIB_DIR = "${rocksdb}/lib";
|
||||
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ Security ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "An efficient re-implementation of Electrum Server in Rust";
|
||||
homepage = "https://github.com/romanz/electrs";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ prusnak ];
|
||||
};
|
||||
}
|
||||
40
pkgs/applications/blockchains/electrs/update.sh
Executable file
40
pkgs/applications/blockchains/electrs/update.sh
Executable file
|
|
@ -0,0 +1,40 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p coreutils curl jq git gnupg common-updater-scripts
|
||||
set -euo pipefail
|
||||
|
||||
# Fetch latest release, GPG-verify the tag, update derivation
|
||||
|
||||
scriptDir=$(cd "${BASH_SOURCE[0]%/*}" && pwd)
|
||||
nixpkgs=$(realpath "$scriptDir"/../../../..)
|
||||
|
||||
oldVersion=$(nix-instantiate --eval -E "(import \"$nixpkgs\" { config = {}; overlays = []; }).electrs.version" | tr -d '"')
|
||||
version=$(curl -s --show-error "https://api.github.com/repos/romanz/electrs/releases/latest" | jq -r '.tag_name' | tail -c +2)
|
||||
|
||||
if [[ $version == $oldVersion ]]; then
|
||||
echo "Already at latest version $version"
|
||||
exit 0
|
||||
fi
|
||||
echo "New version: $version"
|
||||
|
||||
tmpdir=$(mktemp -d /tmp/electrs-verify-gpg.XXX)
|
||||
repo=$tmpdir/repo
|
||||
trap "rm -rf $tmpdir" EXIT
|
||||
|
||||
git clone --depth 1 --branch v${version} -c advice.detachedHead=false https://github.com/romanz/electrs $repo
|
||||
git -C $repo checkout tags/v${version}
|
||||
|
||||
export GNUPGHOME=$tmpdir
|
||||
echo
|
||||
echo "Fetching romanz's key"
|
||||
gpg --keyserver hkps://keys.openpgp.org --recv-keys 15c8c3574ae4f1e25f3f35c587cae5fa46917cbb 2> /dev/null
|
||||
echo
|
||||
echo "Verifying commit"
|
||||
git -C $repo verify-tag v${version}
|
||||
|
||||
rm -rf $repo/.git
|
||||
hash=$(nix hash path $repo)
|
||||
|
||||
(cd "$nixpkgs" && update-source-version electrs "$version" "$hash")
|
||||
sed -i 's|cargoHash = .*|cargoHash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";|' "$scriptDir/default.nix"
|
||||
echo
|
||||
echo "electrs: $oldVersion -> $version"
|
||||
Loading…
Add table
Add a link
Reference in a new issue