diff options
Diffstat (limited to 'overlays/libdscp/default.nix')
-rw-r--r-- | overlays/libdscp/default.nix | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/overlays/libdscp/default.nix b/overlays/libdscp/default.nix index 47103fd3..9e82f20e 100644 --- a/overlays/libdscp/default.nix +++ b/overlays/libdscp/default.nix | |||
@@ -8,4 +8,22 @@ | |||
8 | 8 | ||
9 | makeFlags = [ "PREFIX=$(out)" ]; | 9 | makeFlags = [ "PREFIX=$(out)" ]; |
10 | }; | 10 | }; |
11 | |||
12 | dscp = prev.writeShellApplication { | ||
13 | name = "dscp"; | ||
14 | |||
15 | text = '' | ||
16 | export LD_PRELOAD | ||
17 | LD_PRELOAD=''${LD_PRELOAD:+':'$LD_PRELOAD':'} | ||
18 | if [[ $LD_PRELOAD != *':'''${final.libdscp}/lib/libdscp.so''':'* ]]; then | ||
19 | LD_PRELOAD='${final.libdscp}/lib/libdscp.so'$LD_PRELOAD | ||
20 | fi | ||
21 | LD_PRELOAD=''${LD_PRELOAD#':'} | ||
22 | LD_PRELOAD=''${LD_PRELOAD%':'} | ||
23 | |||
24 | : "''${DSCP:=0}" | ||
25 | |||
26 | exec -- "$@" | ||
27 | ''; | ||
28 | }; | ||
11 | } | 29 | } |