* Allow .so dynamic libraries on Darwin
This code is a hack that applied only to Darwin, it collects all
required dynamic libraries into a single directory. It does this by
listing all library dirs and then linkin all dynamic libraries in them.
Before this change, it would link only `*.dylib` files. This was a
problem, because (weirdly) a lot of libraries in Nixpkgs actually
produce .so even on Darwin (and, weirdly, this somehow works).
So we now link `.so` files as well.
* Fix linking of dynamic libs with static on Darwin
This piece of code `ln`s all libraries we might want to link with into a
single directory and then hides all previous directories from Cabal.
The problem is that this code only `ln`s dynamic libraries, however we
might want to link with some library that only comes in a static
version.
So, `ln` static `.a` libraries too so that they are found when linking.
This fires at least 3 times for every haskell.nix project (bootstrap
happy, alex, and hscolor), and then again for every `cabalProject` and
`hackage-package`. Moreover, it isn't actually informative: it just says
`ghc` and `ghc-pkg` for the executables being used.
* Remove unused (and broken) test files
* Make default.nix expose pinned nixpkgs
Also make `nixpkgs/default.nix` just an attribute set of sources.
This is simpler, and consistent with what e.g. `niv` does.
* Add backwards compatibility shim, and version argument to allow evolution in future
* Fix some missed things
* Fix and improve quickstart
* Define release.nix in terms of ci.nix
Beef up ci.nix to handle the same things as release.nix, then implement
the one in terms of the other.
* Fix infinite loop in evaluating release.nix with high ifdLevel
* Add tests to cross-compile
* Remove obsolete fix
* Do generic platform filtering
* Undefined variable
* Extract ci-lib.nix
* More undefined variables
* Use filterAttrsOnlyRecursive to avoid forcing all the drv attributes
* Set ifdLevel 0 to see if it fixes hydra eval
* Turn off tests on aarch64 cross
* Ifd level 1
* Ifd level 2
* Ifd level 3
* Maybe it's required that's too big?
Co-authored-by: Hamish Mackenzie <Hamish.Mackenzie@iohk.io>
When no name is provided to `cleanSourceWith` or `cleanGit` we
currently use `baseNameOf src` as a default.
This was cute, but it lead to cache misses. For instance if
`x = cleanSourceWith { src = ./.; }` then `baseName src`
will be different when `src` resolves to "/nix/store/X"
than when it is in a local directory. If people use
git worktrees they also may wind up with different
values for `name`. Anything that depends on `x.name` will
propagate the issue.
This change uses `subDir` if present or if it is not it encourages
adding a suitable `name` with a warning message.