Skip to content

Commit

Permalink
chore: apply nixpkgs-fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
brianmcgee committed Feb 26, 2023
1 parent 1eb85e5 commit efb174d
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 21 deletions.
2 changes: 1 addition & 1 deletion extra/git/hooks.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ let
# shims read the correct "real" shim (directory) from DEVSHELL_GIT_HOOKS_DIR,
# which points to the directory containing git hooks for the current
# devshell.
hookShimsDir = pkgs.runCommand "git.hook.shims" {} ''
hookShimsDir = pkgs.runCommand "git.hook.shims" { } ''
mkdir -p $out/bin
${lib.concatMapStringsSep "\n" (k: ''
Expand Down
29 changes: 15 additions & 14 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,21 @@
"i686-linux"
"x86_64-darwin"
"x86_64-linux"
] (system:
let
pkgs = import inputs.self {
inherit system;
inputs = null;
nixpkgs = inputs.nixpkgs.legacyPackages.${system};
};
in
{
packages.default = pkgs.cli;
legacyPackages = pkgs;
devShells.default = pkgs.fromTOML ./devshell.toml;
}
) // {
]
(system:
let
pkgs = import inputs.self {
inherit system;
inputs = null;
nixpkgs = inputs.nixpkgs.legacyPackages.${system};
};
in
{
packages.default = pkgs.cli;
legacyPackages = pkgs;
devShells.default = pkgs.fromTOML ./devshell.toml;
}
) // {
templates.default.path = ./template;
templates.default.description = "nix flake new 'github:numtide/devshell'";
# Import this overlay into your instance of nixpkgs
Expand Down
2 changes: 1 addition & 1 deletion modules/devshell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ in

meta = mkOption {
type = types.attrsOf types.anything;
default = {};
default = { };
description = ''
Metadata, such as 'meta.description'. Can be useful as metadata for downstream tooling.
'';
Expand Down
2 changes: 1 addition & 1 deletion nix/writeDefaultShellScript.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ writeTextFile (
executable = true;
}
// (lib.optionalAttrs (checkPhase != null) { inherit checkPhase; })
// (lib.optionalAttrs binPrefix { destination = "/bin/${name}"; })
// (lib.optionalAttrs binPrefix { destination = "/bin/${name}"; })
)
9 changes: 5 additions & 4 deletions template/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
outputs = { self, flake-utils, devshell, nixpkgs }:
flake-utils.lib.eachDefaultSystem (system: {
devShell =
let pkgs = import nixpkgs {
inherit system;
let
pkgs = import nixpkgs {
inherit system;

overlays = [ devshell.overlay ];
};
overlays = [ devshell.overlay ];
};
in
pkgs.devshell.mkShell {
imports = [ (pkgs.devshell.importTOML ./devshell.toml) ];
Expand Down

0 comments on commit efb174d

Please sign in to comment.