Skip to content

Commit

Permalink
flake/generate-files: do all builds in one eval
Browse files Browse the repository at this point in the history
  • Loading branch information
MattSturgeon committed Jul 31, 2024
1 parent fc8155b commit 0b23a4c
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions flake-modules/updates/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
perSystem =
{ pkgs, ... }:
{ pkgs, config, ... }:
{
apps.generate-files.program = pkgs.writeShellApplication {
name = "generate-files";
Expand All @@ -22,19 +22,15 @@
shift
done
mkdir -p "$generated_dir"
echo "Rust-Analyzer"
nix build .#rust-analyzer-options
cat ./result >"$generated_dir"/rust-analyzer.nix
generate() {
echo "$2"
cp "$1" "$generated_dir/$2.nix"
}
echo "efmls-configs"
nix build .#efmls-configs-sources
cat ./result >"$generated_dir"/efmls-configs.nix
echo "none-ls"
nix build .#none-ls-builtins
cat ./result >"$generated_dir"/none-ls.nix
mkdir -p "$generated_dir"
generate "${config.packages.rust-analyzer-options}" "rust-analyzer"
generate "${config.packages.efmls-configs-sources}" "efmls-configs"
generate "${config.packages.none-ls-builtins}" "none-ls"
git add --intent-to-add "$generated_dir"
nix fmt
Expand Down

0 comments on commit 0b23a4c

Please sign in to comment.