Skip to content
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

Add haskell.nix template #40

Merged
merged 1 commit into from
Oct 4, 2022
Merged

Conversation

yvan-sraka
Copy link
Contributor

yvan-sraka added a commit to input-output-hk/haskell.nix that referenced this pull request Aug 8, 2022
This depends on NixOS/templates#40

This issue make both `nix run haskell-nix#hix -- init` and
`nix flake init --template haskell-nix#template --impure` do the same
thing!
yvan-sraka added a commit to input-output-hk/haskell.nix that referenced this pull request Aug 8, 2022
This depends on NixOS/templates#40

This issue makes both `nix run haskell-nix#hix -- init` and
`nix flake init --template haskell-nix#template --impure` do the same
thing!
@yvan-sraka yvan-sraka marked this pull request as draft August 8, 2022 08:29
@yvan-sraka yvan-sraka changed the title Add haskell.nix template Add haskell.nix template Aug 8, 2022
yvan-sraka added a commit to input-output-hk/haskell.nix that referenced this pull request Aug 26, 2022
This depends on NixOS/templates#40

This issue makes both `nix run haskell-nix#hix -- init` and
`nix flake init --template haskell-nix#template --impure` do the same
thing!
@yvan-sraka yvan-sraka marked this pull request as ready for review August 29, 2022 08:53
@domenkozar domenkozar merged commit 6d7e434 into NixOS:master Oct 4, 2022
@yvan-sraka yvan-sraka deleted the haskell.nix branch October 5, 2022 12:26
@@ -77,6 +77,15 @@
description = "A simple Go package";
};

haskell.nix = {
Copy link

Choose a reason for hiding this comment

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

This is equivalent to

      haskell = {
        nix = { /* the template */ };
      };

which will break nix flake show since the schema is wrong even though nix flake init -t templates#haskell.nix will still work (at least for some versions of nix flake CLI). Probably you mean to write

Suggested change
haskell.nix = {
"haskell.nix" = {

but having an attribute name with a dot (.) in it is a bit awkard, so maybe instead

Suggested change
haskell.nix = {
haskell_nix = {

@@ -77,6 +77,15 @@
description = "A simple Go package";
};

haskell.nix = {
path = ./go-hello;
Copy link

Choose a reason for hiding this comment

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

This is bringing in the wrong template

Suggested change
path = ./go-hello;
path = ./haskell.nix;

yvan-sraka added a commit to yvan-sraka/templates that referenced this pull request Oct 5, 2022
domenkozar added a commit that referenced this pull request Oct 10, 2022
Fix #45: PR #40 broke `nix flake show templates`
hamishmack pushed a commit to input-output-hk/haskell.nix that referenced this pull request Oct 18, 2022
* Fix #1558: add flake template for `nix flake init`

This depends on NixOS/templates#40

This issue makes both `nix run haskell-nix#hix -- init` and
`nix flake init --template haskell-nix#template --impure` do the same
thing!

* Update getting-started-flakes.md
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.

None yet

4 participants