mirror of
https://github.com/LnL7/nix-darwin.git
synced 2024-09-11 12:49:18 +03:00
system-packages: verify libraries are not linked
By default environment.pathsToLink does not include /lib so libraries should not be exposed directly in the system output.
This commit is contained in:
parent
236d9b0c2d
commit
a1c56d5492
@ -1,10 +1,21 @@
|
|||||||
{ config, pkgs, ... }:
|
{ 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 = [ pkgs.hello ];
|
environment.systemPackages = [ pkgs.hello ];
|
||||||
|
|
||||||
test = ''
|
test = ''
|
||||||
echo checking hello binary in /sw/bin >&2
|
echo checking hello binary in /sw/bin >&2
|
||||||
|
test -e ${config.out}/sw/bin/hello
|
||||||
test "$(readlink -f ${config.out}/sw/bin/hello)" = "${pkgs.hello}/bin/hello"
|
test "$(readlink -f ${config.out}/sw/bin/hello)" = "${pkgs.hello}/bin/hello"
|
||||||
|
|
||||||
|
echo checking for unexpected paths in /sw/bin >&2
|
||||||
|
! test -e ${config.out}/sw/lib/libhello.dylib
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user