blob: 39a8b0e31babefe221cb68d14a959823c4719cdc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
{ config, pkgs, ... }:
let
hello = pkgs.runCommand "hello-0.0.0" {} ''
mkdir -p $out/bin $out/lib
touch $out/bin/hello $out/lib/libhello.dylib
'';
in
{
environment.systemPackages = [ hello ];
test = ''
echo checking hello binary in /sw/bin >&2
test -e ${config.out}/sw/bin/hello
test "$(readlink -f ${config.out}/sw/bin/hello)" = "${hello}/bin/hello"
echo checking for unexpected paths in /sw/bin >&2
test -e ${config.out}/sw/lib/libhello.dylib && return
'';
}
|