From 9692e2e81987410ed51af3b7733d1f1bbabc31bd Mon Sep 17 00:00:00 2001 From: Lorenz Leutgeb Date: Thu, 7 Mar 2024 21:05:18 +0100 Subject: [PATCH] nixos/java: No bashisms in `environment.shellInit` script Running dash (the lightweight Debian Almquist shell) results in ``` source: not found ``` For this line which ends up in `/etc/profile`. Let's use `.` instead, according to [the Ubuntu wiki](https://wiki.ubuntu.com/DashAsBinSh#source) and [`checkbashisms`](https://sourceforge.net/projects/checkbaskisms/): ``` possible bashism in /etc/profile line [...] (should be '.', not 'source'): test -e /nix/store/[...]/nix-support/setup-hook && source /nix/store/[...]/nix-support/setup-hook ``` --- nixos/modules/programs/java.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/programs/java.nix b/nixos/modules/programs/java.nix index 251192183ebf..28bc849f8670 100644 --- a/nixos/modules/programs/java.nix +++ b/nixos/modules/programs/java.nix @@ -66,7 +66,7 @@ in environment.systemPackages = [ cfg.package ]; environment.shellInit = '' - test -e ${cfg.package}/nix-support/setup-hook && source ${cfg.package}/nix-support/setup-hook + test -e ${cfg.package}/nix-support/setup-hook && . ${cfg.package}/nix-support/setup-hook ''; };