nixpkgs/pkgs/applications/networking/openbazaar/default.nix

49 lines
1.4 KiB
Nix
Raw Normal View History

{ lib, stdenv
2020-05-06 03:03:53 +03:00
, fetchurl
}:
stdenv.mkDerivation rec {
pname = "openbazaar";
2021-04-27 13:01:33 +03:00
version = "0.14.6";
2020-05-06 03:03:53 +03:00
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 = {
2021-04-27 13:01:33 +03:00
i686-linux = "1cmv3gyfd6q7y6yn6kigksy2abkq5b8mfgk51d04ky1ckgbriaqq";
x86_64-darwin = "0n32a0pyj1k2had3imimdyhdhyb285y1dj04f7g3jajmy5zndaxx";
x86_64-linux = "105i5yl2yvhcvyh1wf35kqq1qyxgbl9j2kxs6yshsk14b2p02j5i";
2020-05-06 03:03:53 +03:00
}.${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
'';
2021-01-15 08:42:41 +03:00
postFixup = lib.optionalString (!stdenv.isDarwin) ''
2020-05-06 03:03:53 +03:00
patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
$out/bin/openbazaard
'';
meta = with lib; {
2020-05-06 03:03:53 +03:00
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" ];
};
}