This repository has no description
0

Configure Feed

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

run: split into separate file

+55 -42
+1 -42
all-packages.nix
··· 6 6 }: 7 7 8 8 let 9 - mkRun = 10 - { path, builder }: 11 - args: command: 12 - let 13 - setup = 14 - if args ? src then 15 - '' 16 - cp -r ${args.src} src 17 - cd src 18 - chmod -R u+w . 19 - '' 20 - else 21 - ""; 22 - in 23 - derivation ( 24 - { 25 - system = currentSystem; 26 - inherit builder; 27 - args = [ 28 - "-euc" 29 - '' 30 - if [ 0 -eq "$NIX_BUILD_CORES" ]; then 31 - NIX_BUILD_CORES=$(${pkgs.busybox}/bin/nproc) 32 - fi 33 - exec ${builder} -eux $commandPath 34 - '' 35 - ]; 36 - PATH = lib.makeBinPath ((args.path or [ ]) ++ path); 37 - command = setup + "\n" + command; 38 - passAsFile = [ "command" ]; 39 - } 40 - // (removeAttrs args [ "srcPath" ]) 41 - ); 42 - 43 9 wasmpkgs = 44 10 { 45 - inherit lib inputs; 46 - run = mkRun { 47 - path = [ 48 - pkgs.busybox 49 - pkgs.bash 50 - ]; 51 - builder = "${pkgs.bash}/bin/bash"; 52 - }; 11 + inherit lib inputs currentSystem; 53 12 } 54 13 // lib.packagesFromDirectoryRecursive { 55 14 callPackage = lib.callPackageWith pkgs;
+54
packages/run/package.nix
··· 1 + { 2 + lib, 3 + currentSystem, 4 + bash, 5 + busybox, 6 + }: 7 + 8 + { 9 + path ? [ ], 10 + src ? null, 11 + ... 12 + }@args: 13 + command: 14 + 15 + let 16 + setup = 17 + if src != null then 18 + '' 19 + cp -r ${src} src 20 + cd src 21 + chmod -R u+w . 22 + '' 23 + else 24 + ""; 25 + in 26 + 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 -eux $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 + "src" 53 + ]) 54 + )