Yesterday with @infinisil on #nixos, he pointed me to: peti/jailbreak-cabal#7 after a good deal of time wrangling through a package to make it work.
The `nix-build -K` command, is very handy for debugging things like these, again I learnt from infinisil.
And after much experimenting and looking through, it turned out that jailbreaking wasn't working as expected, and its documentation could point it out to avoid future confusion.
webify needs a bump in the cabal file. As the last upstream commit is
two years ago, I think it makes sense to not wait for upstream to merge
the PR [0] and release a new version.
[0] https://github.com/ananthakumaran/webify/pull/27
This makes packages use lapack and blas, which can wrap different
BLAS/LAPACK implementations.
treewide: cleanup from blas/lapack changes
A few issues in the original treewide:
- can’t assume blas64 is a bool
- unused commented code
This closes#79441.
ghcWithPackages is using `ghc-pkg recache` to build its package
database. By doing so, it overrides the `package.cache[.lock]` files.
Details are unclear, but GHC 8.10 changed a bit the behavior.
Previously, it was unconditionally replacing the files by new ones. Now
it tries to open (for modification) the files. These files are symlinks
to another nix derivation, which is hence read-only.
This commit removes the files before running `ghc-pkg recache`, hence it
will just write the new files.
Tested with `haskellPackages.ghcWithPackages` (i.e. GHC 8.8) and
`haskell.packages.ghc8101.ghcWithPackages` (i.e GHC 8.10) with the
following nix file, at the root of the nixpkgs repository:
```
with import ./. {
overlays = [
(
self: super: {
haskellPackages = super.haskell.packages.ghc8101.override {
overrides = selfh: superh: {
th-lift-instances = super.haskell.lib.doJailbreak superh.th-lift-instances;
th-expand-syns = super.haskell.lib.doJailbreak superh.th-expand-syns;
th-reify-many = super.haskell.lib.doJailbreak superh.th-reify-many;
th-orphans = super.haskell.lib.doJailbreak superh.th-orphans;
haskell-src-meta = super.haskell.lib.doJailbreak superh.haskell-src-meta;
};
};
}
)
];
};
haskellPackages.ghcWithPackages(p:[p.PyF])
```
This will test with GHC 8.10. Comment out the `overlays` to test with
GHC 8.8.
The configuration-tensorflow.nix file specified several overrides for version
0.2.x packages, but those packages are no longer included in our package set
because they are so old. (Current versions seem to be in the range of 0.6.x.)
I fixed the evalution errors, but I did not verify whether these packages
actually build with the newer versions.
I checked through haskellPackages looking for packages that were
marked as broken, but successfully built.
I identified these 162 packages that were marked as broken in spite of
building successfully for me with NIXPKGS_ALLOW_BROKEN.
`cabal2nix` fails to evaluate due to attempting to
evaluate `pkgs.haskellPackages.hackage-db_2_1_0`, which
does not exist. However, the default
`pkgs.haskellPackages.hackage-db` is already version 2.1.0,
so the fix is simple: go back to using the default version.
Ping @cdepillabout because purescript is broken.
Ping @kiwi because matterhorn is broken.
Ping @roberth because arion-compose is broken.
Ping @psibi because persistent-postgresql is broken.
- tasty-tap's tests were failing. In
https://github.com/NixOS/nixpkgs/pull/71017 a patch generated from a
PR was applied to fix this.
- That PR has now been merged into tasty-tap and was released with
version 0.1.0.
- tasty-tap is now at version 0.1.0 in nixpkgs and so the patch fails
to apply, breaking the build.
- Removed the patch and removed tasty-tap from list of broken
packages.
Current, the `cabal2nix` derivation contains both the executable, and a wrapper
that adds `nix` and `nix-prefetch-scripts`, which are required for some
features.
However, when calling `callCabal2nix` to create a derivation from a cabal file
at evaluation time,
these features are not actually used, but the huge closure of
`nix-prefetch-scripts` (which includes multiple vcs, as well as python and perl)
still needs to be fetched.
This commit splits cabal2nix into a lightweight version that is a standalone
static binary (`cabal2nix-unwrapped`), and a wrapper that includes the proper
dependencies in the path for full usage of the command line
utility (`cabal2nix`).
This commit also switches to the default ghc, to reduce the likelyhood of
building a different ghc when calling `callCabal2nix`.