Skip to content

Commit

Permalink
feat: Remove cycles from packages (#66)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Remove cycle packages from flake.nix
  • Loading branch information
sestrella authored Mar 27, 2024
1 parent 4cbc7b5 commit 1002509
Showing 1 changed file with 1 addition and 23 deletions.
24 changes: 1 addition & 23 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,29 +22,7 @@

checks = config.packages;

packages =
let
versions = import ./lib/packages.nix { inherit pkgs pkgs-unstable; custom-lib = self.lib; };
linkPackagesByCycle = versionsPerCycle: builtins.mapAttrs
(cycle: cycleVersions: pkgs.symlinkJoin {
name = "terraform-${cycle}";
paths = builtins.map (version: versions.${version}) cycleVersions;
})
versionsPerCycle;
groupVersionsByCycle = versions: builtins.groupBy
(version:
let
splittedVersion = builtins.splitVersion version;
in
"all-" + (builtins.concatStringsSep "." [
(builtins.elemAt splittedVersion 0)
(builtins.elemAt splittedVersion 1)
])
)
(builtins.attrNames versions);
cycles = linkPackagesByCycle (groupVersionsByCycle versions);
in
versions // cycles;
packages = import ./lib/packages.nix { inherit pkgs pkgs-unstable; custom-lib = self.lib; };

overlayAttrs = {
terraform-versions = config.packages;
Expand Down

0 comments on commit 1002509

Please sign in to comment.