summary refs log tree commit diff
path: root/pkgs/applications/blockchains/chia/default.nix
diff options
context:
space:
mode:
author(cdep)illabout <cdep.illabout@gmail.com>2021-05-20 10:08:26 +0900
committer(cdep)illabout <cdep.illabout@gmail.com>2021-05-20 10:08:26 +0900
commit408d7aabb477f3f9d3ed0441a00833e2c1b72ca8 (patch)
tree46c04d61df249c86927fdede4ec1a26f01f5bffb /pkgs/applications/blockchains/chia/default.nix
parent0eb2dc5d7b987499e75cdea61693bb91358c63e6 (diff)
parent7fe78d4f9efc88e5c6a4b9591bd8b41fee656df6 (diff)
downloadnixpkgs-408d7aabb477f3f9d3ed0441a00833e2c1b72ca8.tar
nixpkgs-408d7aabb477f3f9d3ed0441a00833e2c1b72ca8.tar.gz
nixpkgs-408d7aabb477f3f9d3ed0441a00833e2c1b72ca8.tar.bz2
nixpkgs-408d7aabb477f3f9d3ed0441a00833e2c1b72ca8.tar.lz
nixpkgs-408d7aabb477f3f9d3ed0441a00833e2c1b72ca8.tar.xz
nixpkgs-408d7aabb477f3f9d3ed0441a00833e2c1b72ca8.tar.zst
nixpkgs-408d7aabb477f3f9d3ed0441a00833e2c1b72ca8.zip
Merge remote-tracking branch 'origin/master' into haskell-updates
Diffstat (limited to 'pkgs/applications/blockchains/chia/default.nix')
-rw-r--r--pkgs/applications/blockchains/chia/default.nix69
1 files changed, 69 insertions, 0 deletions
diff --git a/pkgs/applications/blockchains/chia/default.nix b/pkgs/applications/blockchains/chia/default.nix
new file mode 100644
index 00000000000..0c4220b72ba
--- /dev/null
+++ b/pkgs/applications/blockchains/chia/default.nix
@@ -0,0 +1,69 @@
+{ lib, fetchFromGitHub, python3Packages }:
+
+python3Packages.buildPythonApplication rec {
+  pname = "chia";
+  version = "1.1.5";
+
+  src = fetchFromGitHub {
+    owner = "Chia-Network";
+    repo = "chia-blockchain";
+    rev = version;
+    sha256 = "ZUxWOlJGQpeQCtWt0PSdcbMackHdeuNFkxHvYDPcU8Y=";
+  };
+
+  patches = [
+    # tweak version requirements to what's available in Nixpkgs
+    ./dependencies.patch
+  ];
+
+  nativeBuildInputs = [
+    python3Packages.setuptools-scm
+  ];
+
+  # give a hint to setuptools_scm on package version
+  SETUPTOOLS_SCM_PRETEND_VERSION = "v${version}";
+
+  propagatedBuildInputs = with python3Packages; [
+    aiohttp
+    aiosqlite
+    bitstring
+    blspy
+    chiapos
+    chiavdf
+    chiabip158
+    click
+    clvm
+    clvm-rs
+    clvm-tools
+    colorlog
+    concurrent-log-handler
+    cryptography
+    keyrings-cryptfile
+    pyyaml
+    setproctitle
+    setuptools # needs pkg_resources at runtime
+    sortedcontainers
+    websockets
+  ];
+
+  checkInputs = [
+    python3Packages.pytestCheckHook
+  ];
+
+  disabledTests = [
+    "test_spend_through_n"
+    "test_spend_zero_coin"
+  ];
+
+  preCheck = ''
+    export HOME=`mktemp -d`
+  '';
+
+  meta = with lib; {
+    homepage = "https://www.chia.net/";
+    description = "Chia is a modern cryptocurrency built from scratch, designed to be efficient, decentralized, and secure.";
+    license = with licenses; [ asl20 ];
+    maintainers = teams.chia.members;
+    platforms = platforms.all;
+  };
+}