Add build instructions for nix #213

Merged
bsima merged 2 commits from nix-build into master 2019-06-05 20:07:39 +02:00
bsima commented 2019-01-26 19:58:51 +01:00 (Migrated from github.com)

This works on my NixOS machine, and it should work everywhere else too, since i've pinned the nixpkgs version in pkgs.nix. The default.nix file supports both nix build and nix-shell automatically. You can also do e.g. nix-shell --argstr compiler ghc844 to change the compiler; I have it set to ghc822 as the default because that's what worked for me when building.

This works on my NixOS machine, and it should work everywhere else too, since i've pinned the nixpkgs version in `pkgs.nix`. The `default.nix` file supports both `nix build` and `nix-shell` automatically. You can also do e.g. `nix-shell --argstr compiler ghc844` to change the compiler; I have it set to `ghc822` as the default because that's what worked for me when building.
ElvishJerricco commented 2019-01-26 20:10:40 +01:00 (Migrated from github.com)

Note that the use of developPackage means that this Nix file cannot be imported by any other project that intends to use nix-shell.

Note that the use of `developPackage` means that this Nix file cannot be imported by any other project that intends to use `nix-shell`.
bsima commented 2019-01-29 23:10:27 +01:00 (Migrated from github.com)

Will Fancher notifications@github.com writes:

Note that the use of developPackage means that this Nix file cannot
be imported by any other project that intends to use nix-shell.

Good point Will. Commit e67a46f264 is an
attempt to address this.

Will Fancher <notifications@github.com> writes: > Note that the use of `developPackage` means that this Nix file cannot > be imported by any other project that intends to use `nix-shell`. Good point Will. Commit e67a46f2649ee53380f2a7d933588e8587ba0ecd is an attempt to address this.
ElvishJerricco commented 2019-01-30 00:20:02 +01:00 (Migrated from github.com)

@bsima How does that address this? release.nix still uses callPackage ./shell.nix, and shell.nix uses developPackage.

@bsima How does that address this? `release.nix` still uses `callPackage ./shell.nix`, and `shell.nix` uses `developPackage`.
bsima commented 2019-01-30 03:13:50 +01:00 (Migrated from github.com)

Will Fancher notifications@github.com writes:

@bsima How does that address this? release.nix still uses
callPackage ./shell.nix, and shell.nix uses developPackage.

Users can import ./default.nix to get a nix expression without developPackage

Will Fancher <notifications@github.com> writes: > @bsima How does that address this? `release.nix` still uses > `callPackage ./shell.nix`, and `shell.nix` uses `developPackage`. Users can `import ./default.nix` to get a nix expression without `developPackage`
lspitzner commented 2019-06-05 20:07:45 +02:00 (Migrated from github.com)

I am gonna optimistically assume that the complain has indeed been resolved. Have not tested, but if there are issues we can always change things again later.

Thanks for the PR.

I am gonna optimistically assume that the complain has indeed been resolved. Have not tested, but if there are issues we can always change things again later. Thanks for the PR.
Sign in to join this conversation.
There is no content yet.