{ inputs ? import ../../inputs.nix {}, rustPlatform ? null, }: self: super: 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 { name = "nixpkgs"; url = "https://github.com/NixOS/nixpkgs/archive/${pinnedNixpkgsRev}.tar.gz"; sha256 = pinnedNixpkgsNarHash; }; # Initialize pinned nixpkgs futureNixpkgs = let extended = self.extend (import ./unstable-from-source.nix { unstableSource = futureNixpkgsSrc; }); in extended.unstable; in import "${nixos-cosmic}/pkgs" { final = self; prev = super; rustPlatform = if rustPlatform != null then rustPlatform else futureNixpkgs.rustPlatform; }