-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
44cb86f
commit 2724f7b
Showing
6 changed files
with
1,231 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ lib, stdenv, fetchFromGitHub, fetchurl, linkFarmFromDrvs, makeWrapper, | ||
dotnetPackages, dotnetCorePackages | ||
}: | ||
|
||
let | ||
deps = import ./deps.nix { | ||
fetchNuGet = { name, version, sha256 }: fetchurl { | ||
name = "nuget-${name}-${version}.nupkg"; | ||
url = "https://www.nuget.org/api/v2/package/${name}/${version}"; | ||
inherit sha256; | ||
}; | ||
}; | ||
dotnetSdk = dotnetCorePackages.sdk_3_1; | ||
in | ||
|
||
stdenv.mkDerivation rec { | ||
pname = "nbxplorer"; | ||
version = "2.1.42"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "dgarage"; | ||
repo = "NBXplorer"; | ||
rev = "v${version}"; | ||
sha256 = "01q6n7095rrha00xs3l7igzfb9rd743z8crxa2dcz4q5srapfzpi"; | ||
}; | ||
|
||
nativeBuildInputs = [ dotnetSdk dotnetPackages.Nuget makeWrapper ]; | ||
|
||
buildPhase = '' | ||
export HOME=$TMP/home | ||
export DOTNET_CLI_TELEMETRY_OPTOUT=1 | ||
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 | ||
nuget sources Add -Name tmpsrc -Source $TMP/nuget | ||
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 | ||
''; | ||
|
||
installPhase = '' | ||
makeWrapper $out/share/$pname/NBXplorer $out/bin/$pname \ | ||
--set DOTNET_ROOT "${dotnetSdk}" | ||
''; | ||
|
||
dontStrip = true; | ||
|
||
meta = with lib; { | ||
description = "Minimalist UTXO tracker for HD Cryptocurrency Wallets"; | ||
maintainers = with maintainers; [ kcalvinalvin earvstedt ]; | ||
license = lib.licenses.mit; | ||
platforms = lib.platforms.linux; | ||
}; | ||
} |
Oops, something went wrong.