nix-helpers: 404cb2973717e60ea802bd21251368c7c850d15e
1: { bash, coreutils, fail, hello, lib, mupdf, runCommand, writeScript }:
2:
3: with lib;
4: with rec {
5: makeCommand = path: output:
6: with { esc = ''"$'' + output + ''"/${escapeShellArg path}''; }; ''
7: if [[ -e ${esc} ]]
8: then
9: "${coreutils}/bin/rm" -vrf ${esc}
10: fi
11: true # End with a success code
12: '';
13:
14: makeCommands = outputs: p:
15: concatStringsSep "\n" (map (makeCommand p) outputs);
16: };
17: pkg: paths:
18: overrideDerivation pkg (old: {
19: builder = writeScript "${old.name}-without-bits" ''
20: #!${bash}/bin/bash
21: "${old.builder}" "$@"
22: ${concatStringsSep "\n"
23: (map (makeCommands (old.outputs or [ "out" ])) paths)}
24: '';
25: })
Generated by git2html.