3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/networking/openbazaar/default.nix

49 lines
1.4 KiB
Nix
Raw Normal View History

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