fix: fix the error about options not set when disabling the devShell or package options for templates
This commit is contained in:
+39
-33
@@ -102,16 +102,19 @@
|
||||
# Dev Shell that lets you enter an environment with all the necessary utilites
|
||||
# Available through 'nix develop'
|
||||
# Also can be activated automatically if direnv is installed on the system with 'direnv allow'
|
||||
devShells.${cfg.devShell.name} = lib.mkIf cfg.devShell.enable (pkgs.mkShell {
|
||||
packages = [
|
||||
pyEnv
|
||||
];
|
||||
devShells = lib.mkIf cfg.devShell.enable {
|
||||
${cfg.devShell.name} =
|
||||
pkgs.mkShell {
|
||||
packages = [
|
||||
pyEnv
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
export PYTHONPATH="${pyEnv}/${pyEnv.sitePackages}:$PYTHONPATH"
|
||||
'';
|
||||
}
|
||||
// cfg.devShell.extraAttrs);
|
||||
shellHook = ''
|
||||
export PYTHONPATH="${pyEnv}/${pyEnv.sitePackages}:$PYTHONPATH"
|
||||
'';
|
||||
}
|
||||
// cfg.devShell.extraAttrs;
|
||||
};
|
||||
|
||||
# Formatter for nix files, available through 'nix fmt'
|
||||
treefmt = {
|
||||
@@ -120,32 +123,35 @@
|
||||
|
||||
# Your custom packages
|
||||
# Accessible through 'nix build', 'nix shell', 'nix run', etc
|
||||
packages.${cfg.package.name} = lib.mkIf cfg.package.enable (pkgs.runCommand cfg.outputName {}
|
||||
/*
|
||||
bash
|
||||
*/
|
||||
''
|
||||
mkdir $out
|
||||
cd $out
|
||||
packages = lib.mkIf cfg.package.enable {
|
||||
${cfg.package.name} =
|
||||
pkgs.runCommand cfg.outputName {}
|
||||
/*
|
||||
bash
|
||||
*/
|
||||
''
|
||||
mkdir $out
|
||||
cd $out
|
||||
|
||||
${pyEnv}/bin/python ${cfg.builder}
|
||||
${pyEnv}/bin/python ${cfg.builder}
|
||||
|
||||
${
|
||||
if cfg.outputName != ""
|
||||
then
|
||||
/*
|
||||
bash
|
||||
*/
|
||||
''
|
||||
for ext in ${lib.concatStringsSep " " outputExt}; do
|
||||
if [[ -f output.$ext ]]; then
|
||||
mv output.$ext ${cfg.outputName}.$ext
|
||||
fi
|
||||
done
|
||||
''
|
||||
else ""
|
||||
}
|
||||
'');
|
||||
${
|
||||
if cfg.outputName != ""
|
||||
then
|
||||
/*
|
||||
bash
|
||||
*/
|
||||
''
|
||||
for ext in ${lib.concatStringsSep " " outputExt}; do
|
||||
if [[ -f output.$ext ]]; then
|
||||
mv output.$ext ${cfg.outputName}.$ext
|
||||
fi
|
||||
done
|
||||
''
|
||||
else ""
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user