mirror of
https://tangled.org/tranquil.farm/tranquil-pds
synced 2026-08-18 23:36:06 +00:00
source .env in devshell if one is pressent
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
{
|
||||
lib,
|
||||
mkShell,
|
||||
callPackage,
|
||||
rustPlatform,
|
||||
@@ -25,7 +26,23 @@ in mkShell {
|
||||
|
||||
env = {
|
||||
RUST_SRC_PATH = rustPlatform.rustLibSrc;
|
||||
};
|
||||
}
|
||||
# isabel if this is like a horrible way to do this forgive me for my sins ig
|
||||
# if you can make this better go do it and tell me how or something :3
|
||||
// builtins.fromTOML (
|
||||
(s: if s == "" then s else s + "\"") (lib.replaceStrings [ "\n" "=" "\"" ] [ "\"\n" "=\"" "\\\"" ]
|
||||
(lib.concatStringsSep "\n"
|
||||
(lib.filter (line: !lib.hasPrefix "#" line && line != "")
|
||||
(lib.splitString "\n"
|
||||
(if lib.pathIsRegularFile ./.env
|
||||
then (lib.readFile ./.env)
|
||||
else ""
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
packages = [
|
||||
just
|
||||
|
||||
Reference in New Issue
Block a user