Skip to content

Commit

Permalink
Nix: use Python 3.7 because a dependency (rednose) doesn't build un…
Browse files Browse the repository at this point in the history
…der 3.8 on macOS
  • Loading branch information
Kha authored and parttimenerd committed Jul 7, 2020
1 parent 2a65723 commit f7f95fc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 21 deletions.
6 changes: 3 additions & 3 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
}) {},
# ignore untracked files in local checkout
src ? if builtins.pathExists ./.git then builtins.fetchGit { url = ./.; } else ./. }:
with pkgs.python3Packages;
with pkgs.python37Packages;
let
python = import ./requirements.nix { inherit pkgs; };
pypi = python.packages;
Expand All @@ -21,7 +21,7 @@ in buildPythonApplication rec {
checkInputs = [ pytest pytestrunner ];
propagatedBuildInputs = [
click_git
pypi.humanfriendly
humanfriendly
fn
pytimeparse
pypi.cpuset-py3
Expand All @@ -35,7 +35,7 @@ in buildPythonApplication rec {
$out/bin/temci setup
'';
postPatch = ''
substituteInPlace temci/run/cpuset.py --replace python3 ${pkgs.python3.withPackages (ps: [ pypi.cpuset-py3 ])}/bin/python3
substituteInPlace temci/run/cpuset.py --replace python3 ${pkgs.python37.withPackages (ps: [ pypi.cpuset-py3 ])}/bin/python3
substituteInPlace temci/run/run_driver.py \
--replace /usr/bin/time ${pkgs.time}/bin/time \
--replace gtime ${pkgs.time}/bin/time
Expand Down
20 changes: 2 additions & 18 deletions requirements.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# See more at: https://github.com/garbas/pypi2nix
#
# COMMAND:
# pypi2nix -V 3 -e 'https://github.com/parttimenerd/cpuset/archive/master.tar.gz#egg=cpuset-py3' -e rainbow-logging-handler==2.2.2 -e humanfriendly==4.18
# pypi2nix -V python37 -e 'https://github.com/parttimenerd/cpuset/archive/master.tar.gz#egg=cpuset-py3' -e rainbow-logging-handler==2.2.2
#

{ pkgs ? import <nixpkgs> {},
Expand All @@ -18,7 +18,7 @@ let
import "${toString pkgs.path}/pkgs/top-level/python-packages.nix" {
inherit pkgs;
inherit (pkgs) stdenv;
python = pkgs.python3;
python = pkgs.python37;
};

commonBuildInputs = [];
Expand Down Expand Up @@ -108,22 +108,6 @@ let
};
};

"humanfriendly" = python.mkDerivation {
name = "humanfriendly-4.18";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/26/71/e7daf57e819a70228568ff5395fdbc4de81b63067b93167e07825fcf0bcf/humanfriendly-4.18.tar.gz";
sha256 = "33ee8ceb63f1db61cce8b5c800c531e1a61023ac5488ccde2ba574a85be00a85";
};
doCheck = commonDoCheck;
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [ ];
meta = with pkgs.stdenv.lib; {
homepage = "https://humanfriendly.readthedocs.io";
license = licenses.mit;
description = "Human friendly output for text interfaces using Python";
};
};

"logutils" = python.mkDerivation {
name = "logutils-0.3.5";
src = pkgs.fetchurl {
Expand Down

0 comments on commit f7f95fc

Please sign in to comment.