jujutsu: support darwin guidelines for config placement
Follow up to #5207, fixing jujutsu module on darwin targets.
This commit is contained in:
parent
9fdadb1cb6
commit
ea72cf548f
3 changed files with 19 additions and 9 deletions
|
|
@ -1,11 +1,14 @@
|
|||
{ ... }:
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
let
|
||||
configDir =
|
||||
if pkgs.stdenv.isDarwin then "Library/Application Support" else ".config";
|
||||
in {
|
||||
programs.jujutsu.enable = true;
|
||||
|
||||
test.stubs.jujutsu = { };
|
||||
|
||||
nmt.script = ''
|
||||
assertPathNotExists home-files/.config/jj/config.toml
|
||||
assertPathNotExists 'home-files/${configDir}/jj/config.toml'
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
{ config, ... }:
|
||||
{ pkgs, config, ... }:
|
||||
|
||||
{
|
||||
let
|
||||
configDir =
|
||||
if pkgs.stdenv.isDarwin then "Library/Application Support" else ".config";
|
||||
in {
|
||||
programs.jujutsu = {
|
||||
enable = true;
|
||||
package = config.lib.test.mkStubPackage { };
|
||||
|
|
@ -13,9 +16,8 @@
|
|||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/jj/config.toml
|
||||
assertFileContent \
|
||||
home-files/.config/jj/config.toml \
|
||||
assertFileExists 'home-files/${configDir}/jj/config.toml'
|
||||
assertFileContent 'home-files/${configDir}/jj/config.toml' \
|
||||
${
|
||||
builtins.toFile "expected.toml" ''
|
||||
[user]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue