Browse Source

Fix a couple typos, improve the shell.nix file

master
Peter J. Jones 2 months ago
parent
commit
cc1c4fde61
Signed by: Peter Jones <pjones@devalot.com> GPG Key ID: 9DAFAA8D01941E49
5 changed files with 21 additions and 11 deletions
  1. 4
    0
      .gitignore
  2. 2
    0
      opaleye/.envrc
  3. 3
    3
      opaleye/README.md
  4. 1
    1
      opaleye/src/Iolaus/Opaleye.hs
  5. 11
    7
      shell.nix

+ 4
- 0
.gitignore View File

@@ -1 +1,5 @@
/**/dist/
/**/dist-newstyle/
/**/.ghc.environment.*
/**/TAGS
/**/cabal.project.local

+ 2
- 0
opaleye/.envrc View File

@@ -0,0 +1,2 @@
# Load the .envrc one level up:
source_up

+ 3
- 3
opaleye/README.md View File

@@ -29,12 +29,12 @@ To run the example application you first need to set two environment
variables:

* `DB_CONN`: The PostgreSQL database connection string. Create a
database with any name you like this set this variable.
database with any name you like, then set this variable.

* `iolaus_opaleye_datadir`: The path to the directory containing
this `README.md` file. This is so the example application and
this `README.md` file. This is so the example application can
find the schema migration files.


Examples of these environment variables can be found in the
[.envrc](../.envrc) file.
top-level [.envrc](../.envrc) file.

+ 1
- 1
opaleye/src/Iolaus/Opaleye.hs View File

@@ -218,7 +218,7 @@ initOpaleye c store =
--------------------------------------------------------------------------------
-- | Given a configuration object, create a database handle.
mkPool :: (MonadIO m) => Config -> m (Pool PostgreSQL.Connection)
mkPool Config{connectionString, poolSize, poolTimeoutSec} = do
mkPool Config{connectionString, poolSize, poolTimeoutSec} =
liftIO (Pool.createPool open close 1 timeout size)
where
constr = Text.encodeUtf8 connectionString

+ 11
- 7
shell.nix View File

@@ -4,10 +4,11 @@
let
nix-hs-src = fetchGit {
url = "https://code.devalot.com/pjones/nix-hs.git";
rev = "4a9ea2c8c6712ae3cb5892bc74dc051906535238";
rev = "0211a56b726d6ecdc45f41239e0f3fd15ba3bc08";
};

nix-hs = (import "${nix-hs-src}/default.nix" {inherit pkgs;});
haskell = import ./overlay.nix { inherit pkgs; };

in

@@ -15,13 +16,16 @@ pkgs.mkShell {
buildInputs = with pkgs; [

# Haskell Dependencies:
haskellPackages.ghc
haskellPackages.cabal-install
(haskell.ghcWithPackages (p: with p; [
cabal-install
hasktags
hlint
hoogle
# cabal-dependency-licenses

# For IDEs:
] ++ p.iolaus-opaleye.propagatedBuildInputs))

# Helper for incremental builds:
nix-hs
haskellPackages.hoogle
haskellPackages.hlint
# haskellPackages.cabal-dependency-licenses
];
}

Loading…
Cancel
Save