fix: fix the error about options not set when disabling the devShell or package options for templates
This commit is contained in:
+10
-4
@@ -102,7 +102,9 @@
|
||||
# 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 {
|
||||
devShells = lib.mkIf cfg.devShell.enable {
|
||||
${cfg.devShell.name} =
|
||||
pkgs.mkShell {
|
||||
packages = [
|
||||
pyEnv
|
||||
];
|
||||
@@ -111,7 +113,8 @@
|
||||
export PYTHONPATH="${pyEnv}/${pyEnv.sitePackages}:$PYTHONPATH"
|
||||
'';
|
||||
}
|
||||
// cfg.devShell.extraAttrs);
|
||||
// cfg.devShell.extraAttrs;
|
||||
};
|
||||
|
||||
# Formatter for nix files, available through 'nix fmt'
|
||||
treefmt = {
|
||||
@@ -120,7 +123,9 @@
|
||||
|
||||
# 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 {}
|
||||
packages = lib.mkIf cfg.package.enable {
|
||||
${cfg.package.name} =
|
||||
pkgs.runCommand cfg.outputName {}
|
||||
/*
|
||||
bash
|
||||
*/
|
||||
@@ -145,7 +150,8 @@
|
||||
''
|
||||
else ""
|
||||
}
|
||||
'');
|
||||
'';
|
||||
};
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
+10
-4
@@ -135,7 +135,9 @@
|
||||
# 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 (craneLib.devShell {
|
||||
devShells = lib.mkIf cfg.devShell.enable {
|
||||
${cfg.devShell.name} =
|
||||
craneLib.devShell {
|
||||
inherit (self') checks;
|
||||
|
||||
# extra tooling dependencies
|
||||
@@ -143,7 +145,8 @@
|
||||
|
||||
inputsFrom = [self'.packages.${cfg.package.name}];
|
||||
}
|
||||
// cfg.devShell.extraAttrs);
|
||||
// cfg.devShell.extraAttrs;
|
||||
};
|
||||
|
||||
# Formatter for nix files, available through 'nix fmt'
|
||||
treefmt = {
|
||||
@@ -156,10 +159,13 @@
|
||||
|
||||
# Your custom packages
|
||||
# Accessible through 'nix build', 'nix shell', 'nix run', etc
|
||||
packages.${cfg.package.name} = lib.mkIf cfg.package.enable (craneLib.buildPackage {
|
||||
packages = lib.mkIf cfg.package.enable {
|
||||
${cfg.package.name} =
|
||||
craneLib.buildPackage {
|
||||
inherit src buildInputs nativeBuildInputs cargoArtifacts;
|
||||
}
|
||||
// cfg.package.extraAttrs);
|
||||
// cfg.package.extraAttrs;
|
||||
};
|
||||
|
||||
checks = {
|
||||
clippy = craneLib.cargoClippy {
|
||||
|
||||
Reference in New Issue
Block a user