Stream: haskell-flake

Topic: `custom` setting stopped working


view this post on Zulip Srid (Mar 27 2024 at 19:48):

Introduced by https://github.com/srid/haskell-flake/pull/253

view this post on Zulip Srid (Mar 27 2024 at 19:51):

Tangentially related: https://github.com/srid/haskell-flake/issues/192

But now that we have otherOverlays I wonder if I should just get rid of custom.

view this post on Zulip Srid (Mar 27 2024 at 20:03):

Ordering is the issue

I can confirm that the order in which settings are applied is the issue. If I rename custom to A_custom, it works. This suggests that custom doesn't work because it comes after buildFromSdist in alphabetical order.

view this post on Zulip Srid (Mar 27 2024 at 20:08):

Srid said:

Tangentially related: https://github.com/srid/haskell-flake/issues/192

But now that we have otherOverlays I wonder if I should just get rid of custom.

Hmm, we can't do that, because overlays don't compose when import'ing.

view this post on Zulip Srid (Mar 27 2024 at 20:11):

Here's an idea: provide two settings:

view this post on Zulip Srid (Mar 27 2024 at 20:28):

Proposal for fix

https://github.com/srid/haskell-flake/issues/283

Need :eyes: and ideas from people.

view this post on Zulip Srid (Mar 27 2024 at 20:49):

Or,

view this post on Zulip Srid (Mar 28 2024 at 14:54):

Or,

view this post on Zulip Srid (Mar 28 2024 at 14:56):

Incidentally, I began thinking about why we even need separate packages and settings option groups. Like, why not this:

{
  packages = {
    hello_rust.drv = self'.packages.hello_rust
    myhaskell.source = ./haskell;
    myhaskell.setting.libraryProfiling = true;
    aeson.source = "1.5.0";
  };
}

view this post on Zulip Shivaraj B H (Mar 28 2024 at 15:31):

This is nice, keeps all the info about a package in one-place.

view this post on Zulip Srid (Mar 28 2024 at 15:33):

Will be a big ass refactoring, will try from Australia next week.

view this post on Zulip Srid (Mar 28 2024 at 15:34):

Since this bug affects only non-existent packages, it is not high prio to fix I guess.

view this post on Zulip Shivaraj B H (Mar 28 2024 at 15:48):

I could add the <package-name>.drv feature for non-existent packages, which shouldn’t be hard to do and not break anything

view this post on Zulip Shivaraj B H (Mar 28 2024 at 15:50):

Will help publish this tutorial soon: https://github.com/nixos-asia/website/pull/24

view this post on Zulip Srid (Mar 28 2024 at 15:55):

Shivaraj B H said:

I could add the <package-name>.drv feature for non-existent packages, which shouldn’t be hard to do and not break anything

Feel free to give it a try.

view this post on Zulip Srid (Mar 28 2024 at 18:55):

Turns out we can fix this particular bug without implementing this proposal (which should be good on its own merits, though):

https://github.com/srid/haskell-flake/pull/284

view this post on Zulip Srid (Mar 28 2024 at 19:02):

srid on appreciate haskell-rust-ffi-template on  master [⇣]
❯ g log -1
commit 1038ca8a87aae4e448bbd7ea6e1c41ee4e7acb2d (HEAD -> master)
Author: Shivaraj B H <[email protected]>
Date:   Wed Mar 27 15:04:33 2024 +0530

    ci: upgrade nixci

srid on appreciate haskell-rust-ffi-template on  master [⇣]
❯ nix build --override-input haskell-flake github:srid/haskell-flake/settings-null --show-trace
warning: not writing modified lock file of flake 'git+file:///Users/srid/code/haskell-rust-ffi-template':
• Updated input 'haskell-flake':
    'github:srid/haskell-flake/f9d17c3aa68e65529f424816c8b9346ae602d1de' (2024-02-06)
  → 'github:srid/haskell-flake/d6a9187919cbf087b99d88d154086a20fc1b72f1' (2024-03-28)

srid on appreciate haskell-rust-ffi-template on  master [⇣] took 5s
❯

view this post on Zulip Notification Bot (Apr 02 2024 at 08:05):

Shivaraj B H has marked this topic as unresolved.

view this post on Zulip Shivaraj B H (Apr 02 2024 at 08:06):

seems like it is broken again: https://github.com/srid/haskell-flake/issues/283#issuecomment-2031339304

view this post on Zulip Srid (Apr 03 2024 at 06:29):

Does this fix it?

https://github.com/srid/haskell-flake/pull/298

view this post on Zulip Shivaraj B H (Apr 03 2024 at 06:41):

Yes, it does.

here’s what I tried:

nix build github:shivaraj-bh/haskell-rust-ffi-template --override-input haskell-flake github:srid/haskell-flake/e20cdd30ad9201bedc4977fa55f7a4765d6a56ac

Last updated: Nov 21 2024 at 09:45 UTC