pkgs/overlays/cosmic: create
This commit is contained in:
parent
ec8be03e7f
commit
dae61508df
1 changed files with 33 additions and 0 deletions
33
pkgs/overlays/cosmic-packages.nix
Normal file
33
pkgs/overlays/cosmic-packages.nix
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
{ inputs ? import ../../inputs.nix {}}:
|
||||||
|
|
||||||
|
let
|
||||||
|
nixos-cosmic = inputs.cosmic-modules;
|
||||||
|
cosmicPkgsMainDir = builtins.readDir "${nixos-cosmic}/pkgs";
|
||||||
|
cosmicPkgsDirs = builtins.filter (v: cosmicPkgsMainDir."${v}" == "directory") (builtins.attrNames cosmicPkgsMainDir);
|
||||||
|
|
||||||
|
# FIXME: use unstable nixpkgs when rust 1.80 will be available in unstable
|
||||||
|
stagingNixpkgsSrc = builtins.fetchTarball {
|
||||||
|
name = "nixpkgs";
|
||||||
|
url = "https://github.com/NixOS/nixpkgs/archive/b79cec4237cd0f655562890bf927466c68b48d68.tar.gz";
|
||||||
|
sha256 = "1mswisq9iwffg2d6rfxvr27mvi4w853d9rn222s2g76445d0iqh8";
|
||||||
|
};
|
||||||
|
cosmicOverlay = self: super: builtins.listToAttrs (
|
||||||
|
builtins.map (v: {name = v; value = self.callPackage "${nixos-cosmic}/pkgs/${v}/package.nix" {};}) cosmicPkgsDirs
|
||||||
|
);
|
||||||
|
in
|
||||||
|
|
||||||
|
self: super:
|
||||||
|
|
||||||
|
let
|
||||||
|
stagingNixpkgs = import stagingNixpkgsSrc {
|
||||||
|
localSystem = self.stdenv.buildPlatform;
|
||||||
|
config = self.config;
|
||||||
|
overlays = [ cosmicOverlay ];
|
||||||
|
} // (if self.stdenv.buildPlatform == self.stdenv.hostPlatform then {} else {
|
||||||
|
crossSystem = self.stdenv.hostPlatform;
|
||||||
|
});
|
||||||
|
in
|
||||||
|
|
||||||
|
builtins.listToAttrs (
|
||||||
|
builtins.map (v: {name = v; value = stagingNixpkgs.${v};}) cosmicPkgsDirs
|
||||||
|
)
|
Loading…
Reference in a new issue