Skip to content

Commit f21da74

Browse files
convertlit: fix build with GCC 14 (#407582)
2 parents c986e70 + e15818d commit f21da74

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

pkgs/by-name/co/convertlit/package.nix

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@
55
libtommath,
66
}:
77

8-
stdenv.mkDerivation rec {
8+
stdenv.mkDerivation (finalAttrs: {
99
pname = "convertlit";
1010
version = "1.8";
1111

1212
src = fetchzip {
13-
url = "http://www.convertlit.com/convertlit${lib.replaceStrings [ "." ] [ "" ] version}src.zip";
13+
url = "http://www.convertlit.com/convertlit${
14+
lib.replaceStrings [ "." ] [ "" ] finalAttrs.version
15+
}src.zip";
1416
sha256 = "182nsin7qscgbw2h92m0zadh3h8q410h5cza6v486yjfvla3dxjx";
1517
stripRoot = false;
1618
};
@@ -19,18 +21,22 @@ stdenv.mkDerivation rec {
1921

2022
hardeningDisable = [ "format" ];
2123

24+
env.NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
25+
26+
postPatch = ''
27+
substituteInPlace clit18/Makefile --replace gcc \$\(CC\)
28+
substituteInPlace clit18/Makefile --replace ../libtommath-0.30/libtommath.a -ltommath
29+
'';
30+
2231
buildPhase = ''
2332
cd lib
2433
make
2534
cd ../clit18
26-
substituteInPlace Makefile \
27-
--replace ../libtommath-0.30/libtommath.a -ltommath
2835
make
2936
'';
3037

3138
installPhase = ''
32-
mkdir -p $out/bin
33-
cp clit $out/bin
39+
install -Dm755 clit $out/bin/clit
3440
'';
3541

3642
meta = {
@@ -40,4 +46,4 @@ stdenv.mkDerivation rec {
4046
license = lib.licenses.gpl2Plus;
4147
platforms = lib.platforms.linux;
4248
};
43-
}
49+
})

0 commit comments

Comments
 (0)