mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2026-12-06 07:53:30 +01:00
Merge pull request #1723 from Malix-Labs/remove-impure-nixpkgs
enhancement: remove impure `<nixpkgs>`
This commit is contained in:
4 files changed
+35
-17
No files matched your search
Generated
+18
-1
@@ -1,6 +1,23 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"root": {}
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1767892417,
|
||||||
|
"narHash": "sha256-8bW3q88CEg2u4hSP66Vf4lpbLonHz7hqDNBMcCY7E9U=",
|
||||||
|
"rev": "3497aa5c9457a9d88d71fa93a4a8368816fbeeba",
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://releases.nixos.org/nixos/unstable/nixos-26.05pre924538.3497aa5c9457/nixexprs.tar.xz"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
"version": 7
|
"version": 7
|
||||||
|
|||||||
@@ -1,13 +1,17 @@
|
|||||||
{
|
{
|
||||||
description = "nixos-hardware";
|
description = "nixos-hardware";
|
||||||
|
|
||||||
|
inputs.nixpkgs.url = "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz";
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
{ self, ... }:
|
{ self, nixpkgs, ... }:
|
||||||
let
|
let
|
||||||
# Import private inputs (for development)
|
# Import private inputs (for development)
|
||||||
privateInputs =
|
privateInputs =
|
||||||
(import ./tests/flake-compat.nix {
|
(import ./tests/flake-compat.nix {
|
||||||
src = ./tests;
|
src = {
|
||||||
|
outPath = self.outPath + "/tests";
|
||||||
|
};
|
||||||
}).defaultNix;
|
}).defaultNix;
|
||||||
|
|
||||||
systems = [
|
systems = [
|
||||||
@@ -23,17 +27,10 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
# Helper to iterate over systems
|
# Helper to iterate over systems
|
||||||
eachSystem =
|
eachSystem = f: nixpkgs.lib.genAttrs systems (system: f nixpkgs.legacyPackages.${system} system);
|
||||||
f:
|
|
||||||
privateInputs.nixos-unstable-small.lib.genAttrs systems (
|
|
||||||
system: f privateInputs.nixos-unstable-small.legacyPackages.${system} system
|
|
||||||
);
|
|
||||||
|
|
||||||
eachSystemFormat =
|
eachSystemFormat =
|
||||||
f:
|
f: nixpkgs.lib.genAttrs formatSystems (system: f nixpkgs.legacyPackages.${system} system);
|
||||||
privateInputs.nixos-unstable-small.lib.genAttrs formatSystems (
|
|
||||||
system: f privateInputs.nixos-unstable-small.legacyPackages.${system} system
|
|
||||||
);
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -497,6 +494,8 @@
|
|||||||
run-tests = pkgs.callPackage ./tests/run-tests.nix {
|
run-tests = pkgs.callPackage ./tests/run-tests.nix {
|
||||||
inherit self;
|
inherit self;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
mnt-reform-kernel-patches = pkgs.callPackage ./mnt/reform/updateKernelPatches.nix { };
|
||||||
}
|
}
|
||||||
// pkgs.lib.optionalAttrs (system == "aarch64-linux") {
|
// pkgs.lib.optionalAttrs (system == "aarch64-linux") {
|
||||||
# Boot images for NXP i.MX boards (aarch64-linux only)
|
# Boot images for NXP i.MX boards (aarch64-linux only)
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
fetchFromGitLab,
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
nixpkgs = import <nixpkgs> { };
|
|
||||||
pkgs = nixpkgs.pkgs;
|
|
||||||
lib = nixpkgs.lib;
|
|
||||||
sources = lib.importJSON ./sources.json;
|
sources = lib.importJSON ./sources.json;
|
||||||
reformDebianPackages = pkgs.fetchFromGitLab sources.reformDebianPackages;
|
reformDebianPackages = fetchFromGitLab sources.reformDebianPackages;
|
||||||
in
|
in
|
||||||
map (lib.removePrefix "${reformDebianPackages}/") (
|
map (lib.removePrefix "${reformDebianPackages}/") (
|
||||||
lib.filesystem.listFilesRecursive "${reformDebianPackages}/linux/patches${lib.versions.majorMinor sources.modDirVersion}"
|
lib.filesystem.listFilesRecursive "${reformDebianPackages}/linux/patches${lib.versions.majorMinor sources.modDirVersion}"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
nix eval --file updateKernelPatches.nix > kernelPatches.nix
|
nix eval .#mnt-reform-kernel-patches > kernelPatches.nix
|
||||||
nix fmt kernelPatches.nix
|
nix fmt kernelPatches.nix
|
||||||
Reference in new issue
Block a user