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

nix: flakify the project #3105

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 97 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

70 changes: 70 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/dbf5322e93bcc6cfc52268367a8ad21c09d76fea";
flake-parts.url = "github:hercules-ci/flake-parts";
haskell-flake.url = "github:srid/haskell-flake";
postgresql-libpq = {
url = "github:postgrest/postgresql-libpq";
flake = false;
};
};
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.
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://community.flake.parts/haskell-flake/package-set
# basePackages = pkgs.haskellPackages;

# Extra package information. See https://community.flake.parts/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;
# };
# };
packages = {
hasql-notifications.source = "0.2.0.6";
hasql-pool.source = "0.10";
postgrest = inputs.postgresql-libpq;
};
settings = {
configurator-pg.broken = false;
fuzzyset.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.postgrest;
};
};
}
Loading