Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hs-flake-utils
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Shae Erisson
hs-flake-utils
Commits
ce5ba768
Commit
ce5ba768
authored
2 years ago
by
Shae Erisson
Browse files
Options
Downloads
Patches
Plain Diff
add a getting started section to the readme
parent
3cd8d5cf
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+60
-0
60 additions, 0 deletions
README.md
with
60 additions
and
0 deletions
README.md
0 → 100644
+
60
−
0
View file @
ce5ba768
# hs-flake-utils
A nix flake for use with Haskell, for Least Authority.
# How do I make it go?
1.
create a directory
2.
change into that directory
2.
nix-shell -p cabal-install ghc
1.
cabal init
2.
answer all the questions to create the project files
3.
copy the project template below into a file named
`flake.nix`
1.
replace the contents of
`description`
and
`packageName`
in the newly created
`flake.nix`
4.
run
`nix develop`
Wait for the world to build or the internet to send you cached packages.
```
haskell
{
description
=
"something about your cool project"
;
inputs
=
{
#
Nix
Inputs
nixpkgs
.
url
=
github
:
nixos
/
nixpkgs
/?
ref
=
nixos
-
22.11
;
flake
-
utils
.
url
=
github
:
numtide
/
flake
-
utils
;
hs
-
flake
-
utils
.
url
=
"git+https://whetstone.private.storage/jcalderone/hs-flake-utils.git?ref=main"
;
hs
-
flake
-
utils
.
inputs
.
nixpkgs
.
follows
=
"nixpkgs"
;
};
outputs
=
{
self
,
nixpkgs
,
flake
-
utils
,
hs
-
flake
-
utils
,
}
:
let
ulib
=
flake
-
utils
.
lib
;
ghcVersion
=
"ghc8107"
;
in
ulib
.
eachSystem
[
"x86_64-linux"
"aarch64-darwin"
]
(
system
:
let
#
Get
a
nixpkgs
customized
for
this
system
pkgs
=
import
nixpkgs
{
inherit
system
;
};
hslib
=
hs
-
flake
-
utils
.
lib
{
inherit
pkgs
;
src
=
./.
;
compilerVersion
=
ghcVersion
;
packageName
=
"PACKAGENAME"
;
};
in
{
checks
=
hslib
.
checks
{};
devShells
=
hslib
.
devShells
{
extraBuildInputs
=
pkgs
:
with
pkgs
;
[
zlib
];
};
packages
=
hslib
.
packages
{};
});
}
```
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment