summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--overlays/libdscp/default.nix18
-rw-r--r--user-profiles/utils.nix2
2 files changed, 19 insertions, 1 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}
diff --git a/user-profiles/utils.nix b/user-profiles/utils.nix
index 48df50ea..775b9339 100644
--- a/user-profiles/utils.nix
+++ b/user-profiles/utils.nix
@@ -67,7 +67,7 @@ in {
67 psmisc mosh tree vnstat file pv bc zip nmap aspell 67 psmisc mosh tree vnstat file pv bc zip nmap aspell
68 aspellDicts.de aspellDicts.en borgbackup man-pages rsync socat 68 aspellDicts.de aspellDicts.en borgbackup man-pages rsync socat
69 inetutils yq cached-nix-shell persistent-nix-shell rage 69 inetutils yq cached-nix-shell persistent-nix-shell rage
70 smartmontools hdparm nix-output-monitor wrappedLess 70 smartmontools hdparm nix-output-monitor wrappedLess dscp
71 ]; 71 ];
72 }; 72 };
73} 73}