mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-22 06:17:50 +00:00
the basics
This commit is contained in:
parent
0e82782b61
commit
9a807c1aa2
4
nix/default.nix
Normal file
4
nix/default.nix
Normal file
@ -0,0 +1,4 @@
|
||||
{ pkgs ? import <nixpkgs> { } }:
|
||||
pkgs.python2.pkgs.callPackage ./tahoe-lafs.nix {
|
||||
eliot = (pkgs.python2.pkgs.callPackage ./eliot.nix { });
|
||||
}
|
27
nix/eliot.nix
Normal file
27
nix/eliot.nix
Normal file
@ -0,0 +1,27 @@
|
||||
{ lib, buildPythonPackage, fetchPypi, zope_interface, pyrsistent, boltons
|
||||
, hypothesis, testtools, pytest }:
|
||||
buildPythonPackage rec {
|
||||
pname = "eliot";
|
||||
version = "1.7.0";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "0ylyycf717s5qsrx8b9n6m38vyj2k8328lfhn8y6r31824991wv8";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.py \
|
||||
--replace "boltons >= 19.0.1" boltons
|
||||
# depends on eliot.prettyprint._main which we don't have here.
|
||||
rm eliot/tests/test_prettyprint.py
|
||||
'';
|
||||
|
||||
checkInputs = [ testtools pytest hypothesis ];
|
||||
propagatedBuildInputs = [ zope_interface pyrsistent boltons ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = https://github.com/itamarst/eliot/;
|
||||
description = "Logging library that tells you why it happened";
|
||||
license = licenses.asl20;
|
||||
};
|
||||
}
|
49
nix/tahoe-lafs.nix
Normal file
49
nix/tahoe-lafs.nix
Normal file
@ -0,0 +1,49 @@
|
||||
{ fetchFromGitHub, nettools, python
|
||||
, twisted, foolscap, nevow, zfec
|
||||
, setuptools, setuptoolsTrial, pyasn1, zope_interface
|
||||
, service-identity, pyyaml, magic-wormhole, treq, appdirs
|
||||
, beautifulsoup4, eliot, autobahn, cryptography
|
||||
}:
|
||||
python.pkgs.buildPythonPackage rec {
|
||||
version = "1.14.0.dev";
|
||||
name = "tahoe-lafs-${version}";
|
||||
# src = fetchFromGitHub {
|
||||
# owner = "LeastAuthority";
|
||||
# repo = "tahoe-lafs";
|
||||
# # HEAD of an integration branch for all of the storage plugin stuff. Last
|
||||
# # updated October 4 2019.
|
||||
# rev = "8c1f536ba4fbc01f3bc5f08412edbefc56ff7037";
|
||||
# sha256 = "17d7pkbsgss3rhqf7ac7ylzbddi555rnkzz48zjqwq1zx1z2jhy6";
|
||||
# };
|
||||
src = ~/Work/python/tahoe-lafs;
|
||||
|
||||
postPatch = ''
|
||||
sed -i "src/allmydata/util/iputil.py" \
|
||||
-es"|_linux_path = '/sbin/ifconfig'|_linux_path = '${nettools}/bin/ifconfig'|g"
|
||||
|
||||
# Chroots don't have /etc/hosts and /etc/resolv.conf, so work around
|
||||
# that.
|
||||
for i in $(find src/allmydata/test -type f)
|
||||
do
|
||||
sed -i "$i" -e"s/localhost/127.0.0.1/g"
|
||||
done
|
||||
'';
|
||||
|
||||
|
||||
propagatedBuildInputs = with python.pkgs; [
|
||||
twisted foolscap nevow zfec appdirs
|
||||
setuptoolsTrial pyasn1 zope_interface
|
||||
service-identity pyyaml magic-wormhole treq
|
||||
beautifulsoup4 eliot autobahn cryptography setuptools
|
||||
];
|
||||
|
||||
checkInputs = with python.pkgs; [
|
||||
hypothesis
|
||||
testtools
|
||||
fixtures
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
${python}/bin/python -m twisted.trial -j4 allmydata
|
||||
'';
|
||||
}
|
Loading…
Reference in New Issue
Block a user