feat: update to latest linux kernel

This commit is contained in:
DACHXY 2025-01-17 15:21:32 +08:00
parent 5a383e7aad
commit 020ec5e967
15 changed files with 204 additions and 196 deletions

View file

@ -1,5 +1,8 @@
{
pkgs ? import <nixpkgs> { },
imagemagick,
file,
stdenvNoCC,
...
}:
let
@ -9,7 +12,7 @@ let
url,
sha256,
}:
pkgs.stdenvNoCC.mkDerivation rec {
stdenvNoCC.mkDerivation rec {
inherit name;
pname = name;
@ -19,11 +22,31 @@ let
dontUnpack = true;
buildInputs = [ ];
installPhase = ''
mkdir -p $out/share/icons
cp -r $src $out/share/icons
nativeBuildInputs = [
imagemagick
file
];
buildPhase = ''
mkdir -p $out/share/icons/hicolor/256x256/apps
mkdir -p $out/share/icons/hicolor/scalable/apps
fileType=$(file -b --mime-type $src)
if [ "$fileType" = "image/png" ]; then
echo "Processing PNG image..."
magick $src -resize 256x256 $out/share/icons/hicolor/256x256/apps/${name}.png
elif [ "$fileType" = "image/svg+xml" ]; then
echo "Processing SVG image..."
cp $src $out/share/icons/hicolor/scalable/apps/${name}.svg
else
echo "Unsupported image type: $fileType"
exit 1
fi
'';
pathsToLink = [
"/share/icons"
];
};
in
makeIconPkg