dcrdex: fix build id
This commit is contained in:
+17
-6
@@ -1,18 +1,21 @@
|
||||
{
|
||||
lib,
|
||||
buildGoModule,
|
||||
fetchFromGitHub,
|
||||
fetchgit,
|
||||
git,
|
||||
}:
|
||||
|
||||
buildGoModule (finalAttrs: {
|
||||
pname = "bisonw";
|
||||
version = "1.0.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "decred";
|
||||
repo = "dcrdex";
|
||||
# Keep the checkout metadata: Bison Wallet reads vcs.revision from Go build
|
||||
# info for its Build ID and frontend cache-busting version.
|
||||
src = fetchgit {
|
||||
url = "https://github.com/decred/dcrdex.git";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-MPHi+mqmumxZ/pFxBYxz73M6imi0GONV0M3raPq0yoI=";
|
||||
hash = "sha256-IlJzvL0ZaeQ+BaKGArS6J5Wk2wctOVba7Xg8qjVI8KY=";
|
||||
leaveDotGit = true;
|
||||
};
|
||||
|
||||
subPackages = [
|
||||
@@ -26,6 +29,15 @@ buildGoModule (finalAttrs: {
|
||||
|
||||
vendorHash = "sha256-KCof0GFFaNWgMb2yR4l4lyeVZdiJSIyn4mgZ/InMZhk=";
|
||||
|
||||
nativeBuildInputs = [ git ];
|
||||
GOFLAGS = [ "-buildvcs=true" ];
|
||||
|
||||
# fetchgit does not retain the Git index. Restore it in the writable build
|
||||
# tree so Go does not mark the otherwise pristine checkout as modified.
|
||||
preBuild = ''
|
||||
git reset --mixed HEAD
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Bison Wallet - Multi-coin wallet with built-in DEX trading";
|
||||
homepage = "https://github.com/decred/dcrdex";
|
||||
@@ -33,4 +45,3 @@ buildGoModule (finalAttrs: {
|
||||
mainProgram = "bisonw";
|
||||
};
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user