-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Nixify #41
base: master
Are you sure you want to change the base?
Nixify #41
Changes from 2 commits
bf460fb
c3c0342
5765411
ee6f365
bf9bd5c
a679845
44eb689
827a9f4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,6 @@ cabal.sandbox.config | |
*.eventlog | ||
.stack-work/ | ||
cabal.project.local | ||
|
||
# Nix build output | ||
result |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
packages: . | ||
packages: | ||
. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{ | ||
inputs = { | ||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; | ||
flake-parts.url = "github:hercules-ci/flake-parts"; | ||
haskell-flake.url = "github:srid/haskell-flake"; | ||
}; | ||
outputs = inputs@{ self, nixpkgs, flake-parts, ... }: | ||
flake-parts.lib.mkFlake { inherit inputs; } { | ||
systems = nixpkgs.lib.systems.flakeExposed; | ||
imports = [ inputs.haskell-flake.flakeModule ]; | ||
|
||
perSystem = { self', pkgs, ... }: { | ||
|
||
# Typically, you just want a single project named "default". But | ||
# multiple projects are also possible, each using different GHC version. | ||
axman6 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
haskellProjects.default = { | ||
# The base package set representing a specific GHC version. | ||
# By default, this is pkgs.haskellPackages. | ||
# You may also create your own. See https://zero-to-flakes.com/haskell-flake/package-set | ||
# basePackages = pkgs.haskellPackages; | ||
|
||
# Extra package information. See https://zero-to-flakes.com/haskell-flake/dependency | ||
# | ||
# Note that local packages are automatically included in `packages` | ||
# (defined by `defaults.packages` option). | ||
# | ||
# packages = { | ||
# aeson.source = "1.5.0.0"; # Hackage version override | ||
# shower.source = inputs.shower; | ||
# }; | ||
# settings = { | ||
# aeson = { | ||
# check = false; | ||
# }; | ||
# relude = { | ||
# haddock = false; | ||
# broken = false; | ||
# }; | ||
# }; | ||
|
||
devShell = { | ||
# Enabled by default | ||
enable = true; | ||
|
||
# Programs you want to make available in the shell. | ||
# Default programs can be disabled by setting to 'null' | ||
# tools = hp: { fourmolu = hp.fourmolu; ghcid = null; }; | ||
|
||
hlsCheck.enable = true; | ||
}; | ||
}; | ||
|
||
# haskell-flake doesn't set the default package, but you can do it here. | ||
packages.default = self'.packages.amazonka-s3-streaming; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I didn't seem to need all that much of this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure I understand what you're suggesting I change here.
axman6 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}; | ||
}; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may want to pull in a pre-commit hooks module, see https://git.sr.ht/~jack/hslua-fennel-demo/tree/master/item/flake.nix for an example.