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

49 lines
1.5 KiB
Nix
Raw Normal View History

{ lib, stdenv
2020-05-06 01:03:53 +01:00
, fetchurl
}:
stdenv.mkDerivation rec {
pname = "openbazaar";
2020-06-06 15:35:34 +01:00
version = "0.14.3";
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 = {
2020-06-06 15:35:34 +01:00
i686-linux = "098dgxpz9m4rfswc9yg77s3bvaifd4453s20n8kmh55g5ipgs2x1";
x86_64-darwin = "0q989m4zj7x9d6vimmpfkla78hmx2zr7bxm9yg61ir00w60l14jx";
x86_64-linux = "093rwn4nfirknbxz58n16v0l0apj2h0yr63f64fqysmy78883al2";
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
'';
postFixup = stdenv.lib.optionalString (!stdenv.isDarwin) ''
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" ];
};
}