Skip to content

Commit

Permalink
Bump nixpkgs to 23.11
Browse files Browse the repository at this point in the history
  • Loading branch information
alufers committed Mar 12, 2024
1 parent c63ca2f commit 51f2ab5
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 26 deletions.
8 changes: 4 additions & 4 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
description = "euphonium - Tiny audio platform";

inputs = {
nixpkgs.url = "nixpkgs/nixos-23.05";
nixpkgs.url = "nixpkgs/nixos-23.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
gk-flasher = {
Expand Down
48 changes: 27 additions & 21 deletions nix/esp-idf.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
{ stdenv
, lib
, fetchFromGitHub
, python310Packages
, pkgs
,
}:
{ stdenv, lib, fetchFromGitHub, python310Packages, pkgs, }:
let
idf-component-manager = python310Packages.buildPythonPackage rec {
pname = "idf_component_manager";
Expand Down Expand Up @@ -74,9 +68,7 @@ let
sha256 = "sha256-HD+QlAcHQgwlkKMn0LA24CoNux0IxpORKLYBfYb39JI=";
};
doCheck = false;
propagatedBuildInputs = with python310Packages; [
kconfiglib
];
propagatedBuildInputs = with python310Packages; [ kconfiglib ];
};
esp-idf-monitor = python310Packages.buildPythonPackage rec {
pname = "esp-idf-monitor";
Expand Down Expand Up @@ -116,9 +108,7 @@ let
sha256 = "sha256-OzthhzKGjyqDJrmJWs4LMkHz0rAwho+3Pyc2BYFK0EU=";
};
doCheck = false;
propagatedBuildInputs = with python310Packages; [
pyaml
];
propagatedBuildInputs = with python310Packages; [ pyaml ];
};
freertos-gdb = python310Packages.buildPythonPackage rec {
pname = "freertos-gdb";
Expand All @@ -128,15 +118,26 @@ let
sha256 = "sha256-o0ZoTy7OLVnrhSepya+MwaILgJSojs2hfmI86D9C3cs=";
};
doCheck = false;
propagatedBuildInputs = with python310Packages; [
setuptools
wheel
];
propagatedBuildInputs = with python310Packages; [ setuptools wheel ];
};
toolchain = pkgs.callPackage ./toolchain.nix { };
idf-python-env = (pkgs.python310.withPackages (p: with p; [ pip idf-component-manager esptool esp-coredump esp-idf-monitor esp-idf-kconfig freertos-gdb p.protobuf grpcio-tools pyparsing esp-idf-size esp-idf-panic-decoder ]));
in
stdenv.mkDerivation rec {
idf-python-env = (pkgs.python310.withPackages (p:
with p; [
pip
idf-component-manager
esptool
esp-coredump
esp-idf-monitor
esp-idf-kconfig
freertos-gdb
p.protobuf
grpcio-tools
pyparsing
esp-idf-size
esp-idf-panic-decoder
filelock
]));
in stdenv.mkDerivation rec {
pname = "esp-idf";
version = "5.1";
src = fetchFromGitHub {
Expand All @@ -148,6 +149,8 @@ stdenv.mkDerivation rec {
sha256 = "sha256-uEf3/3NPH+E39VgQ02AbxTG7nmG5bQlhwk/WcTeAUfg=";
};

patches = [ ./neutralize-python-dependency-checks.patch ];

nativeBuildInputs = [ pkgs.makeWrapper ];

propagatedBuildInputs = with pkgs; [
Expand All @@ -164,6 +167,9 @@ stdenv.mkDerivation rec {
runHook preUnpack
mkdir sdk
cp -r $src/* sdk
chmod -R +w sdk
# permits the patchPhase to modify the sources
# (for some reason cp makes them read-only, even though we are the owner of the files)
runHook postUnpack
'';

Expand Down Expand Up @@ -207,7 +213,7 @@ stdenv.mkDerivation rec {
export PATH="${lib.makeBinPath propagatedBuildInputs}":$PATH
'';

phases = [ "unpackPhase" "preBuildPhase" "installPhase" ];
phases = ["unpackPhase" "patchPhase" "preBuildPhase" "installPhase" ];

dontConfigure = true;

Expand Down
10 changes: 10 additions & 0 deletions nix/neutralize-python-dependency-checks.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--- a/sdk/tools/check_python_dependencies.py
+++ b/sdk/tools/check_python_dependencies.py
@@ -142,6 +142,6 @@ if __name__ == '__main__':
if not idf_python_env_path or idf_python_env_path not in sys.executable:
print(' Warning: python interpreter not running from IDF_PYTHON_ENV_PATH')
print(' PATH: {}'.format(os.getenv('PATH')))
- sys.exit(1)
+ # sys.exit(1) # neutralized not to break nix build

print('Python requirements are satisfied.')

0 comments on commit 51f2ab5

Please sign in to comment.