Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 59 lines 1.1 kB view raw
1{ 2 cri-o-unwrapped, 3 runCommand, 4 makeWrapper, 5 lib, 6 extraPackages ? [ ], 7 runc, # Default container runtime 8 conntrack-tools, 9 crun, # Container runtime (default with cgroups v2 for podman/buildah) 10 conmon, # Container runtime monitor 11 util-linux, # nsenter 12 iptables, 13}: 14 15let 16 binPath = lib.makeBinPath ( 17 [ 18 runc 19 conntrack-tools 20 crun 21 conmon 22 util-linux 23 iptables 24 ] 25 ++ extraPackages 26 ); 27 28in 29runCommand cri-o-unwrapped.name 30 { 31 name = "${cri-o-unwrapped.pname}-wrapper-${cri-o-unwrapped.version}"; 32 inherit (cri-o-unwrapped) pname version passthru; 33 34 preferLocalBuild = true; 35 36 meta = builtins.removeAttrs cri-o-unwrapped.meta [ "outputsToInstall" ]; 37 38 outputs = [ 39 "out" 40 "man" 41 ]; 42 43 nativeBuildInputs = [ 44 makeWrapper 45 ]; 46 47 } 48 '' 49 ln -s ${cri-o-unwrapped.man} $man 50 51 mkdir -p $out/bin 52 ln -s ${cri-o-unwrapped}/etc $out/etc 53 ln -s ${cri-o-unwrapped}/share $out/share 54 55 for p in ${cri-o-unwrapped}/bin/*; do 56 makeWrapper $p $out/bin/''${p##*/} \ 57 --prefix PATH : ${binPath} 58 done 59 ''