push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,203 @@
{
lib,
stdenv,
fetchurl,
fetchFromGitHub,
cmake,
pkg-config,
installShellFiles,
autoSignDarwinBinariesHook,
wrapQtAppsHook ? null,
boost,
libevent,
zeromq,
zlib,
db48,
sqlite,
qrencode,
libsystemtap,
qtbase ? null,
qttools ? null,
python3,
versionCheckHook,
withGui,
withWallet ? true,
enableTracing ? stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isStatic,
gnupg,
imagemagick,
librsvg,
libicns,
# Signatures from the following GPG public keys checked during verification of the source code.
# The list can be found at https://github.com/bitcoinknots/guix.sigs/tree/knots/builder-keys
builderKeys ? [
"1A3E761F19D2CC7785C5502EA291A2C45D0C504A" # luke-jr.gpg
"55058E8947E136A64F9E8AD5C4512A878E4AC2BF" # nsvrn
"DAED928C727D3E613EC46635F5073C4F4882FFFC" # leo-haf.gpg
],
}:
stdenv.mkDerivation (finalAttrs: {
pname = if withGui then "bitcoin-knots" else "bitcoind-knots";
version = "29.1.knots20250903";
src = fetchurl {
url = "https://bitcoinknots.org/files/29.x/${finalAttrs.version}/bitcoin-${finalAttrs.version}.tar.gz";
# hash retrieved from signed SHA256SUMS
hash = "sha256-2DlJlGNrCOe8UouZ+TLdZ2OahU18AWL6K/KI1YA29QY=";
};
nativeBuildInputs = [
cmake
pkg-config
installShellFiles
gnupg
]
++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [
autoSignDarwinBinariesHook
]
++ lib.optionals withGui [
imagemagick # for convert
librsvg # for rsvg-convert
wrapQtAppsHook
]
++ lib.optionals (stdenv.hostPlatform.isDarwin && withGui) [
libicns # for png2icns
];
buildInputs = [
boost
libevent
zeromq
zlib
]
++ lib.optionals enableTracing [ libsystemtap ]
++ lib.optionals withWallet [ sqlite ]
# building with db48 (for legacy descriptor wallet support) is broken on Darwin
++ lib.optionals (withWallet && !stdenv.hostPlatform.isDarwin) [ db48 ]
++ lib.optionals withGui [
qrencode
qtbase
qttools
];
preUnpack =
let
majorVersion = lib.versions.major finalAttrs.version;
publicKeys = fetchFromGitHub {
owner = "bitcoinknots";
repo = "guix.sigs";
rev = "d441685d5179b91070fadbc764be3a41616f36df";
sha256 = "sha256-XO/E51yOFrRYrGnxsyH/ZPF4Yf192x+lT2FPdilkacA=";
};
checksums = fetchurl {
url = "https://bitcoinknots.org/files/${majorVersion}.x/${finalAttrs.version}/SHA256SUMS";
hash = "sha256-CH5p+u2XvIpWC/yv+UrP3JSq/dcAxq/eCZ+fPzqaI+Q=";
};
signatures = fetchurl {
url = "https://bitcoinknots.org/files/${majorVersion}.x/${finalAttrs.version}/SHA256SUMS.asc";
hash = "sha256-abCiaE3etiXfqC1nrmHMP77HO94L+ZZv4B2s08p1d2k=";
};
verifyBuilderKeys =
let
script = publicKey: ''
echo "Checking if public key ${publicKey} signed the checksum file..."
grep "^\[GNUPG:\] VALIDSIG .* ${publicKey}$" verify.log > /dev/null
echo "OK"
'';
in
builtins.concatStringsSep "\n" (map script builderKeys);
in
''
pushd $(mktemp -d)
export GNUPGHOME=$PWD/gnupg
mkdir -m 700 -p $GNUPGHOME
gpg --no-autostart --batch --import ${publicKeys}/builder-keys/*
ln -s ${checksums} ./SHA256SUMS
ln -s ${signatures} ./SHA256SUMS.asc
ln -s $src ./bitcoin-${finalAttrs.version}.tar.gz
gpg --no-autostart --batch --verify --status-fd 1 SHA256SUMS.asc SHA256SUMS > verify.log
${verifyBuilderKeys}
echo "Checking ${checksums} for bitcoin-${finalAttrs.version}.tar.gz..."
grep bitcoin-${finalAttrs.version}.tar.gz SHA256SUMS > SHA256SUMS.filtered
echo "Verifying the checksum of bitcoin-${finalAttrs.version}.tar.gz..."
sha256sum -c SHA256SUMS.filtered
popd
'';
postInstall = ''
cd ..
installShellCompletion --bash contrib/completions/bash/bitcoin-cli.bash
installShellCompletion --bash contrib/completions/bash/bitcoind.bash
installShellCompletion --bash contrib/completions/bash/bitcoin-tx.bash
installShellCompletion --fish contrib/completions/fish/bitcoin-cli.fish
installShellCompletion --fish contrib/completions/fish/bitcoind.fish
installShellCompletion --fish contrib/completions/fish/bitcoin-tx.fish
installShellCompletion --fish contrib/completions/fish/bitcoin-util.fish
installShellCompletion --fish contrib/completions/fish/bitcoin-wallet.fish
''
+ lib.optionalString withGui ''
installShellCompletion --fish contrib/completions/fish/bitcoin-qt.fish
'';
cmakeFlags = [
(lib.cmakeBool "BUILD_BENCH" false)
(lib.cmakeBool "WITH_ZMQ" true)
# building with db48 (for legacy wallet support) is broken on Darwin
(lib.cmakeBool "WITH_BDB" (withWallet && !stdenv.hostPlatform.isDarwin))
(lib.cmakeBool "WITH_USDT" enableTracing)
]
++ lib.optionals (!finalAttrs.doCheck) [
(lib.cmakeBool "BUILD_TESTS" false)
(lib.cmakeBool "BUILD_FUZZ_BINARY" false)
(lib.cmakeBool "BUILD_GUI_TESTS" false)
]
++ lib.optionals (!withWallet) [
(lib.cmakeBool "ENABLE_WALLET" false)
]
++ lib.optionals withGui [
(lib.cmakeBool "BUILD_GUI" true)
];
NIX_LDFLAGS = lib.optionals (
stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isStatic
) "-levent_core";
nativeCheckInputs = [ python3 ];
doCheck = true;
checkFlags = [
"LC_ALL=en_US.UTF-8"
]
# QT_PLUGIN_PATH needs to be set when executing QT, which is needed when testing Bitcoin's GUI.
# See also https://github.com/NixOS/nixpkgs/issues/24256
++ lib.optional withGui "QT_PLUGIN_PATH=${qtbase}/${qtbase.qtPluginPrefix}";
enableParallelBuilding = true;
__darwinAllowLocalNetworking = true;
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgram = "${placeholder "out"}/bin/bitcoin-cli";
versionCheckProgramArg = "--version";
doInstallCheck = true;
meta = {
description = "Derivative of Bitcoin Core";
homepage = "https://bitcoinknots.org/";
changelog = "https://github.com/bitcoinknots/bitcoin/blob/v${finalAttrs.version}/doc/release-notes.md";
maintainers = with lib.maintainers; [
prusnak
mmahut
];
license = lib.licenses.mit;
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,218 @@
{
lib,
stdenv,
fetchurl,
fetchFromGitHub,
cmake,
pkg-config,
installShellFiles,
autoSignDarwinBinariesHook,
wrapQtAppsHook ? null,
boost,
libevent,
zeromq,
zlib,
db48,
sqlite,
qrencode,
libsystemtap,
qtbase ? null,
qttools ? null,
python3,
versionCheckHook,
nixosTests,
withGui,
withWallet ? true,
enableTracing ? stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isStatic,
gnupg,
# Signatures from the following GPG public keys checked during verification of the source code.
# The list can be found at https://github.com/bitcoin-core/guix.sigs/tree/main/builder-keys
builderKeys ? [
"152812300785C96444D3334D17565732E08E5E41" # achow101.gpg
"9EDAFF80E080659604F4A76B2EBB056FD847F8A7" # Emzy.gpg
"71A3B16735405025D447E8F274810B012346C9A6" # laanwj.gpg
"6B002C6EA3F91B1B0DF0C9BC8F617F1200A6D25C" # glozow.gpg
"D1DBF2C4B96F2DEBF4C16654410108112E7EA81F" # hebasto.gpg
],
}:
let
desktop = fetchurl {
# c2e5f3e is the last commit when the debian/bitcoin-qt.desktop file was changed
url = "https://raw.githubusercontent.com/bitcoin-core/packaging/c2e5f3e20a8093ea02b73cbaf113bc0947b4140e/debian/bitcoin-qt.desktop";
sha256 = "0cpna0nxcd1dw3nnzli36nf9zj28d2g9jf5y0zl9j18lvanvniha";
};
in
stdenv.mkDerivation (finalAttrs: {
pname = if withGui then "bitcoin" else "bitcoind";
version = "29.1";
src = fetchurl {
urls = [
"https://bitcoincore.org/bin/bitcoin-core-${finalAttrs.version}/bitcoin-${finalAttrs.version}.tar.gz"
];
# hash retrieved from signed SHA256SUMS
sha256 = "067f624ae273b0d85a1554ffd7c098923351a647204e67034df6cc1dfacfa06b";
};
nativeBuildInputs = [
cmake
pkg-config
installShellFiles
gnupg
]
++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [
autoSignDarwinBinariesHook
]
++ lib.optionals withGui [ wrapQtAppsHook ];
buildInputs = [
boost
libevent
zeromq
zlib
]
++ lib.optionals enableTracing [ libsystemtap ]
++ lib.optionals withWallet [ sqlite ]
# building with db48 (for legacy descriptor wallet support) is broken on Darwin
++ lib.optionals (withWallet && !stdenv.hostPlatform.isDarwin) [ db48 ]
++ lib.optionals withGui [
qrencode
qtbase
qttools
];
preUnpack =
let
publicKeys = fetchFromGitHub {
owner = "bitcoin-core";
repo = "guix.sigs";
rev = "a788388207bd244d5ab07b31ecd6c126f213a6c6";
sha256 = "sha256-gbenuEWP6pqY9ywPd/yZy6QfWI7jvSObwto27DRXjGI=";
};
checksums = fetchurl {
url = "https://bitcoincore.org/bin/bitcoin-core-${finalAttrs.version}/SHA256SUMS";
hash = "sha256-teQ02vm875Isks9sBC2HV3Zo78W+UkXGH9zgyNhOnQs=";
};
signatures = fetchurl {
url = "https://bitcoincore.org/bin/bitcoin-core-${finalAttrs.version}/SHA256SUMS.asc";
hash = "sha256-hyk57QyGJnrjuuGRmvfOhVAx9Nru93e8bfah5fSVcmg=";
};
verifyBuilderKeys =
let
script = publicKey: ''
echo "Checking if public key ${publicKey} signed the checksum file..."
grep "^\[GNUPG:\] VALIDSIG .* ${publicKey}$" verify.log > /dev/null
echo "OK"
'';
in
builtins.concatStringsSep "\n" (map script builderKeys);
in
''
pushd $(mktemp -d)
export GNUPGHOME=$PWD/gnupg
mkdir -m 700 -p $GNUPGHOME
gpg --no-autostart --batch --import ${publicKeys}/builder-keys/*
ln -s ${checksums} ./SHA256SUMS
ln -s ${signatures} ./SHA256SUMS.asc
ln -s $src ./bitcoin-${finalAttrs.version}.tar.gz
gpg --no-autostart --batch --verify --status-fd 1 SHA256SUMS.asc SHA256SUMS > verify.log
${verifyBuilderKeys}
echo "Checking ${checksums} for bitcoin-${finalAttrs.version}.tar.gz..."
grep bitcoin-${finalAttrs.version}.tar.gz SHA256SUMS > SHA256SUMS.filtered
echo "Verifying the checksum of bitcoin-${finalAttrs.version}.tar.gz..."
sha256sum -c SHA256SUMS.filtered
popd
'';
postInstall = ''
cd ..
installShellCompletion --bash contrib/completions/bash/bitcoin-cli.bash
installShellCompletion --bash contrib/completions/bash/bitcoind.bash
installShellCompletion --bash contrib/completions/bash/bitcoin-tx.bash
installShellCompletion --fish contrib/completions/fish/bitcoin-cli.fish
installShellCompletion --fish contrib/completions/fish/bitcoind.fish
installShellCompletion --fish contrib/completions/fish/bitcoin-tx.fish
installShellCompletion --fish contrib/completions/fish/bitcoin-util.fish
installShellCompletion --fish contrib/completions/fish/bitcoin-wallet.fish
''
+ lib.optionalString withGui ''
installShellCompletion --fish contrib/completions/fish/bitcoin-qt.fish
install -Dm644 ${desktop} $out/share/applications/bitcoin-qt.desktop
substituteInPlace $out/share/applications/bitcoin-qt.desktop --replace "Icon=bitcoin128" "Icon=bitcoin"
install -Dm644 share/pixmaps/bitcoin256.png $out/share/pixmaps/bitcoin.png
'';
cmakeFlags = [
(lib.cmakeBool "BUILD_BENCH" false)
(lib.cmakeBool "WITH_ZMQ" true)
# building with db48 (for legacy wallet support) is broken on Darwin
(lib.cmakeBool "WITH_BDB" (withWallet && !stdenv.hostPlatform.isDarwin))
(lib.cmakeBool "WITH_USDT" enableTracing)
]
++ lib.optionals (!finalAttrs.doCheck) [
(lib.cmakeBool "BUILD_TESTS" false)
(lib.cmakeBool "BUILD_FUZZ_BINARY" false)
(lib.cmakeBool "BUILD_GUI_TESTS" false)
]
++ lib.optionals (!withWallet) [
(lib.cmakeBool "ENABLE_WALLET" false)
]
++ lib.optionals withGui [
(lib.cmakeBool "BUILD_GUI" true)
];
NIX_LDFLAGS = lib.optionals (
stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isStatic
) "-levent_core";
nativeCheckInputs = [ python3 ];
doCheck = true;
checkFlags = [
"LC_ALL=en_US.UTF-8"
]
# QT_PLUGIN_PATH needs to be set when executing QT, which is needed when testing Bitcoin's GUI.
# See also https://github.com/NixOS/nixpkgs/issues/24256
++ lib.optional withGui "QT_PLUGIN_PATH=${qtbase}/${qtbase.qtPluginPrefix}";
enableParallelBuilding = true;
__darwinAllowLocalNetworking = true;
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgram = "${placeholder "out"}/bin/bitcoin-cli";
versionCheckProgramArg = "--version";
doInstallCheck = true;
passthru.tests = {
smoke-test = nixosTests.bitcoind;
};
meta = {
description = "Peer-to-peer electronic cash system";
longDescription = ''
Bitcoin is a free open source peer-to-peer electronic cash system that is
completely decentralized, without the need for a central server or trusted
parties. Users hold the crypto keys to their own money and transact directly
with each other, with the help of a P2P network to check for double-spending.
'';
homepage = "https://bitcoin.org/en/";
downloadPage = "https://bitcoincore.org/bin/bitcoin-core-${finalAttrs.version}/";
changelog = "https://bitcoincore.org/en/releases/${finalAttrs.version}/";
maintainers = with lib.maintainers; [
prusnak
roconnor
];
license = lib.licenses.mit;
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,72 @@
{
lib,
stdenv,
fetchFromGitHub,
openssl,
boost,
libevent,
autoreconfHook,
db4,
pkg-config,
protobuf,
hexdump,
zeromq,
withGui,
qtbase ? null,
qttools ? null,
wrapQtAppsHook ? null,
}:
stdenv.mkDerivation rec {
pname = "digibyte";
version = "7.17.3";
name = pname + toString (lib.optional (!withGui) "d") + "-" + version;
src = fetchFromGitHub {
owner = "digibyte-core";
repo = pname;
rev = "v${version}";
sha256 = "zPwnC2qd28fA1saG4nysPlKU1nnXhfuSG3DpCY6T+kM=";
};
nativeBuildInputs = [
autoreconfHook
pkg-config
hexdump
]
++ lib.optionals withGui [
wrapQtAppsHook
];
buildInputs = [
openssl
boost
libevent
db4
zeromq
]
++ lib.optionals withGui [
qtbase
qttools
protobuf
];
enableParallelBuilding = true;
configureFlags = [
"--with-boost-libdir=${boost.out}/lib"
]
++ lib.optionals withGui [
"--with-gui=qt5"
"--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin"
];
meta = with lib; {
description = "DigiByte (DGB) is a rapidly growing decentralized, global blockchain";
homepage = "https://digibyte.io/";
license = licenses.mit;
maintainers = [ maintainers.mmahut ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,123 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch2,
autoreconfHook,
pkg-config,
util-linux,
hexdump,
autoSignDarwinBinariesHook,
wrapQtAppsHook ? null,
boost,
libevent,
miniupnpc,
zeromq,
zlib,
db48,
sqlite,
qrencode,
qtbase ? null,
qttools ? null,
python3,
withGui,
withWallet ? true,
}:
stdenv.mkDerivation rec {
pname = if withGui then "elements" else "elementsd";
version = "23.2.4";
src = fetchFromGitHub {
owner = "ElementsProject";
repo = "elements";
rev = "elements-${version}";
sha256 = "sha256-UNjYkEZBjGuhkwBxSkNXjBBcLQqoan/afCLhoR2lOY4=";
};
patches = [
# upnp: fix build with miniupnpc 2.2.8
(fetchpatch2 {
url = "https://github.com/bitcoin/bitcoin/commit/8acdf66540834b9f9cf28f16d389e8b6a48516d5.patch?full_index=1";
hash = "sha256-oDvHUvwAEp0LJCf6QBESn38Bu359TcPpLhvuLX3sm6M=";
})
];
nativeBuildInputs = [
autoreconfHook
pkg-config
]
++ lib.optionals stdenv.hostPlatform.isLinux [ util-linux ]
++ lib.optionals stdenv.hostPlatform.isDarwin [ hexdump ]
++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [
autoSignDarwinBinariesHook
]
++ lib.optionals withGui [ wrapQtAppsHook ];
buildInputs = [
boost
libevent
miniupnpc
zeromq
zlib
]
++ lib.optionals withWallet [
db48
sqlite
]
++ lib.optionals withGui [
qrencode
qtbase
qttools
];
configureFlags = [
"--with-boost-libdir=${boost.out}/lib"
"--disable-bench"
]
++ lib.optionals (!doCheck) [
"--disable-tests"
"--disable-gui-tests"
]
++ lib.optionals (!withWallet) [
"--disable-wallet"
]
++ lib.optionals withGui [
"--with-gui=qt5"
"--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin"
];
# fix "Killed: 9 test/test_bitcoin"
# https://github.com/NixOS/nixpkgs/issues/179474
hardeningDisable = lib.optionals (stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isDarwin) [
"fortify"
"stackprotector"
];
nativeCheckInputs = [ python3 ];
doCheck = true;
checkFlags = [
"LC_ALL=en_US.UTF-8"
]
# QT_PLUGIN_PATH needs to be set when executing QT, which is needed when testing Bitcoin's GUI.
# See also https://github.com/NixOS/nixpkgs/issues/24256
++ lib.optional withGui "QT_PLUGIN_PATH=${qtbase}/${qtbase.qtPluginPrefix}";
enableParallelBuilding = true;
meta = with lib; {
description = "Open Source implementation of advanced blockchain features extending the Bitcoin protocol";
longDescription = ''
The Elements blockchain platform is a collection of feature experiments and extensions to the
Bitcoin protocol. This platform enables anyone to build their own businesses or networks
pegged to Bitcoin as a sidechain or run as a standalone blockchain with arbitrary asset
tokens.
'';
homepage = "https://www.github.com/ElementsProject/elements";
maintainers = with maintainers; [ prusnak ];
license = licenses.mit;
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,48 @@
{
lib,
stdenv,
fetchFromGitHub,
pkg-config,
qmake,
python3,
qtbase,
rocksdb_7_10,
zeromq,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "fulcrum";
version = "1.12.0.1";
src = fetchFromGitHub {
owner = "cculianu";
repo = "Fulcrum";
tag = "v${finalAttrs.version}";
hash = "sha256-/RlvbZ6/f0Jxj6oCeHjGWqlktvtNUNczOXi2/wYw2LQ=";
};
nativeBuildInputs = [
pkg-config
qmake
];
buildInputs = [
python3
qtbase
rocksdb_7_10
zeromq
];
dontWrapQtApps = true; # no GUI
passthru.updateScript = nix-update-script { };
meta = {
description = "Fast & nimble SPV server for Bitcoin Cash & Bitcoin BTC";
homepage = "https://github.com/cculianu/Fulcrum";
maintainers = with lib.maintainers; [ prusnak ];
license = lib.licenses.gpl3Plus;
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,73 @@
{
fetchFromGitHub,
stdenv,
lib,
openssl,
boost,
curl,
libevent,
libzip,
qrencode,
qtbase,
qttools,
wrapQtAppsHook,
autoreconfHook,
pkg-config,
libtool,
miniupnpc,
hexdump,
}:
stdenv.mkDerivation rec {
pname = "gridcoin-research";
version = "5.4.9.0";
src = fetchFromGitHub {
owner = "gridcoin-community";
repo = "Gridcoin-Research";
rev = "${version}";
hash = "sha256-nupZB4nNbitpf5EBCNy0e+ovjayAszup/r7qxbxA5jI=";
};
nativeBuildInputs = [
pkg-config
wrapQtAppsHook
autoreconfHook
libtool
hexdump
];
buildInputs = [
qttools
qtbase
qrencode
libevent
libzip
openssl
boost
miniupnpc
curl
];
configureFlags = [
"--with-gui=qt5"
"--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin"
"--with-qrencode"
"--with-boost-libdir=${boost.out}/lib"
];
enableParallelBuilding = true;
meta = with lib; {
description = "POS-based cryptocurrency that rewards users for participating on the BOINC network";
longDescription = ''
A POS-based cryptocurrency that rewards users for participating on the BOINC network,
using peer-to-peer technology to operate with no central authority - managing transactions,
issuing money and contributing to scientific research are carried out collectively by the network
'';
homepage = "https://gridcoin.us/";
license = licenses.mit;
maintainers = with maintainers; [ gigglesquid ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,129 @@
{
lib,
stdenv,
fetchurl,
fetchFromGitHub,
autoreconfHook,
pkg-config,
installShellFiles,
util-linux,
hexdump,
autoSignDarwinBinariesHook,
wrapQtAppsHook ? null,
boost,
libevent,
miniupnpc,
zeromq,
zlib,
db53,
sqlite,
qrencode,
qtbase ? null,
qttools ? null,
python3,
withGui ? false,
withWallet ? true,
}:
let
desktop = fetchurl {
# de45048 is the last commit when the debian/groestlcoin-qt.desktop file was changed
url = "https://raw.githubusercontent.com/Groestlcoin/packaging/de4504844e47cf2c7604789650a5db4f3f7a48aa/debian/groestlcoin-qt.desktop";
sha256 = "0mxwq4jvcip44a796iwz7n1ljkhl3a4p47z7qlsxcfxw3zmm0k0k";
};
in
stdenv.mkDerivation rec {
pname = if withGui then "groestlcoin" else "groestlcoind";
version = "28.0";
src = fetchFromGitHub {
owner = "Groestlcoin";
repo = "groestlcoin";
rev = "v${version}";
sha256 = "0kl7nq62362clgzxwwd5c256xnaar4ilxcvbralazxg47zv95r11";
};
nativeBuildInputs = [
autoreconfHook
pkg-config
installShellFiles
]
++ lib.optionals stdenv.hostPlatform.isLinux [ util-linux ]
++ lib.optionals stdenv.hostPlatform.isDarwin [ hexdump ]
++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [
autoSignDarwinBinariesHook
]
++ lib.optionals withGui [ wrapQtAppsHook ];
buildInputs = [
boost
libevent
miniupnpc
zeromq
zlib
]
++ lib.optionals withWallet [
db53
sqlite
]
++ lib.optionals withGui [
qrencode
qtbase
qttools
];
postInstall = ''
installShellCompletion --bash contrib/completions/bash/groestlcoin-cli.bash
installShellCompletion --bash contrib/completions/bash/groestlcoind.bash
installShellCompletion --bash contrib/completions/bash/groestlcoin-tx.bash
for file in contrib/completions/fish/groestlcoin-*.fish; do
installShellCompletion --fish $file
done
''
+ lib.optionalString withGui ''
installShellCompletion --fish contrib/completions/fish/groestlcoin-qt.fish
install -Dm644 ${desktop} $out/share/applications/groestlcoin-qt.desktop
substituteInPlace $out/share/applications/groestlcoin-qt.desktop --replace "Icon=groestlcoin128" "Icon=groestlcoin"
install -Dm644 share/pixmaps/groestlcoin256.png $out/share/pixmaps/groestlcoin.png
'';
configureFlags = [
"--with-boost-libdir=${boost.out}/lib"
"--disable-bench"
]
++ lib.optionals (!withWallet) [
"--disable-wallet"
]
++ lib.optionals withGui [
"--with-gui=qt5"
"--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin"
];
nativeCheckInputs = [ python3 ];
checkFlags = [
"LC_ALL=en_US.UTF-8"
]
# QT_PLUGIN_PATH needs to be set when executing QT, which is needed when testing Groestlcoin's GUI.
# See also https://github.com/NixOS/nixpkgs/issues/24256
++ lib.optional withGui "QT_PLUGIN_PATH=${qtbase}/${qtbase.qtPluginPrefix}";
enableParallelBuilding = true;
meta = with lib; {
description = "Peer-to-peer electronic cash system";
longDescription = ''
Groestlcoin is a free open source peer-to-peer electronic cash system that is
completely decentralized, without the need for a central server or trusted
parties. Users hold the crypto keys to their own money and transact directly
with each other, with the help of a P2P network to check for double-spending.
'';
homepage = "https://groestlcoin.org/";
downloadPage = "https://github.com/Groestlcoin/groestlcoin/releases/tag/v{version}/";
maintainers = with maintainers; [ gruve-p ];
license = licenses.mit;
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,87 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
cmake,
pkg-config,
wrapQtAppsHook,
boost,
libGL,
qtbase,
python3,
}:
stdenv.mkDerivation rec {
pname = "nano-wallet";
version = "25.1";
src = fetchFromGitHub {
owner = "nanocurrency";
repo = "nano-node";
rev = "V${version}";
fetchSubmodules = true;
hash = "sha256-YvYEXHC8kxviZLQwINs+pS61wITSfqfrrPmlR+zNRoE=";
};
patches = [
# Fix gcc-13 build failure due to missing <cstdint> includes.
(fetchpatch {
name = "gcc-13.patch";
url = "https://github.com/facebook/rocksdb/commit/88edfbfb5e1cac228f7cc31fbec24bb637fe54b1.patch";
stripLen = 1;
extraPrefix = "submodules/rocksdb/";
hash = "sha256-HhlIYyPzIZFuyzHTUPz3bXgXiaFSQ8pVrLLMzegjTgE=";
})
];
cmakeFlags =
let
options = {
PYTHON_EXECUTABLE = "${python3.interpreter}";
NANO_SHARED_BOOST = "ON";
BOOST_ROOT = boost;
RAIBLOCKS_GUI = "ON";
RAIBLOCKS_TEST = "ON";
Qt5_DIR = "${qtbase.dev}/lib/cmake/Qt5";
Qt5Core_DIR = "${qtbase.dev}/lib/cmake/Qt5Core";
Qt5Gui_INCLUDE_DIRS = "${qtbase.dev}/include/QtGui";
Qt5Widgets_INCLUDE_DIRS = "${qtbase.dev}/include/QtWidgets";
};
optionToFlag = name: value: "-D${name}=${value}";
in
lib.mapAttrsToList optionToFlag options;
nativeBuildInputs = [
cmake
pkg-config
wrapQtAppsHook
];
buildInputs = [
boost
libGL
qtbase
];
strictDeps = true;
makeFlags = [ "nano_wallet" ];
checkPhase = ''
runHook preCheck
./core_test
runHook postCheck
'';
meta = {
description = "Wallet for Nano cryptocurrency";
homepage = "https://nano.org/en/wallet/";
license = lib.licenses.bsd2;
# Fails on Darwin. See:
# https://github.com/NixOS/nixpkgs/pull/39295#issuecomment-386800962
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ jluttine ];
};
}

View File

@@ -0,0 +1,44 @@
{
lib,
buildGoModule,
fetchFromGitHub,
libpcap,
}:
buildGoModule rec {
pname = "optimism";
version = "1.9.4";
src = fetchFromGitHub {
owner = "ethereum-optimism";
repo = "optimism";
rev = "op-node/v${version}";
hash = "sha256-pAmstWA6up0CvHEQW5RnDYumdwKP0i6fpz59EYTBsmU=";
fetchSubmodules = true;
};
subPackages = [
"op-node/cmd"
"op-proposer/cmd"
"op-batcher/cmd"
];
vendorHash = "sha256-Sr9OECXbRa4SPe3owMto2EbnAIygeIEmZv73hvA6iww=";
buildInputs = [
libpcap
];
ldflags = [
"-s"
"-w"
];
meta = with lib; {
description = "Optimism is Ethereum, scaled";
homepage = "https://github.com/ethereum-optimism/optimism";
license = licenses.mit;
maintainers = with maintainers; [ happysalada ];
mainProgram = "cmd";
};
}

View File

@@ -0,0 +1,47 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "op-geth";
version = "1.101305.3";
src = fetchFromGitHub {
owner = "ethereum-optimism";
repo = "op-geth";
rev = "v${version}";
hash = "sha256-AKVwwvt77FZlm7089EeayYVRYLo7c3v6LFVpsQN68Zk=";
fetchSubmodules = true;
};
subPackages = [
"cmd/abidump"
"cmd/abigen"
"cmd/bootnode"
"cmd/clef"
"cmd/devp2p"
"cmd/ethkey"
"cmd/evm"
"cmd/faucet"
"cmd/geth"
"cmd/p2psim"
"cmd/rlpdump"
"cmd/utils"
];
vendorHash = "sha256-pcIydpKWZt3vwShwzGlPKGq+disdxYFOB8gxHou3mVU=";
ldflags = [
"-s"
"-w"
];
meta = with lib; {
description = "";
homepage = "https://github.com/ethereum-optimism/op-geth";
license = licenses.gpl3Only;
maintainers = with maintainers; [ happysalada ];
};
}

View File

@@ -0,0 +1,78 @@
{
lib,
rustPlatform,
fetchFromGitHub,
protobuf,
rustfmt,
pkg-config,
openssl,
}:
let
version = "0.2.0";
src = fetchFromGitHub {
owner = "talaia-labs";
repo = "rust-teos";
rev = "v${version}";
hash = "sha256-UrzH9xmhVq12TcSUQ1AihCG1sNGcy/N8LDsZINVKFkY=";
};
meta = with lib; {
homepage = "https://github.com/talaia-labs/rust-teos";
license = licenses.mit;
maintainers = with maintainers; [ seberm ];
};
updateScript = ./update.sh;
in
{
teos = rustPlatform.buildRustPackage {
pname = "teos";
inherit version src;
cargoHash = "sha256-lod5I94T4wGwXEDtvh2AyaDYM0byCfaSBP8emKV7+3M=";
buildAndTestSubdir = "teos";
nativeBuildInputs = [
protobuf
rustfmt
];
passthru.updateScript = updateScript;
__darwinAllowLocalNetworking = true;
meta = meta // {
description = "Lightning watchtower compliant with BOLT13, written in Rust";
};
};
teos-watchtower-plugin = rustPlatform.buildRustPackage {
pname = "teos-watchtower-plugin";
inherit version src;
cargoHash = "sha256-lod5I94T4wGwXEDtvh2AyaDYM0byCfaSBP8emKV7+3M=";
buildAndTestSubdir = "watchtower-plugin";
nativeBuildInputs = [
pkg-config
protobuf
rustfmt
];
buildInputs = [
openssl
];
passthru.updateScript = updateScript;
__darwinAllowLocalNetworking = true;
meta = meta // {
description = "Lightning watchtower plugin for clightning";
mainProgram = "watchtower-client";
};
};
}

View File

@@ -0,0 +1,30 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p coreutils curl jq git gnupg common-updater-scripts
set -euo pipefail
# Fetch latest release, update derivation
scriptDir=$(cd "${BASH_SOURCE[0]%/*}" && pwd)
nixpkgs=$(realpath "$scriptDir"/../../../..)
oldVersion=$(nix-instantiate --eval -E "(import \"$nixpkgs\" { config = {}; overlays = []; }).teos.version" | tr -d '"')
version=$(curl -s --show-error "https://api.github.com/repos/talaia-labs/rust-teos/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/teos.XXX)
repo="${tmpdir}/repo"
trap 'rm -rf $tmpdir' EXIT
git clone --depth 1 --branch "v${version}" -c advice.detachedHead=false 'https://github.com/talaia-labs/rust-teos' "$repo"
git -C "$repo" checkout "tags/v${version}"
rm -rf "${repo}/.git"
hashcheck=$(nix --extra-experimental-features nix-command hash path "$repo")
(cd "$nixpkgs" && update-source-version teos "$version" "$hashcheck" && update-source-version teos --ignore-same-version --source-key=cargoDeps)
echo
echo "rust-teos: $oldVersion -> $version"

View File

@@ -0,0 +1,89 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
openssl,
boost,
libevent,
autoreconfHook,
db4,
pkg-config,
protobuf,
hexdump,
zeromq,
gmp,
withGui,
qtbase ? null,
qttools ? null,
wrapQtAppsHook ? null,
}:
stdenv.mkDerivation rec {
pname = "vertcoin";
version = "0.18.0";
name = pname + toString (lib.optional (!withGui) "d") + "-" + version;
src = fetchFromGitHub {
owner = pname + "-project";
repo = pname + "-core";
rev = "2bd6dba7a822400581d5a6014afd671fb7e61f36";
sha256 = "ua9xXA+UQHGVpCZL0srX58DDUgpfNa+AAIKsxZbhvMk=";
};
patches = [
# Fix build on gcc-13 due to missing <stdexcept> headers
(fetchpatch {
name = "gcc-13-p1.patch";
url = "https://github.com/vertcoin-project/vertcoin-core/commit/398768769f85cc1b6ff212ed931646b59fa1acd6.patch";
hash = "sha256-4nnE4W0Z5HzVaJ6tB8QmyohXmt6UHUGgDH+s9bQaxhg=";
})
(fetchpatch {
name = "gcc-13-p2.patch";
url = "https://github.com/vertcoin-project/vertcoin-core/commit/af862661654966d5de614755ab9bd1b5913e0959.patch";
hash = "sha256-4hcJIje3VAdEEpn2tetgvgZ8nVft+A64bfWLspQtbVw=";
})
];
nativeBuildInputs = [
autoreconfHook
pkg-config
hexdump
]
++ lib.optionals withGui [
wrapQtAppsHook
];
buildInputs = [
openssl
boost
libevent
db4
zeromq
gmp
]
++ lib.optionals withGui [
qtbase
qttools
protobuf
];
enableParallelBuilding = true;
configureFlags = [
"--with-boost-libdir=${boost.out}/lib"
]
++ lib.optionals withGui [
"--with-gui=qt5"
"--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin"
];
meta = with lib; {
description = "Digital currency with mining decentralisation and ASIC resistance as a key focus";
homepage = "https://vertcoin.org/";
license = licenses.mit;
maintainers = [ maintainers.mmahut ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,118 @@
{
autoreconfHook,
boost,
cargo,
coreutils,
curl,
cxx-rs,
db62,
fetchFromGitHub,
gitMinimal,
hexdump,
lib,
libevent,
libsodium,
makeWrapper,
rustc,
rustPlatform,
pkg-config,
stdenv,
testers,
tl-expected,
utf8cpp,
util-linux,
zcash,
zeromq,
}:
stdenv.mkDerivation rec {
pname = "zcash";
version = "5.4.2";
src = fetchFromGitHub {
owner = "zcash";
repo = "zcash";
rev = "v${version}";
hash = "sha256-XGq/cYUo43FcpmRDO2YiNLCuEQLsTFLBFC4M1wM29l8=";
};
patches = [
# upstream has a custom way of specifying a cargo vendor-directory
# we'll remove that logic, since cargoSetupHook from nixpkgs works better
./dont-use-custom-vendoring-logic.patch
];
cargoDeps = rustPlatform.fetchCargoVendor {
inherit pname version src;
hash = "sha256-VBqasLpxqI4kr73Mr7OVuwb2OIhUwnY9CTyZZOyEElU=";
};
nativeBuildInputs = [
autoreconfHook
cargo
cxx-rs
gitMinimal
hexdump
makeWrapper
pkg-config
rustc
rustPlatform.cargoSetupHook
];
buildInputs = [
boost
db62
libevent
libsodium
tl-expected
utf8cpp
zeromq
];
CXXFLAGS = [
"-I${lib.getDev utf8cpp}/include/utf8cpp"
"-I${lib.getDev cxx-rs}/include"
];
configureFlags = [
"--disable-tests"
"--with-boost-libdir=${lib.getLib boost}/lib"
"RUST_TARGET=${stdenv.hostPlatform.rust.rustcTargetSpec}"
];
enableParallelBuilding = true;
# Requires hundreds of megabytes of zkSNARK parameters.
doCheck = false;
passthru.tests.version = testers.testVersion {
package = zcash;
command = "zcashd --version";
version = "v${zcash.version}";
};
postInstall = ''
wrapProgram $out/bin/zcash-fetch-params \
--set PATH ${
lib.makeBinPath [
coreutils
curl
util-linux
]
}
'';
meta = with lib; {
description = "Peer-to-peer, anonymous electronic cash system";
homepage = "https://z.cash/";
maintainers = with maintainers; [
rht
tkerber
centromere
];
license = licenses.mit;
# https://github.com/zcash/zcash/issues/4405
broken = stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isDarwin;
};
}

View File

@@ -0,0 +1,16 @@
diff --git a/src/Makefile.am b/src/Makefile.am
index 8b14284..e614755 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -121,10 +121,7 @@ else
RUST_BUILD_OPTS += --locked --offline
CARGO_CONFIGURED = $(top_srcdir)/.cargo/.configured-for-offline
-$(CARGO_CONFIGURED): $(top_srcdir)/.cargo/config.offline
- $(AM_V_at)rm -f $(top_srcdir)/.cargo/.configured-for-online
- $(AM_V_at)cp $< $(top_srcdir)/.cargo/config
- $(AM_V_at)echo "directory = \"$(RUST_VENDORED_SOURCES)\"" >>$(top_srcdir)/.cargo/config
+$(CARGO_CONFIGURED):
$(AM_V_at)touch $@
endif
if ENABLE_SHANI