1{ stdenv, cabalProject', haskellLib, recurseIntoAttrs, testSrc, compiler-nix-name }:
7 hackage = import ./hackage;
10 name = "extra-hackage-demo";
11 index = ./01-index.tar.gz;
14 demo-src = ./external-package-demo-0.1.0.0.tar.gz;
16 project = cabalProject' {
17 inherit compiler-nix-name;
18 src = testSrc "extra-hackage/external-package-user";
20 extra-hackages = [ hackage ];
21 extra-hackage-tarballs = [ tarball ];
24 # To prevent nix-build from trying to download it from the
26 { packages.external-package-demo.src = demo-src; }
29 packages = project.hsPkgs;
33 inherit (project) plan-nix;
35 run = stdenv.mkDerivation {
36 name = "external-hackage-test";
39 exe="${packages.external-package-user.components.exes.external-package-user}/bin/external-package-user${stdenv.hostPlatform.extensions.executable}"
40 size=$(command stat --format '%s' "$exe")
41 printf "size of executable $exe is $size. \n" >& 2
42 # fixme: run on target platform when cross-compiled
43 printf "checking whether executable runs... " >& 2
44 cat ${haskellLib.check packages.external-package-user.components.exes.external-package-user}/test-stdout
45 '' + (if stdenv.hostPlatform.isMusl
47 printf "checking that executable is statically linked... " >& 2
48 (ldd $exe 2>&1 || true) | grep -i "not a"
51 # Skip this on aarch as we do not have an `ldd` tool
52 optionalString (!stdenv.hostPlatform.isAarch32 && !stdenv.hostPlatform.isAarch64) (''
53 printf "checking that executable is dynamically linked to system libraries... " >& 2
54 '' + optionalString stdenv.isLinux ''
55 ldd $exe | grep libpthread
56 '' + optionalString stdenv.isDarwin ''
57 otool -L $exe |grep .dylib
61 meta.platforms = platforms.all;
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list