Skip to content

Conversation

qrilka
Copy link
Collaborator

@qrilka qrilka commented Oct 21, 2020

There are some TODOs still but at least for stack2nix it seems to work. Any idea about test cases to check it better?

TODO

@nh2
Copy link
Owner

nh2 commented Jul 12, 2021

Continued in #2.

@nh2 nh2 closed this Jul 12, 2021
nh2 added a commit to nh2/static-haskell-nix that referenced this pull request Jul 12, 2021
This uses @qrilka's work from nh2/stack2nix#1,
now moved to nh2/stack2nix#2.

Unfortunately, this introduces a backwards incompatibility for stack users:

The `stack2nix-script` nix expression now needs to be passed `inherit compiler`,
to satisfy stack complaining if there's no matching GHC on PATH
(even though we don't use it).

I haven't found a way around that yet.

Example change that users need to make in their `default.nix` for building
stack projects statically:

       stack2nix-script = import "${static-haskell-nix}/static-stack2nix-builder/stack2nix-script.nix" {
         inherit pkgs;
    +    inherit compiler;
         stack-project-dir = toString ./.; # where stack.yaml is
         hackageSnapshot = "2021-07-11T00:00:00Z"; # pins e.g. extra-deps without hashes or revisions
       };
nh2 added a commit to nh2/static-haskell-nix that referenced this pull request Jul 12, 2021
This uses @qrilka's work from nh2/stack2nix#1,
now moved to nh2/stack2nix#2.

Unfortunately, this introduces a backwards incompatibility for stack users:

The `stack2nix-script` nix expression now needs to be passed `inherit compiler`,
to satisfy stack complaining if there's no matching GHC on PATH
(even though we don't use it).

I haven't found a way around that yet.

Example change that users need to make in their `default.nix` for building
stack projects statically:

       stack2nix-script = import "${static-haskell-nix}/static-stack2nix-builder/stack2nix-script.nix" {
         inherit pkgs;
    +    inherit compiler;
         stack-project-dir = toString ./.; # where stack.yaml is
         hackageSnapshot = "2021-07-11T00:00:00Z"; # pins e.g. extra-deps without hashes or revisions
       };
nh2 added a commit to nh2/static-haskell-nix that referenced this pull request Jul 20, 2021
This uses @qrilka's work from nh2/stack2nix#1,
now moved to nh2/stack2nix#2.

Unfortunately, this introduces a backwards incompatibility for stack users:

The `stack2nix-script` nix expression now needs to be passed `inherit compiler`,
to satisfy stack complaining if there's no matching GHC on PATH
(even though we don't use it).

I haven't found a way around that yet.

Example change that users need to make in their `default.nix` for building
stack projects statically:

       stack2nix-script = import "${static-haskell-nix}/static-stack2nix-builder/stack2nix-script.nix" {
         inherit pkgs;
    +    inherit compiler;
         stack-project-dir = toString ./.; # where stack.yaml is
         hackageSnapshot = "2021-07-11T00:00:00Z"; # pins e.g. extra-deps without hashes or revisions
       };
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.

2 participants