mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-11 04:05:40 +03:00
convertlit: fix build with GCC 14 (#407582)
This commit is contained in:
commit
f21da74e5b
1 changed files with 13 additions and 7 deletions
|
@ -5,12 +5,14 @@
|
|||
libtommath,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "convertlit";
|
||||
version = "1.8";
|
||||
|
||||
src = fetchzip {
|
||||
url = "http://www.convertlit.com/convertlit${lib.replaceStrings [ "." ] [ "" ] version}src.zip";
|
||||
url = "http://www.convertlit.com/convertlit${
|
||||
lib.replaceStrings [ "." ] [ "" ] finalAttrs.version
|
||||
}src.zip";
|
||||
sha256 = "182nsin7qscgbw2h92m0zadh3h8q410h5cza6v486yjfvla3dxjx";
|
||||
stripRoot = false;
|
||||
};
|
||||
|
@ -19,18 +21,22 @@ stdenv.mkDerivation rec {
|
|||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
env.NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace clit18/Makefile --replace gcc \$\(CC\)
|
||||
substituteInPlace clit18/Makefile --replace ../libtommath-0.30/libtommath.a -ltommath
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
cd lib
|
||||
make
|
||||
cd ../clit18
|
||||
substituteInPlace Makefile \
|
||||
--replace ../libtommath-0.30/libtommath.a -ltommath
|
||||
make
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp clit $out/bin
|
||||
install -Dm755 clit $out/bin/clit
|
||||
'';
|
||||
|
||||
meta = {
|
||||
|
@ -40,4 +46,4 @@ stdenv.mkDerivation rec {
|
|||
license = lib.licenses.gpl2Plus;
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue