2017-03-11 10:03:37 +01:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
2019-01-18 23:18:45 +01:00
|
|
|
let
|
|
|
|
hello = pkgs.runCommand "hello-0.0.0" {} ''
|
|
|
|
mkdir -p $out/bin $out/lib
|
|
|
|
touch $out/bin/hello $out/lib/libhello.dylib
|
|
|
|
'';
|
|
|
|
in
|
|
|
|
|
2017-03-11 10:03:37 +01:00
|
|
|
{
|
|
|
|
environment.systemPackages = [ pkgs.hello ];
|
|
|
|
|
|
|
|
test = ''
|
|
|
|
echo checking hello binary in /sw/bin >&2
|
2019-01-18 23:18:45 +01:00
|
|
|
test -e ${config.out}/sw/bin/hello
|
2019-01-18 23:13:42 +01:00
|
|
|
test "$(readlink -f ${config.out}/sw/bin/hello)" = "${pkgs.hello}/bin/hello"
|
2019-01-18 23:18:45 +01:00
|
|
|
|
|
|
|
echo checking for unexpected paths in /sw/bin >&2
|
|
|
|
! test -e ${config.out}/sw/lib/libhello.dylib
|
2017-03-11 10:03:37 +01:00
|
|
|
'';
|
|
|
|
}
|