1
1
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-08-16 16:10:39 +03:00
nix-darwin/tests/system-packages.nix

22 lines
511 B
Nix
Raw Normal View History

2017-03-11 12:03:37 +03:00
{ 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
2017-03-11 12:03:37 +03:00
{
2019-01-19 01:36:15 +03:00
environment.systemPackages = [ hello ];
2017-03-11 12:03:37 +03:00
test = ''
echo checking hello binary in /sw/bin >&2
test -e ${config.out}/sw/bin/hello
2019-01-19 01:36:15 +03:00
test "$(readlink -f ${config.out}/sw/bin/hello)" = "${hello}/bin/hello"
echo checking for unexpected paths in /sw/bin >&2
2019-01-19 01:36:15 +03:00
test -e ${config.out}/sw/lib/libhello.dylib && return
2017-03-11 12:03:37 +03:00
'';
}