nixos-configuration/pkgs/overlays/cosmic-packages.nix

35 lines
944 B
Nix
Raw Permalink Normal View History

{
inputs ? import ../../inputs.nix {},
rustPlatform ? null,
}:
2024-08-08 06:06:41 +02:00
self: super:
2024-08-08 06:06:41 +02:00
let
nixos-cosmic = inputs.cosmic-modules;
# Pinned unstable nixpkgs from cosmic-modules
cosmicModulesLock = builtins.fromJSON (builtins.readFile "${nixos-cosmic}/flake.lock");
pinnedNixpkgsRev = cosmicModulesLock.nodes.nixpkgs.locked.rev;
pinnedNixpkgsNarHash = cosmicModulesLock.nodes.nixpkgs.locked.narHash;
futureNixpkgsSrc = builtins.fetchTarball {
2024-08-08 06:06:41 +02:00
name = "nixpkgs";
url = "https://github.com/NixOS/nixpkgs/archive/${pinnedNixpkgsRev}.tar.gz";
sha256 = pinnedNixpkgsNarHash;
2024-08-08 06:06:41 +02:00
};
# Initialize pinned nixpkgs
futureNixpkgs = let
extended = self.extend (import ./unstable-from-source.nix {
unstableSource = futureNixpkgsSrc;
});
in extended.unstable;
2024-08-08 06:06:41 +02:00
in
import "${nixos-cosmic}/pkgs" {
final = self;
prev = super;
rustPlatform = if rustPlatform != null then rustPlatform else futureNixpkgs.rustPlatform;
}