File tree 1 file changed +34
-21
lines changed
1 file changed +34
-21
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
lib ,
3
3
stdenv ,
4
+ stdenvAdapters ,
4
5
cmake ,
5
6
pkg-config ,
6
7
pixman ,
7
8
version ? "git" ,
8
9
doCheck ? false ,
9
- } :
10
- stdenv . mkDerivation {
11
- pname = "hyprutils" ;
12
- inherit version doCheck ;
13
- src = ../. ;
10
+ debug ? false ,
11
+ } : let
12
+ inherit ( builtins ) foldl' ;
13
+ inherit ( lib . lists ) flatten ;
14
14
15
- nativeBuildInputs = [
16
- cmake
17
- pkg-config
15
+ adapters = flatten [
16
+ stdenvAdapters . useMoldLinker
17
+ ( lib . optional debug stdenvAdapters . keepDebugInfo )
18
18
] ;
19
19
20
- buildInputs = [
21
- pixman
22
- ] ;
20
+ customStdenv = foldl' ( acc : adapter : adapter acc ) stdenv adapters ;
21
+ in
22
+ customStdenv . mkDerivation {
23
+ pname = "hyprutils" ;
24
+ inherit version doCheck ;
25
+ src = ../. ;
26
+
27
+ nativeBuildInputs = [
28
+ cmake
29
+ pkg-config
30
+ ] ;
23
31
24
- outputs = [ "out" "dev" ] ;
32
+ buildInputs = [
33
+ pixman
34
+ ] ;
25
35
26
- cmakeBuildType = "RelWithDebInfo" ;
36
+ outputs = [ "out" "dev" ] ;
27
37
28
- dontStrip = true ;
38
+ cmakeBuildType =
39
+ if debug
40
+ then "Debug"
41
+ else "RelWithDebInfo" ;
29
42
30
- meta = with lib ; {
31
- homepage = "https://github.com/hyprwm/hyprutils" ;
32
- description = "Small C++ library for utilities used across the Hypr* ecosystem" ;
33
- license = licenses . bsd3 ;
34
- platforms = platforms . linux ;
35
- } ;
36
- }
43
+ meta = with lib ; {
44
+ homepage = "https://github.com/hyprwm/hyprutils" ;
45
+ description = "Small C++ library for utilities used across the Hypr* ecosystem" ;
46
+ license = licenses . bsd3 ;
47
+ platforms = platforms . linux ;
48
+ } ;
49
+ }
You can’t perform that action at this time.
0 commit comments