Skip to content

Commit

Permalink
feat(nix): support stable nix
Browse files Browse the repository at this point in the history
  • Loading branch information
getchoo committed Nov 9, 2024
1 parent 96729aa commit 3895755
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 8 deletions.
17 changes: 17 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
pkgs ? import nixpkgs {
inherit system;
config = { };
overlays = [ ];
},
lib ? pkgs.lib,
nixpkgs ? <nixpkgs>,
system ? builtins.currentSystem,
}:

let
nixForecastPackages = lib.makeScope pkgs.newScope (lib.flip (import ./overlay.nix) pkgs);
in
{
inherit (nixForecastPackages) nix-forecast;
}
11 changes: 3 additions & 8 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -129,16 +129,11 @@
system:
let
pkgs = nixpkgsFor.${system};
nixForecastPackages = lib.makeScope pkgs.newScope (final: self.overlays.default final pkgs);
pkgs' = import ./default.nix { inherit pkgs; };
in
{
inherit (nixForecastPackages) nix-forecast;
default = self.packages.${system}.nix-forecast;
}
pkgs' // { default = pkgs'.nix-forecast; }
);

overlays.default = final: _: {
nix-forecast = final.callPackage ./nix/package.nix { };
};
overlays.default = final: prev: import ./overlay.nix final prev;
};
}
3 changes: 3 additions & 0 deletions overlay.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
final: _: {
nix-forecast = final.callPackage ./nix/package.nix { };
}

0 comments on commit 3895755

Please sign in to comment.