erickomoto has joined #nix-darwin
alexteves has quit [Remote host closed the connection]
philr has quit [Ping timeout: 244 seconds]
hamishmack has quit [Ping timeout: 260 seconds]
hamishmack has joined #nix-darwin
<johnw> any news on cabal2nix?
<johnw> for now i'll just disable tests
hamishmack has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hamishmack has joined #nix-darwin
acowley has quit [Ping timeout: 245 seconds]
acowley has joined #nix-darwin
erickomoto has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
andreabedini has joined #nix-darwin
periklis has joined #nix-darwin
periklis has quit [Remote host closed the connection]
periklis has joined #nix-darwin
<manveru> awesome, got nix-docker and nixops working just in time
<manveru> this gonna be fun :)
__Sander__ has joined #nix-darwin
philr has joined #nix-darwin
andreabedini has quit [Ping timeout: 244 seconds]
periklis has quit [Ping timeout: 248 seconds]
<Enzime> LnL: what was the reasoning behind using callPackage override for apple_sdk frameworks from all-packages.nix?
alexteves has joined #nix-darwin
philr has quit [Quit: WeeChat 2.1]
<LnL> you mean like this? darwin.apple_sdk.frameworks.Foundation vs callPackage ./foo { inherit (darwin.apple_sdk.frameworks) Foundation; }
<Enzime> LnL: yeah
<LnL> a package definition should avoid depending on the attribute structure of packages IMHO
<LnL> it's up to the caller to provide the inputs that are needed
<LnL> there's also an annoying caveat for with statements that people have run into a bunch of times
<LnL> { stdenv, darwin }: stdenv.mkDerivation { meta.platforms = with stdenv.lib.platforms; darwin; }
<LnL> ^ what's meta.platforms here?
<Enzime> LnL: yeah, I've noticed that issue
<Enzime> pretty sure it's darwin from function arguemnts
<Enzime> arguments :P
<LnL> it won't be stdenv.lib.platforms.darwin
<Enzime> yeah
<Enzime> I like writing
<Enzime> with platforms; darwin ++ linux
<Enzime> but it didn't work because the derivations took darwin as an argument
<LnL> indeed, so you might not notice that locally but it breaks hydra evaluation
<LnL> > let foo = 1; in with { foo = 2; }; foo
<LnL> the with statement intentionally doesn't shadow existing variables
jtojnar has quit [Remote host closed the connection]
jtojnar has joined #nix-darwin
jtojnar has quit [Ping timeout: 264 seconds]
philr has joined #nix-darwin
<angerman> LnL: is there a way to enable nix-sanboxes with the docker image?
matthewbauer has joined #nix-darwin
<clever> copumpkin: was it you that was doing XNU builds?
<clever> copumpkin: what would it take to generate a pure disk image, and boot it in qemu, and run a single mach-o binary?
<clever> no gui stuff involved
erickomoto has joined #nix-darwin
philr has quit [Ping timeout: 240 seconds]
<LnL> angerman: sure, if you run the container with enough privileges
<angerman> LnL: you don’t happen to have instructions lying around somewhere? ;;)
<LnL> docker run --privileged
<LnL> you could probably only enable a subset, but I'm not sure what's specifically required
<LnL> clever: last I heard he had something that compiles, but it didn't get to executing the binary yet
<LnL> the puredarwin folks might have some instructions on building xnu, they posted a new beta recently
<clever> LnL: ah
__Sander__ has quit [Ping timeout: 276 seconds]
__Sander__ has joined #nix-darwin
Sonarpulse has quit [Ping timeout: 276 seconds]
jtojnar has joined #nix-darwin
Sonarpulse has joined #nix-darwin
__Sander__ has quit [Quit: Konversation terminated!]
matthewbauer has quit [Remote host closed the connection]
matthewbauer has joined #nix-darwin
erickomoto has quit [Ping timeout: 265 seconds]
<johnw> is haddock-library also failing to build for others?
<johnw> I get: Setup: ./haddock-library.cabal:5: Parse of field 'license-file' failed.
<LnL> I've seen some reports about doJailbreak messing up cabal files
<johnw> i'm not using doJailbreak on this library
<johnw> wow, lots of Haskell libraries need hacking this time around
<johnw> I'm racking up dontCheck and doJailbreak lines in my overlay...
<johnw> argh, hakyll still dies with Argument list too long
<johnw> upgrade attempt foiled
<johnw> still haven't moved beyond June 13th yet
<LnL> :/
<johnw> yeah, :(
<johnw> odd... even though I have: enclosed-exceptions = dontCheck super.enclosed-exceptions;
<johnw> I'm still getting test failures from enclosed-exceptions
<johnw> enclosed-exceptions = super.enclosed-exceptions_1_0_3; works though
Lisanna has quit [Quit: Lisanna]
<johnw> hmmm... can I not override the meaning of haskell.packages.ghc822.developPackage?
<johnw> LnL: ping
<johnw> have a nix-darwin q
<LnL> pong
<johnw> so, in a project's default.nix file, I have:
<johnw> { pkgs ? (import <darwin> {}).pkgs }: ...
<johnw> and in darwin.nix (that I use for configuring nix-darwin)
<johnw> I have nixpkgs.overlays = ....
<johnw> however
Lisanna has joined #nix-darwin
<johnw> it appears that pkgs.foo in my default.nix is not the overlaid foo from my nix-darwin configuration
<johnw> which I'm testing by defining pkgs.blah in my overlay
<johnw> but default.nix says that blah is not an attribute
* LnL squints
<johnw> all of my Haskell projects using pkgs.haskell.packages.ghc822.developPackage
<johnw> I'm trying to define an overlay so that when nix-shell evaluates this within my own environment
<johnw> I add some packages in that flycheck needs
<johnw> but for everyone else, that enrichment is not necessary
<johnw> but it appears I have no ability to overlay what nix-shell sees
<LnL> nix-instantiate '<darwin>' -A pkgs.lnl-zsh-completions #=> /nix/store/dihm3ynzg5c12pcdfqsdda02r8bp3gr3-lnl-zsh-completions-0.0.0.drv
<LnL> nix-instantiate '<nixpkgs>' -A pkgs.lnl-zsh-completions #=> error: attribute 'lnl-zsh-completions' in selection path 'pkgs.lnl-zsh-completions' not found
<johnw> yes, with nix-instantiate it works
<LnL> wasn't 100% sure if that worked but, seems to be fine
<johnw> here is my default.nix:
<johnw> I invoke with
<johnw> nix-shell --arg pkgs '(import <darwin> {}).pkgs'
<johnw> but the developPackage it's using there is *not* the one from my overlay
<johnw> the one in my overlay has a bogus definition that should produce an immediate error
<johnw> the problem here is that flycheck needs every package that might possibly be used, even if I'm not enabled the nix-shell that would pull it in. In this case: criterion
<johnw> for dir-locals.nix, I just added in criterion
<johnw> but with direnv, it just uses nix-shell under the hood
<johnw> so I want to extend the definition of developPackage to add criterion everywhere, since that's harmless
<LnL> not sure what's going on with the fixpoint, but it definitely gets the darwin pkgs
<johnw> you can drop the use of fix there, problem remains
<LnL> didn't even notice that, was talking about the nixpkgs/haskell fixpoints
<johnw> ah
<johnw> well, even if it's more basic
<johnw> change haskellPackages.developPackage to foo
<johnw> then define foo in some overlay
<johnw> it will say that 'foo' is an unknown attribute
<johnw> it's loading darwin for sure
<johnw> but it doesn't seem to be applying nixpkgs.overlays before handing 'pkgs' to nix-shell...?
<johnw> LnL: ^
<LnL> johnw: ^ doesn't abort
<johnw> right
<johnw> the same should be true even if you take haskell out of the mix
<LnL> hmm?
<johnw> you just said it doesn't abort
<johnw> but it should, right?
<LnL> I'd expect so
<LnL> if developPackage was used indirectly it could be because this isn't the correct root to override
<LnL> but it's literally the attribute that's used
<johnw> this isn't about haskellPackages
<johnw> I think it's about when overlays happen
<johnw> nix-darwin is processing the overlays at some point, but (import <darwin> {}).pkgs is the version before the overlays have happened
<LnL> oh
<LnL> evaluation aborted with the following error message: 'WAT'
<LnL> pkgs.foo
<johnw> with nix-shell?
<johnw> I get:
<johnw> error: undefined variable 'foo' at /Users/johnw/src/hnix/default.nix:6:1
<LnL> yes, only variable in your expression is pkgs
<johnw> oh, oops
<johnw> ok, that aborts
<johnw> phew
<johnw> hmm
<LnL> wait a minutee
<johnw> a minutee is how long a manatee waits
<LnL> nix-instantiate --option allow-import-from-derivation false wat.nix
hamishmack has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<LnL> it's trying to build cabal2nix at eval time
alexteves has quit [Remote host closed the connection]
matthewbauer has quit [Ping timeout: 240 seconds]
<LnL> I don't know what is using this, but I feel like that doesn't belong in nixpkgs https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/haskell-modules/make-package-set.nix#L135
<johnw> callCabal2Nix uses it
<johnw> and developPackage uses callCabal2Nix
<johnw> in order to determine the buildInputs from the .cabal file dynamically
hamishmack has joined #nix-darwin
<johnw> LnL: so, coming back to the beginning, why isn't my haskellPackages overlay doing the job then?
<LnL> pretty sure because of IFD
<LnL> something is running import /nix/store/<generated-by-cabal2nix-hnix-0.0.0.nix>
<LnL> and that's without whatever pkgs you passed in ofcorse
<LnL> nixpkgs shouldn't contain eval time magic like that IMHO
<johnw> IFD?
<johnw> I agree
<LnL> import from derivation
<johnw> oh yeah
<johnw> I think most of this code comes from shlevy
<johnw> so, with your original paste
<johnw> why doesn't it call abort?
<LnL> because it's not there yet
<johnw> what's not there yet?
<LnL> evaluation
<johnw> are you saying my original intuition was right?
<LnL> so what's happening is that in order to evaluate that thing it needs to build packages first
philr has joined #nix-darwin
<LnL> what's the actual problem, cabal2nix failing?
<johnw> no
<johnw> LnL: the actual problem is that it's never using my version of developPackage
<johnw> it's using the one that's in nixpkgs
<johnw> I can't override the definition
<johnw> I get the sense I've failed communicate something...
<johnw> cabal2nix isn't an issue
<LnL> kk, just checking since it fails at cabal2nix for me
<johnw> 3 tests failing?
<johnw> I added cabal2nix = dontCheck super.cabal2nix; for that
<johnw> which, strangely, *does* get used
<LnL> yeah, just wanted to check because then I would have mostly understood the problem
jtojnar has quit [Read error: Connection reset by peer]
jtojnar_ has joined #nix-darwin
jtojnar_ is now known as jtojnar
Sonarpulse has quit [Ping timeout: 240 seconds]