New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
haskell: Fix developPackage ignoring extend #88841
base: haskell-updates
Are you sure you want to change the base?
haskell: Fix developPackage ignoring extend #88841
Conversation
e3d7e53
to
1b399af
Compare
overrides)) | ||
.callCabal2nix name root {}; | ||
let | ||
extendFix' = f: fixed: fix' (extends f fixed.__unfix__); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you be able to add a comment here on what extendFix'
is doing? It is not immediately obvious to me what it is doing, or why it would be needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We would like to call
extend
onself
, but that is not available. However for fixed points that were taken usingfix'
we can get the same effect by callingextends
on the__unfix__
attribute and taking the fixed point again.
Would that be OK?
@Aver1y Thanks for trying to fix this up. Two things:
cc @peti, @Ericson2314, and @matthewbauer to get some more eyeballs on this. |
Here is an example: default.nix { pkgs ? import <nixpkgs> {} }:
(pkgs.haskellPackages.extend (self: super: {
base-with-a-strange-name = self.base;
})).developPackage {
root = ./.;
} example.cabal name: example
version: 0.1.0.0
library
build-depends: base-with-a-strange-name Before patch
After
|
1b399af
to
0cf7349
Compare
0cf7349
to
924e509
Compare
Noticed the same pattern pop up here:
|
Maybe we could even add it to |
7a3d6f0
to
ad62b57
Compare
2c7ad11
to
0e5f7e8
Compare
7b89288
to
d8d2e94
Compare
ba32886
to
c9e5a3f
Compare
a0a57d7
to
952ebcf
Compare
4c606a9
to
3ae580b
Compare
56fa6fc
to
f3cb253
Compare
I marked this as stale due to inactivity. → More info |
Motivation for this change
Previously
developPackage
would ignoreextend
, becauseextensible-self
would still refer to the unextended package set even after an
extend
,i.e.:
This fixes this by using
extends
onself.__unfix__
instead of usingextensible-self
. Sinceextensible-self
wasn't otherwise used it wasremoved.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)