enhancement: remove impure <nixpkgs>
Co-Authored-By: Jamie Magee <jamie.magee@gmail.com> Co-Authored-By: Doron Behar <doron.behar@gmail.com>
This commit is contained in:
parent
f1b7ff92cd
commit
d84f0810be
4 changed files with 35 additions and 17 deletions
19
flake.lock
generated
19
flake.lock
generated
|
|
@ -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
|
||||||
|
|
|
||||||
21
flake.nix
21
flake.nix
|
|
@ -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
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
@ -494,6 +491,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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue