Skip to content

Add 'nom flake' subcommand - #288

Merged
maralorn merged 1 commit into
maralorn:mainfrom
vaibhavsagar:vs/nom-flake-subcommand
Jul 2, 2026
Merged

Add 'nom flake' subcommand#288
maralorn merged 1 commit into
maralorn:mainfrom
vaibhavsagar:vs/nom-flake-subcommand

Conversation

@vaibhavsagar

Copy link
Copy Markdown
Contributor

This is my attempt to address #106. I'm pretty new to the codebase so I just copied what we're already doing for nom build and nom copy.

@maralorn

maralorn commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Uuuh, I love when we get highlighted in haskell weekly. ❤️

@maralorn maralorn left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh, well, that was even easier than I thought. 😆

Have you tried it out with a few different subcommands?

cabal run -- nom flake check, e.g.

@maralorn

maralorn commented Jul 2, 2026

Copy link
Copy Markdown
Owner

I have tried it. It’s potentially not exactly what people expect (they see a few more log messages than with nix flake check but it works. Thank you!

@maralorn
maralorn enabled auto-merge July 2, 2026 20:50
@maralorn
maralorn disabled auto-merge July 2, 2026 20:56
@maralorn
maralorn merged commit 3a1531f into maralorn:main Jul 2, 2026
1 check passed
@maralorn maralorn linked an issue Jul 2, 2026 that may be closed by this pull request
Comment thread exe/Main.hs
"nom" ("develop" : args) -> do
exitOnFailure =<< runMonitoredCommand defaultConfig{silent = True} (proc "nix" ("develop" : withJSON (replaceCommandWithExit args)))
exitWith =<< runProcess (proc "nix" ("develop" : args))
"nom" ("flake" : args) -> exitWith =<< runMonitoredCommand defaultConfig (proc "nix" ("flake" : withJSON args))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's it? That's all it took? 🤯 🤣

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: Support nix flake subcommands

3 participants