This commit is contained in:
lucy 2025-09-01 19:57:53 +02:00
parent 71ed2bc003
commit a0a8188d82
5 changed files with 399 additions and 9 deletions

View file

@ -2,6 +2,9 @@
let
stdenv = pkgs.stdenv;
name = "binutils";
version = "2.45";
nativePackages = with pkgs; [
cmake
zlib
@ -9,14 +12,25 @@ let
bison
];
binutilsPkg = stdenv.mkDerivation {
name = "binutils";
version = "2.45";
src = pkgs.fetchurl {
url = "https://ftp.fau.de/gnu/${name}/${name}-${version}.tar.xz";
hash = "sha256-xQwOf5yxiJgOLMl+RTdiaxZyRBgVWH8eq2nSob++9dI=";
};
src = pkgs.fetchurl {
url = "https://sourceware.org/pub/${name}/releases/${name}-${version}.tar.xz";
hash = "";
};
binutilsPkg = stdenv.mkDerivation {
inherit name version src;
/*
Nixpkgs derivations automatically enable a few hardening flags, including some that cause non-literal format strings to become errors. https://nixos.org/manual/nixpkgs/stable/#sec-hardening-in-nixpkgs
You can disable this particular one with
*/
hardeningDisable = [ "format" ];
/*
But really the package author should be notified of the issue, and a patch should be applied. Even if it's clear that it's safe (it's probably not), NixOS is far from the only organization that enables hardening flags like this by default.
*/
nativeBuildInputs = [ nativePackages ];
buildInputs = [ ];
@ -29,8 +43,6 @@ let
mkdir -v $LFSTOOLS
'';
# Using --prefix=$out instead of $LFS/tools.
configurePhase = ''
echo "Configuring... "
echo "Starting config"
@ -65,3 +77,4 @@ let
};
in
binutilsPkg