Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linux.stdenv: revert gcc11 update for x86_64-linux #175319

Closed
wants to merge 2 commits into from
Closed
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
27 changes: 15 additions & 12 deletions pkgs/servers/klipper/default.nix
Original file line number Diff line number Diff line change
@@ -1,32 +1,35 @@
{ stdenv
, lib
, fetchFromGitHub
, python2
, python3
, unstableGitUpdater
}:
stdenv.mkDerivation rec {
pname = "klipper";
version = "unstable-2022-03-14";
version = "unstable-2022-06-18";

src = fetchFromGitHub {
owner = "KevinOConnor";
repo = "klipper";
rev = "30098db22a43274ceb87e078e603889f403a35c4";
sha256 = "sha256-ORpXBFGPY6A/HEYX9Hhwb3wP2KcAE+z3pTxf6j7CwGg=";
rev = "d3c4ba4839dd7a4339ae024752e6c6424884c185";
sha256 = "sha256-2Fq56JIk5qcKpWffz1k/EJ+xYAnUpuxvCryq88l//8E=";
};

sourceRoot = "source/klippy";

# there is currently an attempt at moving it to Python 3, but it will remain
# Python 2 for the foreseeable future.
# c.f. https://github.com/KevinOConnor/klipper/pull/3278
# NB: This is needed for the postBuild step
nativeBuildInputs = [ (python2.withPackages ( p: with p; [ cffi ] )) ];
nativeBuildInputs = [ (python3.withPackages ( p: with p; [ cffi ] )) ];

buildInputs = [ (python2.withPackages (p: with p; [ cffi pyserial greenlet jinja2 numpy ])) ];
buildInputs = [ (python3.withPackages (p: with p; [ cffi pyserial greenlet jinja2 markupsafe ])) ];

# we need to run this to prebuild the chelper.
postBuild = "python2 ./chelper/__init__.py";
postBuild = "python ./chelper/__init__.py";

patchPhase = ''
for F in klippy.py console.py parsedump.py; do
substituteInPlace $F \
--replace '/usr/bin/env python2' '/usr/bin/env python'
done
'';

# NB: We don't move the main entry point into `/bin`, or even symlink it,
# because it uses relative paths to find necessary modules. We could wrap but
Expand All @@ -50,7 +53,7 @@ stdenv.mkDerivation rec {
meta = with lib; {
description = "The Klipper 3D printer firmware";
homepage = "https://github.com/KevinOConnor/klipper";
maintainers = with maintainers; [ lovesegfault zhaofengli ];
maintainers = with maintainers; [ lovesegfault zhaofengli cab404 ];
platforms = platforms.linux;
license = licenses.gpl3Only;
};
Expand Down
3 changes: 2 additions & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12532,7 +12532,8 @@ with pkgs;
num =
if (with stdenv.targetPlatform; isVc4 || libc == "relibc") then 6
else if (stdenv.targetPlatform.isAarch64 && stdenv.isDarwin) then 11
else if (stdenv.targetPlatform.isx86_64 || stdenv.targetPlatform.isRiscV) then 11
else if (stdenv.targetPlatform.isRiscV) then 11
else if (stdenv.targetPlatform.isx86_64) then 10
else if stdenv.targetPlatform.isAarch64 then 9
else 10;
numS = toString num;
Expand Down