Merge pull request #211761 from SuperSandro2000/wslu-wslvar
wslu: supply default conf
This commit is contained in:
commit
2fd0a49cbd
2 changed files with 31 additions and 0 deletions
|
@ -14,6 +14,15 @@ stdenv.mkDerivation rec {
|
|||
hash = "sha256-yhugh836BoSISbTu19ubLOrz5X31Opu5QtCR0DXrbWc=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./fallback-conf-nix-store.diff
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace src/wslu-header \
|
||||
--subst-var out
|
||||
'';
|
||||
|
||||
makeFlags = [
|
||||
"DESTDIR=$(out)"
|
||||
"PREFIX="
|
||||
|
|
22
pkgs/tools/system/wslu/fallback-conf-nix-store.diff
Normal file
22
pkgs/tools/system/wslu/fallback-conf-nix-store.diff
Normal file
|
@ -0,0 +1,22 @@
|
|||
diff --git a/src/wslu-header b/src/wslu-header
|
||||
index 5f33925..159c6af 100644
|
||||
--- a/src/wslu-header
|
||||
+++ b/src/wslu-header
|
||||
@@ -169,11 +169,17 @@ if [ -f "$HOME/.config/wslu/conf" ]; then
|
||||
debug_echo "$HOME/.config/wslu/conf found, sourcing"
|
||||
source "$HOME/.config/wslu/conf"
|
||||
fi
|
||||
+
|
||||
if [ -f "$HOME/.wslurc" ]; then
|
||||
debug_echo "$HOME/.wslurc found, sourcing"
|
||||
source "$HOME/.wslurc"
|
||||
fi
|
||||
|
||||
+if [ -f "@out@/share/wslu/conf" ]; then
|
||||
+ debug_echo "@out@/share/wslu/conf found, sourcing"
|
||||
+ source "@out@/share/wslu/conf"
|
||||
+fi
|
||||
+
|
||||
# functions
|
||||
|
||||
function help {
|
Loading…
Reference in a new issue