Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update btcpayserver, nbxplorer #104313

Merged
merged 2 commits into from Dec 2, 2020
Merged

Conversation

erikarvstedt
Copy link
Member

@erikarvstedt erikarvstedt commented Nov 19, 2020

The btcpayserver pkg is now built in the same way as the nbxplorer pkg:
Use dotnet publish instead of dotnet build and wrap the executable.

Both packages pass nix-bitcoin's NixOS VM test suite.

To run the test, use the following script.
It leaves no traces (outside of /nix/store) on the host system.

#!/usr/bin/env bash

mkdir -p /tmp/btcpayserver-test/{nixpkgs,nix-bitcoin}
trap "rm -rf /tmp/btcpayserver-test" EXIT
cd /tmp/btcpayserver-test

fetchRepo() { curl -SL https://github.com/$1.tar.gz | tar xz --strip-components=1 -C $2; }
# this PR
fetchRepo erikarvstedt/nixpkgs/archive/ae1716cb7e731f3bf5fb677d1709b9cdbca1d480 nixpkgs
# master as of 2020-11-19
fetchRepo fort-nix/nix-bitcoin/archive/7e81071d0bb2a4cc814660dd4926359c55bdff1a nix-bitcoin

cat > scenarios.nix <<EOF
{ testEnv, ... }:
let
  pkgs = import $(pwd)/nixpkgs {};
in rec {
  btcpayserverUpdate = {
    services.btcpayserver.enable = true;
    services.nbxplorer.package = pkgs.nbxplorer;
    services.btcpayserver.package = pkgs.btcpayserver;
  };
  btcpayserverUpdateRegtest.imports = [
    btcpayserverUpdate
    testEnv.scenarios.regtestBase
  ];
}
EOF
scenarioOverridesFile=$(realpath scenarios.nix) nix-bitcoin/test/run-tests.sh -s btcpayserverUpdate
scenarioOverridesFile=$(realpath scenarios.nix) nix-bitcoin/test/run-tests.sh -s btcpayserverUpdateRegtest

@kcalvinalvin
Copy link
Member

Tested the following: check hashes, build, run server, check webfront. All looks good

The new btcpayserver script looks good as well :)

@SuperSandro2000
Copy link
Member

Result of nixpkgs-review pr 104313 run on x86_64-linux 1

2 packages built:
  • btcpayserver
  • nbxplorer

#!${bash}/bin/bash
DOTNET_CLI_TELEMETRY_OPTOUT=1 exec ${dotnetSdk}/bin/dotnet run --no-launch-profile --no-build \
-c Release -p @@SHARE@@/BTCPayServer/BTCPayServer.csproj -- "$@"
dotnet publish --no-restore --output $out/share/$pname -c Release BTCPayServer/BTCPayServer.csproj
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
dotnet publish --no-restore --output $out/share/$pname -c Release BTCPayServer/BTCPayServer.csproj
DOTNET_CLI_TELEMETRY_OPTOUT=1 dotnet publish --no-restore --output $out/share/$pname -c Release BTCPayServer/BTCPayServer.csproj

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DOTNET_CLI_TELEMETRY_OPTOUT is already set here.

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Result of nixpkgs-review pr 104313 1

2 packages built:
  • btcpayserver
  • nbxplorer

@jonringer jonringer merged commit 4ad4f39 into NixOS:master Dec 2, 2020
@erikarvstedt erikarvstedt deleted the update-btcpayserver branch February 6, 2022 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants