Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ let
propagatedBuildInputs = [pythonPackages.pyyaml];
};
isPy3 = pythonPackages.isPy3k or false;

# Command to get the owner of a folder; different on linux vs darwin.
getOwner = if pkgs.stdenv.isLinux then "stat -c '%U'" else "stat -f '%Su'";
in

pythonPackages.buildPythonPackage rec {
Expand All @@ -28,22 +31,23 @@ pythonPackages.buildPythonPackage rec {
pkgs.pv
pkgs.which
flask
requests2
requests
ipdb
six
datadiff
rtyaml
python_magic
] ++ (if isPy3 then [] else [
pythonPackages.futures
pythonPackages.backports_lzma
pythonPackages.repoze_lru
]);
checkPhase = ''
# HACK: try to detect this failure case at runtime
if ! nix-store -q --hash ${pkgs.nix} >/dev/null 2>&1; then
export NIX_REMOTE=daemon
if ${getOwner} ${pkgs.nix} >/dev/null 2>&1; then
echo "Skipping tests due to not working on root-owned nix store"
else
nosetests tests
fi
nosetests tests
'';
src = ./.;
makeWrapperArgs = [
Expand Down
Loading