Merge pull request #303472 from anthonyroussel/fix-gns3-wrap-util-linux

gns3-server: add util-linux to PATH and replace python3.pkgs by python3Packages
This commit is contained in:
Aleksana 2024-05-12 01:39:13 +08:00 committed by GitHub
commit 565942e7af
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,16 +4,17 @@
}:
{ lib
, python3
, python3Packages
, fetchFromGitHub
, pkgsStatic
, stdenv
, nixosTests
, testers
, util-linux
, gns3-server
}:
python3.pkgs.buildPythonApplication {
python3Packages.buildPythonApplication {
pname = "gns3-server";
inherit version;
@ -29,7 +30,7 @@ python3.pkgs.buildPythonApplication {
cp ${pkgsStatic.busybox}/bin/busybox gns3server/compute/docker/resources/bin/busybox
'';
propagatedBuildInputs = with python3.pkgs; [
propagatedBuildInputs = with python3Packages; [
aiofiles
aiohttp
aiohttp-cors
@ -55,6 +56,9 @@ python3.pkgs.buildPythonApplication {
rm $out/bin/gns3loopback
'';
# util-linux (script program) is required for Docker support
makeWrapperArgs = [ "--suffix PATH : ${lib.makeBinPath [ util-linux ]}" ];
doCheck = true;
# Otherwise tests will fail to create directory
@ -63,7 +67,7 @@ python3.pkgs.buildPythonApplication {
export HOME=$(mktemp -d)
'';
checkInputs = with python3.pkgs; [
checkInputs = with python3Packages; [
pytest-aiohttp
pytest-rerunfailures
(pytestCheckHook.override { pytest = pytest_7; })