tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
librep: fix build on gcc-14 & modernize
Petr Zahradnik
1 year ago
babb4e17
509aac3f
+26
-5
1 changed file
expand all
collapse all
unified
split
pkgs
by-name
li
librep
package.nix
+26
-5
pkgs/by-name/li/librep/package.nix
···
1
1
{
2
2
lib,
3
3
stdenv,
4
4
-
fetchurl,
4
4
+
fetchFromGitHub,
5
5
+
fetchpatch,
5
6
autoreconfHook,
6
7
gdbm,
7
8
gmp,
···
9
10
pkg-config,
10
11
readline,
11
12
texinfo,
13
13
+
versionCheckHook,
12
14
}:
13
15
14
16
stdenv.mkDerivation (finalAttrs: {
15
17
pname = "librep";
16
18
version = "0.92.7";
17
19
18
18
-
src = fetchurl {
19
19
-
url = "https://download.tuxfamily.org/librep/librep_${finalAttrs.version}.tar.xz";
20
20
-
hash = "sha256-SKGWeax8BTCollfeGP/knFdZpf9w/IRJKLDl0AOVrK4=";
20
20
+
src = fetchFromGitHub {
21
21
+
owner = "SawfishWM";
22
22
+
repo = "librep";
23
23
+
tag = "librep-${finalAttrs.version}";
24
24
+
hash = "sha256-0Ltysy+ilNhlXmvzSCMfF1n3x7F1idCRrhBFX/+n9uU=";
21
25
};
22
26
27
27
+
patches = [
28
28
+
# build: fix -Wimplicit-int, -Wimplicit-function-declaration (Clang 16)
29
29
+
(fetchpatch {
30
30
+
name = "fix-implicit-int";
31
31
+
url = "https://github.com/SawfishWM/librep/commit/48f557ab34d47a7a1fd9e8425542f720be40946e.patch";
32
32
+
hash = "sha256-MbFBNCgjEU1/QnjOe3uCWKVhpxo/E8c9q2TT3+CwPfY=";
33
33
+
})
34
34
+
];
35
35
+
23
36
nativeBuildInputs = [
24
37
autoreconfHook
25
38
pkg-config
···
34
47
];
35
48
36
49
strictDeps = true;
50
50
+
enableParallelBuilding = true;
37
51
38
52
# ensure libsystem/ctype functions don't get duplicated when using clang
39
53
configureFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "CFLAGS=-std=gnu89" ];
40
54
41
55
setupHook = ./setup-hook.sh;
42
56
57
57
+
nativeInstallCheckInputs = [
58
58
+
versionCheckHook
59
59
+
];
60
60
+
doInstallCheck = true;
61
61
+
versionCheckProgramArg = [ "--version" ];
62
62
+
versionCheckProgram = "${placeholder "out"}/bin/${finalAttrs.meta.mainProgram}";
63
63
+
43
64
meta = {
44
65
homepage = "http://sawfish.tuxfamily.org/";
45
66
description = "Fast, lightweight, and versatile Lisp environment";
···
51
72
license = lib.licenses.gpl2Plus;
52
73
maintainers = [ ];
53
74
platforms = lib.platforms.unix;
75
75
+
mainProgram = "rep";
54
76
};
55
77
})
56
56
-
# TODO: investigate fetchFromGithub