Compare commits
2 Commits
8660752e1b
...
6436a82d58
| Author | SHA1 | Date | |
|---|---|---|---|
| 6436a82d58 | |||
| 9473348b57 |
11
.gitea/workflows/checks.yaml
Normal file
11
.gitea/workflows/checks.yaml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
name: checks
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
jobs:
|
||||||
|
checks:
|
||||||
|
runs-on: nix
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- run: nix flake check -L --all-systems
|
||||||
31
flake.nix
31
flake.nix
@@ -36,8 +36,11 @@
|
|||||||
let
|
let
|
||||||
isDrv = lib.isDerivation pkg;
|
isDrv = lib.isDerivation pkg;
|
||||||
isAttrs = lib.isAttrs pkg;
|
isAttrs = lib.isAttrs pkg;
|
||||||
|
isSameSystem = lib.meta.availableOn pkgs.stdenv.hostPlatform pkg;
|
||||||
in
|
in
|
||||||
if isDrv then
|
if !isSameSystem then
|
||||||
|
[ ]
|
||||||
|
else if isDrv then
|
||||||
[
|
[
|
||||||
(lib.nameValuePair name pkg)
|
(lib.nameValuePair name pkg)
|
||||||
]
|
]
|
||||||
@@ -48,14 +51,32 @@
|
|||||||
flatPackages = builtins.listToAttrs (
|
flatPackages = builtins.listToAttrs (
|
||||||
lib.lists.flatten (lib.mapAttrsToList (name: pkg: recursePackage name pkg) scope)
|
lib.lists.flatten (lib.mapAttrsToList (name: pkg: recursePackage name pkg) scope)
|
||||||
);
|
);
|
||||||
workingPackages = lib.filterAttrs (_: pkg: !pkg.meta.broken) self.packages.${system};
|
workingPackages = lib.filterAttrs (_: pkg: !pkg.meta.broken) flatPackages;
|
||||||
|
|
||||||
|
recursePackageSets =
|
||||||
|
pkg:
|
||||||
|
let
|
||||||
|
isDrv = lib.isDerivation pkg;
|
||||||
|
isAttrs = lib.isAttrs pkg;
|
||||||
|
isSameSystem = lib.meta.availableOn pkgs.stdenv.hostPlatform pkg;
|
||||||
|
in
|
||||||
|
if isDrv && isSameSystem then
|
||||||
|
pkg
|
||||||
|
else if isAttrs then
|
||||||
|
lib.mapAttrs (_: subPkg: recursePackageSets subPkg) pkg
|
||||||
|
else
|
||||||
|
null;
|
||||||
|
|
||||||
|
# Recursively filter out nulls and remove overrides (probably a btter way to do this but it works for now)
|
||||||
|
packageSets = lib.filterAttrsRecursive (k: v: v != null && k != "override") (
|
||||||
|
lib.mapAttrs (name: pkg: recursePackageSets pkg) scope
|
||||||
|
);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
inherit packageSets;
|
||||||
inherit flatPackages;
|
inherit flatPackages;
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
packages = lib.filterAttrs (
|
packages = packageSets;
|
||||||
_: pkg: lib.isDerivation pkg && (lib.meta.availableOn pkgs.stdenv.hostPlatform pkg)
|
|
||||||
) scope;
|
|
||||||
checks = lib.mapAttrs' (n: lib.nameValuePair "package-${n}") workingPackages;
|
checks = lib.mapAttrs' (n: lib.nameValuePair "package-${n}") workingPackages;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -13,10 +13,6 @@ let
|
|||||||
hash = "sha256-iE4lqyr3zmLcgFnsrDvQ/CKUV15ijqmIbUIs9sgMECg=";
|
hash = "sha256-iE4lqyr3zmLcgFnsrDvQ/CKUV15ijqmIbUIs9sgMECg=";
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
lib.packagesFromDirectoryRecursive {
|
lib.makeScope newScope (self: {
|
||||||
inherit callPackage newScope;
|
ath12k-tools = self.callPackage ./ath12k-tools.nix { inherit src; };
|
||||||
directory = ./tools;
|
})
|
||||||
}
|
|
||||||
# lib.makeScope newScope (self: {
|
|
||||||
# ath12k-tools = self.callPackage ./ath12k-tools.nix { inherit src; };
|
|
||||||
# })
|
|
||||||
|
|||||||
@@ -34,10 +34,10 @@ stdenv.mkDerivation (
|
|||||||
tree
|
tree
|
||||||
];
|
];
|
||||||
unpackPhase = ''
|
unpackPhase = ''
|
||||||
msiextract -C . $src
|
msiextract -C . "$src"
|
||||||
'';
|
'';
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
mkdir -p $out/lib/firmware/qcom/x1e80100/microsoft/Romulus
|
mkdir -p "$out/lib/firmware/qcom/x1e80100/microsoft/Romulus"
|
||||||
for file in ${lib.concatStringsSep " " fw_files}; do
|
for file in ${lib.concatStringsSep " " fw_files}; do
|
||||||
echo -e "\tSearching for $file..."
|
echo -e "\tSearching for $file..."
|
||||||
fw_path=$(find . -type f -name "$file" -print | head -n 1)
|
fw_path=$(find . -type f -name "$file" -print | head -n 1)
|
||||||
@@ -48,7 +48,7 @@ stdenv.mkDerivation (
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
cp $out/lib/firmware/qcom/x1e80100/microsoft/Romulus/qcdxkmsuc8380.mbn $out/lib/firmware/qcom/x1e80100/microsoft/qcdxkmsuc8380.mbn
|
cp "$out/lib/firmware/qcom/x1e80100/microsoft/Romulus/qcdxkmsuc8380.mbn" "$out/lib/firmware/qcom/x1e80100/microsoft/qcdxkmsuc8380.mbn"
|
||||||
'';
|
'';
|
||||||
meta = {
|
meta = {
|
||||||
platforms = [ "aarch64-linux" ];
|
platforms = [ "aarch64-linux" ];
|
||||||
|
|||||||
Reference in New Issue
Block a user