kernel: buildLinux replaces import ./generic.nix

- defined buildLinux as generic.nix instead of manual-config.nix. This
makes kernel derivations a tad more similar to your typical derivations.
- moved $buildRoot to within the source folder, this way it doesn't have to be created before the unpackPhase
and make it easier to work on kernel source without running the unpackPhase
This commit is contained in:
Matthieu Coudron
2018-02-07 10:07:13 +09:00
parent d80057f245
commit f620b1b693
18 changed files with 76 additions and 44 deletions
+3 -3
View File
@@ -50,13 +50,13 @@ ls $NIXPKGS/pkgs/os-specific/linux/kernel | while read FILE; do
# Rewrite the expression
sed -i -e '/version = /d' -e '/modDirVersion = /d' $NIXPKGS/pkgs/os-specific/linux/kernel/$FILE
if grep -q '^[0-9]\+.[0-9]\+$' <<< "$V"; then
sed -i "\#import ./generic.nix (args // rec {#a \ modDirVersion = \"${V}.0\";" $NIXPKGS/pkgs/os-specific/linux/kernel/$FILE
sed -i "\#buildLinux (args // rec {#a \ modDirVersion = \"${V}.0\";" $NIXPKGS/pkgs/os-specific/linux/kernel/$FILE
fi
sed -i "\#import ./generic.nix (args // rec {#a \ version = \"$V\";" $NIXPKGS/pkgs/os-specific/linux/kernel/$FILE
sed -i "\#buildLinux (args // rec {#a \ version = \"$V\";" $NIXPKGS/pkgs/os-specific/linux/kernel/$FILE
# Commit the changes
git add -u $NIXPKGS/pkgs/os-specific/linux/kernel/$FILE
git commit -m "kernel: $OLDVER -> $V" >/dev/null 2>&1
echo "Updated $OLDVER -> $V"
done