Merge pull request #87075 from prusnak/openbazaar

openbazaar: init at 0.14.2
This commit is contained in:
Marek Mahut 2020-05-13 18:21:44 +02:00 committed by GitHub
commit dd2fffd04c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 108 additions and 0 deletions

View File

@ -0,0 +1,57 @@
{ stdenv
, fetchurl
, gcc-unwrapped
, dpkg
, bash
, nodePackages
, makeWrapper
, electron_6
}:
stdenv.mkDerivation rec {
pname = "openbazaar-client";
version = "2.4.4";
src = fetchurl {
url = "https://github.com/OpenBazaar/openbazaar-desktop/releases/download/v${version}/openbazaar2client_${version}_amd64.deb";
sha256 = "146vqwc1gv5zqcz60np8v9ps44m0d2yyjzqpmd4s0pcywvvwdvn6";
};
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 = ''
makeWrapper ${electron_6}/bin/electron $out/bin/${pname} \
--add-flags $out/share/${pname}/resources/app \
--prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath [ gcc-unwrapped.lib ]}"
'';
meta = with stdenv.lib; {
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" ];
};
}

View File

@ -0,0 +1,48 @@
{ stdenv
, fetchurl
}:
stdenv.mkDerivation rec {
pname = "openbazaar";
version = "0.14.2";
suffix = {
i686-linux = "linux-386";
x86_64-darwin = "darwin-10.6-amd64";
x86_64-linux = "linux-amd64";
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
src = fetchurl {
url = "https://github.com/OpenBazaar/openbazaar-go/releases/download/v${version}/${pname}-go-${suffix}";
sha256 = {
i686-linux = "02kl4ci2pz86qqsll7578q0acygncsyylaschjzzii34c86f1aym";
x86_64-darwin = "1v5m94x4x0nc6i8zlcwb36ps1zpgqgcsz81x1ghkz5c9xzszgzbp";
x86_64-linux = "0m0digw66rzhwl2im88qavli9cc5vxd9pwj6ix86dcf98r93xsrp";
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
};
dontUnpack = true;
dontConfigure = true;
dontBuild = true;
dontStrip = true;
dontPatchELF = true;
preferLocalBuild = true;
installPhase = ''
install -D $src $out/bin/openbazaard
'';
postFixup = stdenv.lib.optionalString (!stdenv.isDarwin) ''
patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
$out/bin/openbazaard
'';
meta = with stdenv.lib; {
description = "Decentralized Peer to Peer Marketplace for Bitcoin - daemon";
homepage = "https://www.openbazaar.org/";
license = licenses.mit;
maintainers = with maintainers; [ prusnak ];
platforms = [ "i686-linux" "x86_64-darwin" "x86_64-linux" ];
};
}

View File

@ -5614,6 +5614,9 @@ in
openapi-generator-cli = callPackage ../tools/networking/openapi-generator-cli { };
openapi-generator-cli-unstable = callPackage ../tools/networking/openapi-generator-cli/unstable.nix { };
openbazaar = callPackage ../applications/networking/openbazaar { };
openbazaar-client = callPackage ../applications/networking/openbazaar/client.nix { };
opencc = callPackage ../tools/text/opencc { };
opencl-info = callPackage ../tools/system/opencl-info { };