From 4617239624b61933a13b36fff744d35deb64dbb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 3 Jun 2024 13:09:29 +0200 Subject: [PATCH 1/2] syslinux: fix replace warning, use https --- pkgs/os-specific/linux/syslinux/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/os-specific/linux/syslinux/default.nix b/pkgs/os-specific/linux/syslinux/default.nix index f5153eb5abc98..5c1216c8bfd1b 100644 --- a/pkgs/os-specific/linux/syslinux/default.nix +++ b/pkgs/os-specific/linux/syslinux/default.nix @@ -68,12 +68,12 @@ stdenv.mkDerivation { ]; postPatch = '' - substituteInPlace Makefile --replace /bin/pwd $(type -P pwd) - substituteInPlace utils/ppmtolss16 --replace /usr/bin/perl $(type -P perl) + substituteInPlace Makefile --replace-fail /bin/pwd $(type -P pwd) + substituteInPlace utils/ppmtolss16 --replace-fail /usr/bin/perl $(type -P perl) # fix tests substituteInPlace tests/unittest/include/unittest/unittest.h \ - --replace /usr/include/ "" + --replace-fail /usr/include/ "" # Hack to get `gcc -m32' to work without having 32-bit Glibc headers. mkdir gnu-efi/inc/ia32/gnu @@ -126,7 +126,7 @@ stdenv.mkDerivation { ''; meta = with lib; { - homepage = "http://www.syslinux.org/"; + homepage = "https://www.syslinux.org/"; description = "A lightweight bootloader"; license = licenses.gpl2Plus; maintainers = [ maintainers.samueldr ]; From bc3c8b1be829c831dc268553aa213d7a94db8017 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 3 Jun 2024 13:09:50 +0200 Subject: [PATCH 2/2] syslinux: fix submodule clone --- pkgs/os-specific/linux/syslinux/default.nix | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/linux/syslinux/default.nix b/pkgs/os-specific/linux/syslinux/default.nix index 5c1216c8bfd1b..49c8c38ffcf08 100644 --- a/pkgs/os-specific/linux/syslinux/default.nix +++ b/pkgs/os-specific/linux/syslinux/default.nix @@ -1,5 +1,6 @@ { lib , stdenv +, fetchFromGitHub , fetchgit , fetchurl , libuuid @@ -10,6 +11,16 @@ , python3 }: +let + gnu-efi-src = fetchFromGitHub { + owner = "ncroxon"; + repo = "gnu-efi"; + # see 363d61c4f112b972649b19d67e96b9321f738f00 in syslinux + rev = "d34132e62f666904158c7ec2f1eef5a9d5281c36"; + hash = "sha256-SYr8Lkp6qsNIGQ7I9JXI9HKsh1gcOJbwvOd1lMqLB1c="; + }; +in + stdenv.mkDerivation { pname = "syslinux"; version = "unstable-2019-02-07"; @@ -17,10 +28,10 @@ stdenv.mkDerivation { # This is syslinux-6.04-pre3^1; syslinux-6.04-pre3 fails to run. # Same issue here https://www.syslinux.org/archives/2019-February/026330.html src = fetchgit { - url = "https://repo.or.cz/syslinux"; + url = "https://repo.or.cz/syslinux.git"; rev = "b40487005223a78c3bb4c300ef6c436b3f6ec1f7"; - sha256 = "sha256-GqvRTr9mA2yRD0G0CF11x1X0jCgqV4Mh+tvE0/0yjqk="; - fetchSubmodules = true; + fetchSubmodules = false; + hash = "sha256-XNC+X7UYxdMQQAg4MLACQLxRNnI5/ZCOiCJrEkKgPeM="; }; patches = let @@ -75,6 +86,10 @@ stdenv.mkDerivation { substituteInPlace tests/unittest/include/unittest/unittest.h \ --replace-fail /usr/include/ "" + # needs to be manually put in place because submodule hash contains an extra g in the beginning gd34132e + cp -r ${gnu-efi-src}/* ./gnu-efi + chmod -R +w ./gnu-efi + # Hack to get `gcc -m32' to work without having 32-bit Glibc headers. mkdir gnu-efi/inc/ia32/gnu touch gnu-efi/inc/ia32/gnu/stubs-32.h