about summary refs log tree commit diff
path: root/nixpkgs/pkgs/os-specific/darwin/stubs/default.nix
blob: e21f00beb5aa4cb30fa599261de8de468f10313c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{ lib, stdenv, writeScriptBin, runtimeShell }:

let fake = name: lib.overrideDerivation (writeScriptBin name ''
  #!${runtimeShell}
  echo >&2 "Faking call to ${name} with arguments:"
  echo >&2 "$@"
'') (drv: {
  name = "${name}-stub";
}); in

{
  setfile = fake "SetFile";
  rez = fake "Rez";
  derez = fake "DeRez";
}