This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

run: add basic stdenv

makes nix develop work

+68 -44
-2
packages/musl/package.nix
··· 27 27 # outputs = [ "out" "dev" ]; 28 28 } 29 29 '' 30 - ls 31 - 32 30 cat >config.mak <<EOF 33 31 ARCH=wasm32 34 32 prefix=$out
+68 -42
packages/run/package.nix
··· 5 5 busybox, 6 6 }: 7 7 8 - { 9 - path ? [ ], 10 - src ? null, 11 - ... 12 - }@args: 13 - command: 8 + let 9 + run = 10 + { 11 + path ? [ ], 12 + passAsFile ? [ ], 13 + ... 14 + }@args: 15 + command: 16 + 17 + derivation ( 18 + { 19 + system = currentSystem; 20 + builder = "${bash}/bin/bash"; 21 + args = [ 22 + "-euc" 23 + '' 24 + if [[ -v stdenv ]]; then 25 + source $stdenv/setup 26 + build 27 + else 28 + source $commandPath 29 + fi 30 + '' 31 + ]; 32 + PATH = lib.makeBinPath ( 33 + path 34 + ++ [ 35 + bash 36 + busybox 37 + ] 38 + ); 39 + inherit command; 40 + passAsFile = [ "command" ] ++ passAsFile; 41 + } 42 + // (removeAttrs args [ 43 + "path" 44 + "passAsFile" 45 + ]) 46 + ); 14 47 15 - let 16 - setup = 17 - if src != null then 18 - '' 19 - cp -r ${src} src 20 - cd src 21 - chmod -R u+w . 48 + stdenv = 49 + run 50 + { 51 + name = "stdenv"; 52 + setup = '' 53 + : ${"$"}{outputs:=out} 54 + 55 + if [ 0 -eq "$NIX_BUILD_CORES" ]; then 56 + NIX_BUILD_CORES=$(${busybox}/bin/nproc) 57 + fi 58 + 59 + eval "_build() { $(cat $commandPath); }" 60 + build() { 61 + if [[ -v src ]]; then 62 + cp -r $src src 63 + cd src 64 + chmod -R u+w . 65 + unset src 66 + fi 67 + _build 68 + } 69 + ''; 70 + passAsFile = [ "setup" ]; 71 + } 22 72 '' 23 - else 24 - ""; 73 + mkdir $out 74 + cp $setupPath $out/setup 75 + chmod +x $out/setup 76 + ''; 25 77 in 26 78 27 - derivation ( 28 - { 29 - system = currentSystem; 30 - builder = "${bash}/bin/bash"; 31 - args = [ 32 - "-euc" 33 - '' 34 - if [ 0 -eq "$NIX_BUILD_CORES" ]; then 35 - NIX_BUILD_CORES=$(${busybox}/bin/nproc) 36 - fi 37 - exec ${bash}/bin/bash -euxo pipefail $commandPath 38 - '' 39 - ]; 40 - PATH = lib.makeBinPath ( 41 - path 42 - ++ [ 43 - bash 44 - busybox 45 - ] 46 - ); 47 - command = setup + "\n" + command; 48 - passAsFile = [ "command" ]; 49 - } 50 - // (removeAttrs args [ 51 - "path" 52 - ]) 53 - ) 79 + args: run ({ inherit stdenv; } // args)