2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv
|
2020-05-15 21:57:56 +00:00
|
|
|
, fetchurl
|
|
|
|
, gcc-unwrapped
|
|
|
|
, dpkg
|
|
|
|
, bash
|
|
|
|
, nodePackages
|
|
|
|
, makeWrapper
|
|
|
|
, electron_6
|
|
|
|
}:
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
let
|
|
|
|
electron = electron_6;
|
|
|
|
in
|
2020-05-15 21:57:56 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "openbazaar-client";
|
2021-02-05 17:12:51 +00:00
|
|
|
version = "2.4.10";
|
2020-05-15 21:57:56 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/OpenBazaar/openbazaar-desktop/releases/download/v${version}/openbazaar2client_${version}_amd64.deb";
|
2021-02-05 17:12:51 +00:00
|
|
|
sha256 = "sha256-X0iTTLOJsZeyVZwNU3y39cFMHnxlnYXmqQERE26CLTY=";
|
2020-05-15 21:57:56 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
dontConfigure = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
${dpkg}/bin/dpkg-deb -x $src .
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p $out/bin $out/share/{${pname},applications,pixmaps}
|
|
|
|
|
|
|
|
cp -a usr/lib/openbazaar2client/{locales,resources} $out/share/${pname}
|
|
|
|
cp -a usr/share/applications/openbazaar2client.desktop $out/share/applications/${pname}.desktop
|
|
|
|
cp -a usr/share/pixmaps/openbazaar2client.png $out/share/pixmaps/${pname}.png
|
|
|
|
|
|
|
|
substituteInPlace $out/share/applications/${pname}.desktop \
|
|
|
|
--replace 'openbazaar2client' 'openbazaar-client'
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
2020-08-20 17:08:02 +00:00
|
|
|
makeWrapper ${electron}/bin/electron $out/bin/${pname} \
|
2020-05-15 21:57:56 +00:00
|
|
|
--add-flags $out/share/${pname}/resources/app \
|
2021-01-15 22:18:51 +00:00
|
|
|
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ gcc-unwrapped.lib ]}"
|
2020-05-15 21:57:56 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-05-15 21:57:56 +00:00
|
|
|
description = "Decentralized Peer to Peer Marketplace for Bitcoin - client";
|
|
|
|
homepage = "https://www.openbazaar.org/";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ prusnak ];
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|