about summary refs log tree commit diff
path: root/pkgs/applications/networking/openbazaar
diff options
context:
space:
mode:
authorPavol Rusnak <pavol@rusnak.io>2020-05-06 02:03:53 +0200
committerPavol Rusnak <pavol@rusnak.io>2020-05-10 23:32:58 +0200
commit731cbde2c044aa71757ea87d6c5f566dfd9f8797 (patch)
treed2503c4469ca5027d9ae721fef0d9e80cbddf5ff /pkgs/applications/networking/openbazaar
parent84982d16646e815b17af8f4bbd34d70b6ace815e (diff)
downloadnixlib-731cbde2c044aa71757ea87d6c5f566dfd9f8797.tar
nixlib-731cbde2c044aa71757ea87d6c5f566dfd9f8797.tar.gz
nixlib-731cbde2c044aa71757ea87d6c5f566dfd9f8797.tar.bz2
nixlib-731cbde2c044aa71757ea87d6c5f566dfd9f8797.tar.lz
nixlib-731cbde2c044aa71757ea87d6c5f566dfd9f8797.tar.xz
nixlib-731cbde2c044aa71757ea87d6c5f566dfd9f8797.tar.zst
nixlib-731cbde2c044aa71757ea87d6c5f566dfd9f8797.zip
openbazaar: init at 0.14.2
Diffstat (limited to 'pkgs/applications/networking/openbazaar')
-rw-r--r--pkgs/applications/networking/openbazaar/default.nix48
1 files changed, 48 insertions, 0 deletions
diff --git a/pkgs/applications/networking/openbazaar/default.nix b/pkgs/applications/networking/openbazaar/default.nix
new file mode 100644
index 000000000000..6a48b2962fa8
--- /dev/null
+++ b/pkgs/applications/networking/openbazaar/default.nix
@@ -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" ];
+  };
+}