diff options
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/by-name/sr/srm-cuarzo/package.nix | 4 | ||||
-rw-r--r-- | pkgs/development/python-modules/tpm2-pytss/cross.patch | 22 | ||||
-rw-r--r-- | pkgs/development/python-modules/tpm2-pytss/default.nix | 17 | ||||
-rw-r--r-- | pkgs/development/tools/ols/default.nix | 6 |
4 files changed, 44 insertions, 5 deletions
diff --git a/pkgs/by-name/sr/srm-cuarzo/package.nix b/pkgs/by-name/sr/srm-cuarzo/package.nix index 1f636e8aaeeb6..5612520e626ec 100644 --- a/pkgs/by-name/sr/srm-cuarzo/package.nix +++ b/pkgs/by-name/sr/srm-cuarzo/package.nix @@ -14,9 +14,9 @@ }: stdenv.mkDerivation (self: { pname = "srm-cuarzo"; - version = "0.5.5-1"; + version = "0.5.6-1"; rev = "v${self.version}"; - hash = "sha256-4aeKzvhfVmimz4Df7wnyZESAZa7RMjYUqbhFhqPJ59o="; + hash = "sha256-REILtx4tPAWX4JnBjC0EU5dnnZhbVHhlVAWKo7n7sdA="; src = fetchFromGitHub { inherit (self) rev hash; diff --git a/pkgs/development/python-modules/tpm2-pytss/cross.patch b/pkgs/development/python-modules/tpm2-pytss/cross.patch new file mode 100644 index 0000000000000..8fa2956c11d04 --- /dev/null +++ b/pkgs/development/python-modules/tpm2-pytss/cross.patch @@ -0,0 +1,22 @@ +diff --git a/setup.py b/setup.py +index 1b5f513..d660b9a 100644 +--- a/setup.py ++++ b/setup.py +@@ -184,7 +184,8 @@ class type_generator(build_ext): + f"unable to find tss2_tpm2_types.h in {pk['include_dirs']}" + ) + pdata = preprocess_file( +- header_path, cpp_args=["-D__extension__=", "-D__attribute__(x)="] ++ header_path, cpp_args=["-D__extension__=", "-D__attribute__(x)="], ++ cpp_path="@crossPrefix@-cpp", + ) + parser = c_parser.CParser() + ast = parser.parse(pdata, "tss2_tpm2_types.h") +@@ -210,6 +211,7 @@ class type_generator(build_ext): + "-D__float128=long double", + "-D_FORTIFY_SOURCE=0", + ], ++ cpp_path="@crossPrefix@-cpp", + ) + parser = c_parser.CParser() + past = parser.parse(pdata, "tss2_policy.h") diff --git a/pkgs/development/python-modules/tpm2-pytss/default.nix b/pkgs/development/python-modules/tpm2-pytss/default.nix index 484f3dc2d16e3..7b5fd56b0a109 100644 --- a/pkgs/development/python-modules/tpm2-pytss/default.nix +++ b/pkgs/development/python-modules/tpm2-pytss/default.nix @@ -1,4 +1,6 @@ { lib +, stdenv +, substituteAll , buildPythonPackage , fetchPypi , pythonOlder @@ -17,6 +19,9 @@ , swtpm }: +let + isCross = (stdenv.buildPlatform != stdenv.hostPlatform); +in buildPythonPackage rec { pname = "tpm2-pytss"; version = "2.2.1"; @@ -32,6 +37,18 @@ buildPythonPackage rec { patches = [ # Fix hardcoded `fapi-config.json` configuration path ./fapi-config.patch + ] ++ lib.optionals isCross [ + # pytss will regenerate files from headers of tpm2-tss. + # Those headers are fed through a compiler via pycparser. pycparser expects `cpp` + # to be in the path. + # This is put in the path via stdenv when not cross-compiling, but this is absent + # when cross-compiling is turned on. + # This patch changes the call to pycparser.preprocess_file to provide the name + # of the cross-compiling cpp + (substituteAll { + src = ./cross.patch; + crossPrefix = stdenv.hostPlatform.config; + }) ]; postPatch = '' diff --git a/pkgs/development/tools/ols/default.nix b/pkgs/development/tools/ols/default.nix index 05839dcdcba78..963fbaef560e7 100644 --- a/pkgs/development/tools/ols/default.nix +++ b/pkgs/development/tools/ols/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation { pname = "ols"; - version = "0-unstable-2024-02-09"; + version = "0-unstable-2024-04-15"; src = fetchFromGitHub { owner = "DanielGavin"; repo = "ols"; - rev = "3eb1e0e60a66a4fc7347fb77837ff45ccbe1cabb"; - hash = "sha256-qPcSZjvlBmFf3M98GrwIu8SGO2VbgdqBKzyFpGSEtrI="; + rev = "aa1aabda1cce68a6038c48429cc759f09ad2ebab"; + hash = "sha256-yM+Syx8hWiSZatWfFFGz8lUJTOCozkZWPdPUhRW0/Ow="; }; nativeBuildInputs = [ |