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

Add btcpayserver #95104

Merged
merged 2 commits into from Sep 16, 2020
Merged

Add btcpayserver #95104

merged 2 commits into from Sep 16, 2020

Conversation

@kcalvinalvin
Copy link
Contributor

kcalvinalvin commented Aug 10, 2020

Motivation for this change

Adds package btcpayserver and its dependency, nbxplorer

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
@kcalvinalvin kcalvinalvin requested a review from mmahut as a code owner Aug 10, 2020
@kcalvinalvin kcalvinalvin marked this pull request as draft Aug 11, 2020
@kcalvinalvin kcalvinalvin force-pushed the kcalvinalvin:add-btcpayserver branch from e3d161d to cc7658f Aug 11, 2020
@kcalvinalvin kcalvinalvin marked this pull request as ready for review Aug 11, 2020
Copy link
Member

mmilata left a comment

Thanks for packaging this useful app! Got a few comments inline.

# 0. May need to run `dotnet nuget locals all --clear` if the user has built
# the package with dotnet previously
# 1. create a log with `dotnet restore -v n MyPackage.sln > mypackage-restore.log
# 2. then call ./create-deps.sh mypackage-restore.log

This comment has been minimized.

@mmilata

mmilata Aug 13, 2020 Member

The script might be useful for other packages, I wonder if it makes sense to move it to e.g. maintainers/scripts?

This comment has been minimized.

@kcalvinalvin

kcalvinalvin Aug 15, 2020 Author Contributor

There are a lot of dotnet packages using a variation of this script. I took it and adjusted it slightly from one of them. Not sure where it originated though.


installPhase = ''
mkdir -p $out/bin/
echo -e '#!/usr/bin/env bash \n#launch BTCpayserver \nscriptdir=`dirname $(readlink $(which btcpayserver))` \ndotnet run --no-launch-profile --no-build -c Release -p "$scriptdir/../BTCPayServer/BTCPayServer.csproj" -- $@

This comment has been minimized.

@mmilata

mmilata Aug 13, 2020 Member

Suggestion: use writeScript (or makeWrapper?)

This comment has been minimized.

@mmilata

mmilata Aug 13, 2020 Member

Also using readlink makes the scriptdir dependent on $PATH. I.e. if btcpayserver is not in $PATH it won't start:

$ nix-build -A btcpayserver
...
$ ./result/bin/btcpayserver                                                                                                                                                                                                                                                                          
which: no btcpayserver in (/run/wrappers/bin:/home/mmilata/.nix-profile/bin:/etc/profiles/per-user/mmilata/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin)
readlink: missing operand
Try 'readlink --help' for more information.
dirname: missing operand
Try 'dirname --help' for more information.
./result/bin/btcpayserver: line 4: dotnet: command not found

Can you use the value of $out instead?

This comment has been minimized.

@kcalvinalvin

kcalvinalvin Aug 15, 2020 Author Contributor

Will address this

This comment has been minimized.

@kcalvinalvin

kcalvinalvin Aug 15, 2020 Author Contributor

Pushed a fix

This comment has been minimized.

@mmilata

mmilata Aug 16, 2020 Member

Still getting the same error:

$ ./result/bin/btcpayserver
./result/bin/btcpayserver: line 3: dotnet: command not found

This comment has been minimized.

@kcalvinalvin

kcalvinalvin Aug 16, 2020 Author Contributor

:/ my bad, the script was calling the dotnet binary in my environment. Fix is pushed now (with writeScript as well)

dontStrip = true;

meta = with lib; {
description = "BTCPay Server is a self-hosted, open-source cryptocurrency payment processor. It's secure, private, censorship-resistant and free";

This comment has been minimized.

@mmilata

mmilata Aug 13, 2020 Member

Description should not start with a package name.

This comment has been minimized.

@kcalvinalvin

kcalvinalvin Aug 15, 2020 Author Contributor

Will push a fix

This comment has been minimized.

@kcalvinalvin

kcalvinalvin Aug 15, 2020 Author Contributor

Pushed a fix

@kcalvinalvin kcalvinalvin force-pushed the kcalvinalvin:add-btcpayserver branch from cc7658f to ca4cf12 Aug 15, 2020
Copy link
Contributor

jonasnick left a comment

Thanks for the package! I am not qualified to review dotnet packaging but is there an existing similar package already? Fwiw, I can build it on archlinux with sandbox and I can successfully play around with btcpayserver after installing dotnet-sdk_3. Is that dotnet-sdk_3 runtime dependency necessary? The wasabibackend package doesn't seem to require this.

Is it true that the nbxplorer package is independent and is not a dependency of btcpayserver?

script='#!/usr/bin/env bash\n#launch BTCpayserver\ndotnet run --no-launch-profile --no-build -c Release -p "REPLACE/BTCPayServer/BTCPayServer.csproj" -- $@'
echo -e $script | sed "s@REPLACE@$out@g" > $out/bin/run.sh
chmod +x $out/bin/run.sh
ln -s $out/bin/run.sh $out/bin/btcpayserver

This comment has been minimized.

@jonasnick

jonasnick Aug 16, 2020 Contributor

why do we need both run.sh and btcpayserver?

This comment has been minimized.

@kcalvinalvin

kcalvinalvin Aug 16, 2020 Author Contributor

It is not needed. Removed in the latest commit

@kcalvinalvin kcalvinalvin force-pushed the kcalvinalvin:add-btcpayserver branch from ca4cf12 to c101ae0 Aug 16, 2020
@kcalvinalvin
Copy link
Contributor Author

kcalvinalvin commented Aug 16, 2020

Fwiw, I can build it on archlinux with sandbox and I can successfully play around with btcpayserver after installing dotnet-sdk_3. Is that dotnet-sdk_3 runtime dependency necessary? The wasabibackend package doesn't seem to require this.

I think it is since this happened #95104 (comment)

Is it true that the nbxplorer package is independent and is not a dependency of btcpayserver?

It's possible to run nbxplorer without btcpayserver as stated in the nbxplorer readme though I don't think there are many that are doing so.

@jonasnick
Copy link
Contributor

jonasnick commented Aug 16, 2020

I think it is since this happened #95104 (comment)

Nice, the fix works for me.

Copy link
Member

mmilata left a comment

Not at all familiar with C# packaging but compiles on x86_64 and seems to start fine.

mkdir home
export HOME=$PWD/home
export DOTNET_CLI_TELEMETRY_OPTOUT=1

This comment has been minimized.

@mmilata

mmilata Aug 22, 2020 Member

Can you add this to the bin-script? Or something like DOTNET_CLI_TELEMETRY_OPTOUT=${DOTNET_CLI_TELEMETRY_OPTOUT:-1}?

This comment has been minimized.

@kcalvinalvin

kcalvinalvin Aug 27, 2020 Author Contributor

I've added DOTNET_CLI_TELEMETRY_OPTOUT=1

@mmilata
Copy link
Member

mmilata commented Aug 22, 2020

Copy link
Contributor

nixbitcoin left a comment

Tested ACK
Compiles and works as a basis for my module

@kcalvinalvin kcalvinalvin force-pushed the kcalvinalvin:add-btcpayserver branch from c101ae0 to 47a8e94 Aug 27, 2020
Copy link
Member

erikarvstedt left a comment

Please add the following changes: https://github.com/erikarvstedt/nixpkgs/commits/add-btcpayserver
See the individual commit messages for details. Highlights:

  • the script can now update the pkgs to the lastest release
  • ~10x faster pkg build time
  • decreased pkg output size : 830M -> 6.6M (nbxplorer), 1.5G -> 77M (btcpayserver)
  • much faster deps.nix generation

Here's the squashed branch including these changes: https://github.com/erikarvstedt/nixpkgs/commits/add-btcpayserver-squashed
Note the updated version in the nbxplorer commit message.

erikarvstedt added a commit to erikarvstedt/nix-bitcoin that referenced this pull request Sep 3, 2020
This includes the latest fixups from NixOS/nixpkgs#95104
@jonasnick
Copy link
Contributor

jonasnick commented Sep 6, 2020

Very nice improvements @erikarvstedt. Agree that they should be added to this PR. I also like that you kept the common-updater very general and simplified the build phase.

My generated deps.nix differs in the order of the listed dependencies because this sort on my machine puts . before /. Perhaps need to set LC_ALL? I tried a few values but couldn't reproduce your order.

@erikarvstedt
Copy link
Member

erikarvstedt commented Sep 7, 2020

The order was produced by LANG=en_US.UTF-8. Fixed, thanks for catching this!

@kcalvinalvin
Copy link
Contributor Author

kcalvinalvin commented Sep 7, 2020

@erikarvstedt I'll just cherry-pick your squashed commits here if that's ok

@erikarvstedt
Copy link
Member

erikarvstedt commented Sep 7, 2020

@kcalvinalvin, sure, that's what I had prepared the squashed branch for 🐱

Could you also add the latest changes? Just pull in the squashed branch again.

@jonasnick
Copy link
Contributor

jonasnick commented Sep 7, 2020

The order was produced by LANG=en_US.UTF-8. Fixed, thanks for catching this!

Fix works for me. I can reproduce exactly the same deps.nix now.

@nixbitcoin
Copy link
Contributor

nixbitcoin commented Sep 8, 2020

I rebased my module on @erikarvstedt's changes. The speed and size improvements are great.

Everything compiles fine, but when I try to connect to the BTCPayServer URL I get the following error:

Sep 08 09:07:39 nix-bitcoin btcpayserver[6206]: fail: Microsoft.AspNetCore.Server.Kestrel: Connection id "0HM2JQQG2QAKN", Request id "0HM2JQQG2QAKN:00000002": An unhandled exception was thrown by the application.
Sep 08 09:07:39 nix-bitcoin btcpayserver[6206]: System.NullReferenceException: Object reference not set to an instance of an object.
Sep 08 09:07:39 nix-bitcoin btcpayserver[6206]:    at BundlerMinifier.FileHelpers.NormalizePath(String path)
Sep 08 09:07:39 nix-bitcoin btcpayserver[6206]:    at BundlerMinifier.FileHelpers.TrimTrailingPathSeparatorChar(String path)
Sep 08 09:07:39 nix-bitcoin btcpayserver[6206]:    at BundlerMinifier.FileHelpers.DemandTrailingPathSeparatorChar(String path)
Sep 08 09:07:39 nix-bitcoin btcpayserver[6206]:    at BundlerMinifier.TagHelpers.BundleTagHelper.GetSrc(String path)
Sep 08 09:07:39 nix-bitcoin btcpayserver[6206]:    at BundlerMinifier.TagHelpers.BundleTagHelper.Process(TagHelperContext context, TagHelperOutput output)
Sep 08 09:07:39 nix-bitcoin btcpayserver[6206]:    at Microsoft.AspNetCore.Razor.TagHelpers.TagHelper.ProcessAsync(TagHelperContext context, TagHelperOutput output)
Sep 08 09:07:39 nix-bitcoin btcpayserver[6206]:    at Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner.RunAsync(TagHelperExecutionContext executionContext)
Sep 08 09:07:39 nix-bitcoin btcpayserver[6206]:    at AspNetCore.Views_Shared_Header.ExecuteAsync() in /tmp/nix-build-btcpayserver.drv-0/source/BTCPayServer/Views/Shared/Header.cshtml:line 19
Sep 08 09:07:39 nix-bitcoin btcpayserver[6206]:    at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context)
Sep 08 09:07:39 nix-bitcoin btcpayserver[6206]:    at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, Boolean invokeViewStarts)
Sep 08 09:07:39 nix-bitcoin btcpayserver[6206]:    at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context)
Sep 08 09:07:39 nix-bitcoin btcpayserver[6206]:    at Microsoft.AspNetCore.Mvc.TagHelpers.PartialTagHelper.RenderPartialViewAsync(TextWriter writer, Object model, IView view)
Sep 08 09:07:39 nix-bitcoin btcpayserver[6206]:    at Microsoft.AspNetCore.Mvc.TagHelpers.PartialTagHelper.ProcessAsync(TagHelperContext context, TagHelperOutput output)
Sep 08 09:07:39 nix-bitcoin btcpayserver[6206]:    at Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner.<RunAsync>g__Awaited|0_0(Task task, TagHelperExecutionContext executionContext, Int32 i, Int32 count)
Sep 08 09:07:39 nix-bitcoin btcpayserver[6206]:    at AspNetCore.Views_Shared__LayoutSimple.<ExecuteAsync>b__10_0()
Sep 08 09:07:39 nix-bitcoin btcpayserver[6206]:    at Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext.SetOutputContentAsync()
Sep 08 09:07:39 nix-bitcoin btcpayserver[6206]:    at AspNetCore.Views_Shared__LayoutSimple.ExecuteAsync() in /tmp/nix-build-btcpayserver.drv-0/source/BTCPayServer/Views/Shared/_LayoutSimple.cshtml:line 2
Sep 08 09:07:39 nix-bitcoin btcpayserver[6206]:    at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context)
Sep 08 09:07:39 nix-bitcoin btcpayserver[6206]:    at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, Boolean invokeViewStarts)
Sep 08 09:07:39 nix-bitcoin btcpayserver[6206]:    at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderLayoutAsync(ViewContext context, ViewBufferTextWriter bodyWriter)
Sep 08 09:07:39 nix-bitcoin btcpayserver[6206]:    at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context)
Sep 08 09:07:39 nix-bitcoin btcpayserver[6206]:    at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, String contentType, Nullable`1 statusCode)
Sep 08 09:07:39 nix-bitcoin btcpayserver[6206]:    at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ActionContext actionContext, IView view, ViewDataDictionary viewData, ITempDataDictionary tempData, String contentType, Nullable`1 statusCode)
Sep 08 09:07:39 nix-bitcoin btcpayserver[6206]:    at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewResultExecutor.ExecuteAsync(ActionContext context, ViewResult result)
Sep 08 09:07:39 nix-bitcoin btcpayserver[6206]:    at Microsoft.AspNetCore.Mvc.ViewResult.ExecuteResultAsync(ActionContext context)
Sep 08 09:07:39 nix-bitcoin btcpayserver[6206]:    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResultFilterAsync>g__Awaited|29_0[TFilter,TFilterAsync](ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
Sep 08 09:07:39 nix-bitcoin btcpayserver[6206]:    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedContextSealed context)
Sep 08 09:07:39 nix-bitcoin btcpayserver[6206]:    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext[TFilter,TFilterAsync](State& next, Scope& scope, Object& state, Boolean& isCompleted)
Sep 08 09:07:39 nix-bitcoin btcpayserver[6206]:    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeResultFilters()
Sep 08 09:07:39 nix-bitcoin btcpayserver[6206]: --- End of stack trace from previous location where exception was thrown ---
Sep 08 09:07:39 nix-bitcoin btcpayserver[6206]:    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|24_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
Sep 08 09:07:39 nix-bitcoin btcpayserver[6206]:    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
Sep 08 09:07:39 nix-bitcoin btcpayserver[6206]:    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
Sep 08 09:07:39 nix-bitcoin btcpayserver[6206]:    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
Sep 08 09:07:39 nix-bitcoin btcpayserver[6206]: --- End of stack trace from previous location where exception was thrown ---
Sep 08 09:07:39 nix-bitcoin btcpayserver[6206]:    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
Sep 08 09:07:39 nix-bitcoin btcpayserver[6206]:    at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
Sep 08 09:07:39 nix-bitcoin btcpayserver[6206]:    at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
Sep 08 09:07:39 nix-bitcoin btcpayserver[6206]:    at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
Sep 08 09:07:39 nix-bitcoin btcpayserver[6206]:    at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
Sep 08 09:07:39 nix-bitcoin btcpayserver[6206]:    at BTCPayServer.Hosting.BTCPayMiddleware.Invoke(HttpContext httpContext) in /tmp/nix-build-btcpayserver.drv-0/source/BTCPayServer/Hosting/BTCpayMiddleware.cs:line 83
Sep 08 09:07:39 nix-bitcoin btcpayserver[6206]:    at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
Sep 08 09:07:39 nix-bitcoin btcpayserver[6206]:    at BTCPayServer.Hosting.HeadersOverrideMiddleware.Invoke(HttpContext httpContext) in /tmp/nix-build-btcpayserver.drv-0/source/BTCPayServer/Hosting/HeadersOverrideMiddleware.cs:line 29
Sep 08 09:07:39 nix-bitcoin btcpayserver[6206]:    at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)

Could this have to do with nbxplorer: only install output of 'dotnet publish' and the fact that we are no longer copying over all the .cs files in BTCPayServer/Hosting?

@kcalvinalvin
Copy link
Contributor Author

kcalvinalvin commented Sep 8, 2020

@nixbitcoin I am also getting the same issue. Was able to fix the issue by reverting the installPhase back to the one I have right now.

In the btcpayserver repo, they just have a 3 line shell script which I just copied. I think this should just be followed?

Copy link
Member

erikarvstedt left a comment

Sorry for not testing the HTTP server. I've filed an upstream bug report.

@kcalvinalvin, please add these changes. They work around the build bug while keeping the reduced output size (89M for btcpayserver) of the dotnet publish approach.

@kcalvinalvin kcalvinalvin force-pushed the kcalvinalvin:add-btcpayserver branch 2 times, most recently from 807e089 to 4fe6bf6 Sep 10, 2020
@kcalvinalvin
Copy link
Contributor Author

kcalvinalvin commented Sep 10, 2020

Merged the new commits and checked that the webfront works

@ofborg ofborg bot requested a review from erikarvstedt Sep 10, 2020
@erikarvstedt
Copy link
Member

erikarvstedt commented Sep 10, 2020

@kcalvinalvin, thanks!
Please add this final change, which sets DOTNET_CLI_TELEMETRY_OPTOUT=1 in the btcpayserver run script. (This isn't needed for nbxplorer because it's built with dotnet publish.)

@kcalvinalvin
Copy link
Contributor Author

kcalvinalvin commented Sep 10, 2020

@erikarvstedt done :)

@kcalvinalvin kcalvinalvin force-pushed the kcalvinalvin:add-btcpayserver branch from 4fe6bf6 to a04a87b Sep 10, 2020
Copy link
Contributor

nixbitcoin left a comment

ACK a04a87b

Tested as basis of fort-nix/nix-bitcoin#221

@kcalvinalvin kcalvinalvin force-pushed the kcalvinalvin:add-btcpayserver branch 2 times, most recently from 1f125cd to 9959488 Sep 10, 2020
Copy link
Member

erikarvstedt left a comment

Sorry, there were two more small fixes I asked @kcalvinalvin to pull in.
This looks great now. 🚀

@ofborg ofborg bot requested a review from erikarvstedt Sep 10, 2020
Copy link
Contributor

jonasnick left a comment

LGTM

Copy link
Member

erikarvstedt left a comment

We missed adding the version to the package names.
@kcalvinalvin, as before, please update from here.

@kcalvinalvin
Copy link
Contributor Author

kcalvinalvin commented Sep 13, 2020

@erikarvstedt I can do that. But I'm not seeing any version changes with git diff. Do let me know if commit hashes 2f55d6f697396e18f6ae644754013e47d9c647d2 and 2724f7be543ebc57a01f7fc4fa42efb0a13e24cc are the ones you intend for me to pull in.

-  pname = "btcpayserver";
+  name = "btcpayserver";
   version = "1.0.5.5";

   src = fetchFromGitHub {
-    owner = pname;
-    repo = pname;
+    owner = name;
+    repo = name;
     rev = "v${version}";
     sha256 = "11h1nrmb7f44msbhhiz9ddqh5ss2kz6d8ysnvd070x3xj5krgnxz";
   };
@@ -48,10 +48,10 @@ stdenv.mkDerivation rec {

   installPhase = ''
     cd ..
-    share=$out/share/$pname
+    share=$out/share/${name}
     mkdir -p $share
     mv -T source $share
-    install -D -m500 <(echo "$runScript" | sed "s|@@SHARE@@|$share|") $out/bin/$pname
+    install -D -m500 <(echo "$runScript" | sed "s|@@SHARE@@|$share|") $out/bin/${name}
   '';

   dontStrip = true;
diff --git a/pkgs/applications/blockchains/nbxplorer/default.nix b/pkgs/applications/blockchains/nbxplorer/default.nix
index 76ca21ef9aa..3c87de8d7b3 100644
--- a/pkgs/applications/blockchains/nbxplorer/default.nix
+++ b/pkgs/applications/blockchains/nbxplorer/default.nix
@@ -14,7 +14,7 @@ let
 in

 stdenv.mkDerivation rec {
-  pname = "nbxplorer";
+  name = "nbxplorer";
   version = "2.1.42";

   src = fetchFromGitHub {
@@ -35,11 +35,11 @@ stdenv.mkDerivation rec {
     nuget init ${linkFarmFromDrvs "deps" deps} $TMP/nuget

     dotnet restore --source $TMP/nuget NBXplorer/NBXplorer.csproj
-    dotnet publish --no-restore --output $out/share/$pname -c Release NBXplorer/NBXplorer.csproj
+    dotnet publish --no-restore --output $out/share/$name -c Release NBXplorer/NBXplorer.csproj
   '';

   installPhase = ''
-    makeWrapper $out/share/$pname/NBXplorer $out/bin/$pname \
+    makeWrapper $out/share/$name/NBXplorer $out/bin/$name \
@erikarvstedt
Copy link
Member

erikarvstedt commented Sep 13, 2020

Yes, these changes are correct.
With pname the derivation name is automatically set to ${pname}-${version}.

@kcalvinalvin kcalvinalvin force-pushed the kcalvinalvin:add-btcpayserver branch from 9959488 to 2f55d6f Sep 13, 2020
@kcalvinalvin
Copy link
Contributor Author

kcalvinalvin commented Sep 13, 2020

With pname the derivation name is automatically set to ${pname}-${version}.

TIL. Changes applied

@ofborg ofborg bot requested a review from erikarvstedt Sep 13, 2020
Copy link
Contributor

jonasnick left a comment

works for me 2f55d6f

Copy link
Contributor

nixbitcoin left a comment

ACK 2f55d6f

@mmahut
Copy link
Member

mmahut commented Sep 16, 2020

Thank you, great work!

@mmahut mmahut merged commit 4ecaf7e into NixOS:master Sep 16, 2020
19 checks passed
19 checks passed
tests tests
Details
action
Details
Evaluation Performance Report Evaluator Performance Report
Details
Wait for ofborg
Details
btcpayserver, btcpayserver.passthru.tests, nbxplorer, nbxplorer.passthru.tests on aarch64-linux Success
Details
btcpayserver, btcpayserver.passthru.tests, nbxplorer, nbxplorer.passthru.tests on x86_64-linux Success
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="2f55d6f"; rev="2f55d6f697396e18f6ae644754013e47d9c647d2"; } ./pkgs/t
Details
grahamcofborg-eval-lib-tests nix-build --arg pkgs import ./. {} ./lib/tests/release.nix
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="2f55d6f"; rev="2f55d6f697396e18f6ae644754013e47d9c647d2"; } ./nixos/
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="2f55d6f"; rev="2f55d6f697396e18f6ae644754013e47d9c647d2"; } ./nixos/
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="2f55d6f"; rev="2f55d6f697396e18f6ae644754013e47d9c647d2"; } ./nixos/
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="2f55d6f"; rev="2f55d6f697396e18f6ae644754013e47d9c647d2"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="2f55d6f"; rev="2f55d6f697396e18f6ae644754013e47d9c647d2"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="2f55d6f"; rev="2f55d6f697396e18f6ae644754013e47d9c647d2"; } ./pkgs/t
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants
You can’t perform that action at this time.