[NixOS] Build runc from source

This commit is contained in:
2024-12-30 22:55:46 -07:00
parent 2d4c1df31f
commit 5b3915ad27
4 changed files with 18 additions and 1 deletions

View File

@@ -52,6 +52,7 @@
rclone
rcm
ripgrep
runc
silver-searcher
skim
sshfs

View File

@@ -45,6 +45,7 @@
};
nixpkgs.overlays = [
(import ./runc-overlay.nix)
(import ./overlay.nix)
] ++ (if config.imalison.nixOverlay.enable then [ inputs.nix.overlays.default ] else []);

View File

@@ -11,8 +11,9 @@ final: prev:
dontBuild = true;
dontConfigure = true;
nativeBuildInputs = [];
nativeBuildInputs = [final.installShellFiles];
buildInputs = [];
outputs = ["out" "man"];
installPhase = ''
mkdir -p "$out/bin"
@@ -38,6 +39,10 @@ final: prev:
EOF
chmod +x "$out/bin/runc"
installManPage ${prev.runc.man}/*/*.[1-9]
mkdir -p $man
touch $man/afile
'';
# Optionally inherit original metadata

10
nixos/runc-overlay.nix Normal file
View File

@@ -0,0 +1,10 @@
final: prev: {
runc = prev.runc.overrideAttrs (_: {
src = prev.fetchFromGitHub {
repo = "runc";
owner = "colonelpanic8";
rev = "4b809881415e99247d8dea2eda862491dbc9acd2";
sha256 = "sha256-XOslGNu+ix52938SnnhmWKUaZaTQx9+/o74tnAjmo3I=";
};
});
}