fix(hive): misc fixes regarding the nixpkgs usage
Previously, we were using <nixpkgs> actually, we fixed liminix and this file to ensure that we are instantiating the right nixpkgs. This helps to deal with unexpected mass rebuilds. Signed-off-by: Ryan Lahfa <ryan@dgnum.eu>
This commit is contained in:
parent
99902d2bb8
commit
46d07da404
1 changed files with 38 additions and 23 deletions
61
hive.nix
61
hive.nix
|
@ -46,24 +46,27 @@ let
|
||||||
inherit version;
|
inherit version;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
mkNixpkgsConfigPerSystem =
|
||||||
|
system: _:
|
||||||
|
if system == "nixos" then
|
||||||
|
{ }
|
||||||
|
else
|
||||||
|
(import "${sources.liminix}/devices/${system}").system
|
||||||
|
// {
|
||||||
|
overlays = [ (import "${sources.liminix}/overlay.nix") ];
|
||||||
|
config = {
|
||||||
|
allowUnsupportedSystem = true; # mipsel
|
||||||
|
permittedInsecurePackages = [
|
||||||
|
"python-2.7.18.8" # Python < 3 is needed for kernel backports.
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# Instanciate a specialized version of nixpkgs
|
# Instanciate a specialized version of nixpkgs
|
||||||
mkSystemNixpkgs =
|
mkSystemNixpkgs =
|
||||||
system: version:
|
system: version:
|
||||||
let
|
let
|
||||||
args =
|
args = mkNixpkgsConfigPerSystem system version;
|
||||||
if system == "nixos" then
|
|
||||||
{ }
|
|
||||||
else
|
|
||||||
(import "${sources.liminix}/devices/${system}").system
|
|
||||||
// {
|
|
||||||
overlays = [ (import "${sources.liminix}/overlay.nix") ];
|
|
||||||
config = {
|
|
||||||
allowUnsupportedSystem = true; # mipsel
|
|
||||||
permittedInsecurePackages = [
|
|
||||||
"python-2.7.18.8" # Python < 3 is needed for kernel backports.
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
import (mkNixpkgs' version) args;
|
import (mkNixpkgs' version) args;
|
||||||
|
|
||||||
|
@ -93,19 +96,31 @@ in
|
||||||
{
|
{
|
||||||
registry = {
|
registry = {
|
||||||
zyxel-nwa50ax = {
|
zyxel-nwa50ax = {
|
||||||
evalConfig = import "${sources.liminix}/lib/eval-config.nix" { nixpkgs = sources.nixos-unstable; };
|
evalConfig = import "${sources.liminix}/lib/eval-config.nix" {
|
||||||
|
nixpkgs = sources.nixos-unstable;
|
||||||
|
};
|
||||||
|
|
||||||
defaults = _: {
|
defaults = _: {
|
||||||
nixpkgs.hostPlatform = {
|
nixpkgs = {
|
||||||
config = "mipsel-unknown-linux-musl";
|
source = sources.nixos-unstable;
|
||||||
gcc = {
|
config = {
|
||||||
abi = "32";
|
allowUnsupportedSystem = true; # mipsel
|
||||||
arch = "mips32"; # mips32r2?
|
permittedInsecurePackages = [
|
||||||
|
"python-2.7.18.8" # Python < 3 is needed for kernel backports.
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
hostPlatform = {
|
||||||
|
config = "mipsel-unknown-linux-musl";
|
||||||
|
gcc = {
|
||||||
|
abi = "32";
|
||||||
|
arch = "mips32"; # mips32r2?
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# It's impure, but who cares?
|
||||||
|
# Can Flakes do that?
|
||||||
|
buildPlatform = builtins.currentSystem;
|
||||||
};
|
};
|
||||||
# It's impure, but who cares?
|
|
||||||
# Can Flakes do that?
|
|
||||||
nixpkgs.buildPlatform = builtins.currentSystem;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue