Skip to content

Commit d66446a

Browse files
committed
Use packages directly
1 parent d42191e commit d66446a

1 file changed

Lines changed: 13 additions & 30 deletions

File tree

flake.nix

Lines changed: 13 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,17 @@
4242
];
4343
};
4444

45-
installer = pkgs.writeShellScriptBin "install" ''
45+
install = pkgs.writeShellScriptBin "install" ''
4646
mkdir -p $HOME/.config/direnv/lib
4747
ln -sfn ${direnv_bash} $HOME/.config/direnv/lib/use_devshell_toml.sh
4848
echo "Installed use_devshell_toml.sh on direnv lib."
4949
'';
5050

51-
app = pkgs.writeShellApplication {
51+
default = pkgs.writeShellApplication {
5252
name = "app";
5353
text = ''
5454
if ! test -e "$HOME/.config/direnv/lib/use_devshell_toml.sh"; then
55-
${installer}/bin/install
55+
${install}/bin/install
5656
fi
5757
5858
test -z "''${1:-}" && exit 0 # terminate if no package names were given
@@ -99,7 +99,7 @@
9999
'';
100100
};
101101

102-
genFlakes = pkgs.writeShellApplication {
102+
gen-flakes = pkgs.writeShellApplication {
103103
name = "gen-flakes";
104104
runtimeInputs = with pkgs; [
105105
coreutils
@@ -146,33 +146,16 @@
146146

147147
};
148148

149-
apps = perSystem (
149+
packages = perSystem (
150150
{ pkgs, ... }:
151151
{
152-
default = {
153-
type = "app";
154-
program = "${(libs pkgs).app}/bin/app";
155-
};
156-
157-
demo = {
158-
type = "app";
159-
program = "${(libs pkgs).demo}/bin/demo";
160-
};
161-
162-
install = {
163-
type = "app";
164-
program = "${(libs pkgs).installer}/bin/install";
165-
};
166-
167-
gen-flakes = {
168-
type = "app";
169-
program = "${(libs pkgs).genFlakes}/bin/gen-flakes";
170-
};
171-
172-
test-templates = {
173-
type = "app";
174-
program = "${(libs pkgs).test-templates}/bin/test-templates";
175-
};
152+
inherit (libs pkgs)
153+
default
154+
demo
155+
install
156+
gen-flakes
157+
test-templates
158+
;
176159
}
177160
);
178161

@@ -185,7 +168,7 @@
185168

186169
in
187170
{
188-
inherit formatter apps checks;
171+
inherit formatter packages checks;
189172

190173
templates = {
191174
default.path = ./templates/default;

0 commit comments

Comments
 (0)