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
Member

@kcalvinalvin 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.

Copy link
Member

@mmilata mmilata left a comment

Choose a reason for hiding this comment

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

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
Copy link
Member

Choose a reason for hiding this comment

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

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

Copy link
Member Author

Choose a reason for hiding this comment

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

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" -- $@
Copy link
Member

Choose a reason for hiding this comment

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

Suggestion: use writeScript (or makeWrapper?)

Copy link
Member

Choose a reason for hiding this comment

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

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?

Copy link
Member Author

Choose a reason for hiding this comment

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

Will address this

Copy link
Member Author

Choose a reason for hiding this comment

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

Pushed a fix

Copy link
Member

Choose a reason for hiding this comment

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

Still getting the same error:

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

Copy link
Member Author

Choose a reason for hiding this comment

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

:/ 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";
Copy link
Member

Choose a reason for hiding this comment

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

Description should not start with a package name.

Copy link
Member Author

Choose a reason for hiding this comment

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

Will push a fix

Copy link
Member Author

Choose a reason for hiding this comment

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

Pushed a fix

Copy link
Contributor

@jonasnick jonasnick left a comment

Choose a reason for hiding this comment

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

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
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we need both run.sh and btcpayserver?

Copy link
Member Author

Choose a reason for hiding this comment

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

It is not needed. Removed in the latest commit

@kcalvinalvin
Copy link
Member Author

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

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

Nice, the fix works for me.

Copy link
Member

@mmilata mmilata left a comment

Choose a reason for hiding this comment

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

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
Copy link
Member

Choose a reason for hiding this comment

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

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

Copy link
Member Author

Choose a reason for hiding this comment

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

I've added DOTNET_CLI_TELEMETRY_OPTOUT=1

@mmilata
Copy link
Member

mmilata commented Aug 22, 2020

Module: fort-nix/nix-bitcoin#221

Copy link
Contributor

@nixbitcoin nixbitcoin left a comment

Choose a reason for hiding this comment

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

Tested ACK
Compiles and works as a basis for my module

Copy link
Member

@erikarvstedt erikarvstedt left a comment

Choose a reason for hiding this comment

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

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

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
Member Author

@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

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

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
Member Author

@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?

@kcalvinalvin
Copy link
Member Author

Pushed new commits that are based off of @erikarvstedt's work

Copy link
Member

@erikarvstedt erikarvstedt left a comment

Choose a reason for hiding this comment

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

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 add-btcpayserver branch 2 times, most recently from 807e089 to 4fe6bf6 Compare September 10, 2020 07:18
@kcalvinalvin
Copy link
Member Author

Merged the new commits and checked that the webfront works

@ofborg ofborg bot requested a review from erikarvstedt September 10, 2020 07:31
@erikarvstedt
Copy link
Member

@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
Member Author

@erikarvstedt done :)

Copy link
Contributor

@nixbitcoin nixbitcoin left a comment

Choose a reason for hiding this comment

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

ACK a04a87b

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

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

@erikarvstedt erikarvstedt left a comment

Choose a reason for hiding this comment

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

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 September 10, 2020 15:27
Copy link
Contributor

@jonasnick jonasnick left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@erikarvstedt erikarvstedt left a comment

Choose a reason for hiding this comment

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

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

@kcalvinalvin
Copy link
Member Author

@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

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

@kcalvinalvin
Copy link
Member Author

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

TIL. Changes applied

@ofborg ofborg bot requested a review from erikarvstedt September 13, 2020 10:42
Copy link
Contributor

@jonasnick jonasnick left a comment

Choose a reason for hiding this comment

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

works for me 2f55d6f

Copy link
Contributor

@nixbitcoin nixbitcoin left a comment

Choose a reason for hiding this comment

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

ACK 2f55d6f

@mmahut
Copy link
Member

mmahut commented Sep 16, 2020

Thank you, great work!

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

6 participants