From 21dc827a948da8302b5b08cfdc81d58053a8e318 Mon Sep 17 00:00:00 2001 From: Yt Date: Mon, 10 Jan 2022 16:56:47 -0500 Subject: [PATCH] solana-testnet: init at 1.9.2 (#152055) --- .../blockchains/solana/default.nix | 56 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++ 2 files changed, 60 insertions(+) create mode 100644 pkgs/applications/blockchains/solana/default.nix diff --git a/pkgs/applications/blockchains/solana/default.nix b/pkgs/applications/blockchains/solana/default.nix new file mode 100644 index 000000000000..bfa9382b245a --- /dev/null +++ b/pkgs/applications/blockchains/solana/default.nix @@ -0,0 +1,56 @@ +{ stdenv +, fetchFromGitHub +, lib +, rustPlatform +, IOKit +, Security +, AppKit +, pkg-config +, udev +, zlib +, protobuf +}: +rustPlatform.buildRustPackage rec { + pname = "solana-testnet-cli"; + version = "1.9.2"; + + src = fetchFromGitHub { + owner = "solana-labs"; + repo = "solana"; + rev = "v${version}"; + sha256 = "sha256-wrv35vBohLztMZPb6gfZdCaXcjj/Y7vnQqINaI6dBM4="; + }; + + cargoSha256 = "sha256-A5uVa+cRmrkVyw7MFH4QAr0VIFi18wcc2VPFvQyT9EM="; + + buildAndTestSubdir = "cli"; + + nativeBuildInputs = lib.optionals stdenv.isLinux [ protobuf pkg-config ]; + buildInputs = lib.optionals stdenv.isLinux [ udev zlib ] ++ lib.optionals stdenv.isDarwin [ IOKit Security AppKit ]; + + # check phase fails + # on darwin with missing framework System. This framework is not available in nixpkgs + # on linux with some librocksdb-sys compilation error + doCheck = false; + + # all the following are needed for the checkphase + # checkInputs = lib.optionals stdenv.isDarwin [ pkg-config rustfmt ]; + # Needed to get openssl-sys to use pkg-config. + # OPENSSL_NO_VENDOR = 1; + # OPENSSL_LIB_DIR = "${openssl.out}/lib"; + # OPENSSL_DIR="${lib.getDev openssl}"; + # LLVM_CONFIG_PATH="${llvm}/bin/llvm-config"; + # LIBCLANG_PATH="${llvmPackages.libclang.lib}/lib"; + # Used by build.rs in the rocksdb-sys crate. If we don't set these, it would + # try to build RocksDB from source. + # ROCKSDB_INCLUDE_DIR="${rocksdb}/include"; + # ROCKSDB_LIB_DIR="${rocksdb}/lib"; + + meta = with lib; { + description = "Web-Scale Blockchain for fast, secure, scalable, decentralized apps and marketplaces. "; + homepage = "https://solana.com"; + license = licenses.asl20; + maintainers = with maintainers; [ happysalada ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a9dd62e6da43..c7ef8d34d773 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -30144,6 +30144,10 @@ with pkgs; sumokoin = callPackage ../applications/blockchains/sumokoin { boost = boost165; }; + solana-testnet = callPackage ../applications/blockchains/solana { + inherit (darwin.apple_sdk.frameworks) IOKit Security AppKit; + }; + tessera = callPackage ../applications/blockchains/tessera { }; vertcoin = libsForQt514.callPackage ../applications/blockchains/vertcoin {