Skip to content

Instantly share code, notes, and snippets.

@exarkun
Created April 26, 2019 12:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save exarkun/42851ef1cf4f821049a5403696eb0479 to your computer and use it in GitHub Desktop.
Save exarkun/42851ef1cf4f821049a5403696eb0479 to your computer and use it in GitHub Desktop.
tahoe-lafs development environment
{ pkgs ? import <nixpkgs> { } }:
let
eliot = pkgs.pythonPackages.callPackage ./eliot.nix { };
tahoelafs = pkgs.pythonPackages.callPackage ./tahoe-lafs.nix { inherit eliot; };
in
(pkgs.python.buildEnv.override {
extraLibs = [
(pkgs.pythonPackages.toPythonModule tahoelafs)
];
}).env
{ 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;
};
}
{ eliot, appdirs, testtools, fixtures, tahoelafs }:
tahoelafs.overrideAttrs (old: {
src = ~/Work/python/tahoe-lafs;
propagatedBuildInputs = old.propagatedBuildInputs ++ [ eliot appdirs testtools fixtures ];
checkPhase = null;
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment