Bump nixpkgs and simplify/clean up nix setup (#1529)

* Refactor tests and fix README

* fix linting hints from new hlint version

* postgrest-style with new nixpkgs-fmt
This commit is contained in:
Remo Rechkemmer
2020-05-20 21:30:20 -05:00
committed by GitHub
parent e6874c866d
commit 48c9ac36b1
27 changed files with 268 additions and 344 deletions
+2 -1
View File
@@ -15,5 +15,6 @@ self: super:
rev = "2ced4519f865341adcb143c5d668f955a2cb997f";
sha256 = "sha256:0fc5bgv9syfcblp23y05kkfnpgh3gssz6vn24frs8dzw39algk2z";
};
in (super.callPackage gitignoreSrc {}).gitignoreSource;
in
(super.callPackage gitignoreSrc { }).gitignoreSource;
}
+90
View File
@@ -0,0 +1,90 @@
{ mkDerivation
, array
, base
, base-compat
, base-orphans
, binary
, bytestring
, containers
, deepseq
, Diff
, directory
, filepath
, integer-logarithms
, mtl
, optparse-applicative
, parsec
, pretty
, process
, QuickCheck
, stdenv
, stm
, tagged
, tar
, tasty
, tasty-golden
, tasty-hunit
, tasty-quickcheck
, temporary
, text
, time
, transformers
, tree-diff
, unix
}:
mkDerivation {
pname = "Cabal";
version = "3.0.0.0";
sha256 = "5143ec26d740c1a508c93a8860e64407e7546c29b9817db20ff1595c1968d287";
setupHaskellDepends = [ mtl parsec ];
libraryHaskellDepends = [
array
base
binary
bytestring
containers
deepseq
directory
filepath
mtl
parsec
pretty
process
text
time
transformers
unix
];
testHaskellDepends = [
array
base
base-compat
base-orphans
binary
bytestring
containers
deepseq
Diff
directory
filepath
integer-logarithms
optparse-applicative
pretty
process
QuickCheck
stm
tagged
tar
tasty
tasty-golden
tasty-hunit
tasty-quickcheck
temporary
text
tree-diff
];
doCheck = false;
homepage = "http://www.haskell.org/cabal/";
description = "A framework for packaging Haskell software";
license = stdenv.lib.licenses.bsd3;
}
+3 -3
View File
@@ -2,9 +2,9 @@ The `.nix` files in this directory pin specific versions of Haskell packages
from Hackage. They were generated with `cabal2nix`, e.g.:
```bash
cabal2nix cabal://protolude > protolude.nix
cabal2nix cabal://Cabal-3.0.0.0 > Cabal.nix
```
Those overrides might become obsolete as the pinned versions are adopted into
our pinned version of nixpkgs.
Those overrides will likely become obsolete as the pinned versions are adopted
into our pinned version of nixpkgs.
+33 -7
View File
@@ -1,11 +1,37 @@
self: super:
{ compiler, static ? false }:
self: super:
let
lib =
self.haskell.lib;
overrides =
final: prev:
rec {
protolude =
prev.callHackageDirect
{
pkg = "protolude";
ver = "0.3.0";
sha256 = "0iwh4wsjhb7pms88lw1afhdal9f86nrrkkvv65f9wxbd1b159n72";
} { };
cabal2nix =
if static then
# cabal2nix depends on Cabal 3.0.*, while our pinned version of
# Nixpkgs only provides 2.4 or 3.2. So we pinned 3.0.0.0 in
# ./Cabal.nix
prev.cabal2nix.overrideScope (self: super: { Cabal = self.callPackage ./Cabal.nix { }; })
else
prev.cabal2nix;
};
in
{
haskellPackages =
super.haskellPackages.override {
overrides =
final: prev: rec {
protolude = prev.callPackage ./protolude.nix {};
};
haskell =
super.haskell // {
packages = super.haskell.packages // {
"${compiler}" =
super.haskell.packages."${compiler}".override { inherit overrides; };
};
};
}
@@ -1,43 +0,0 @@
{ mkDerivation
, array
, async
, base
, bytestring
, containers
, deepseq
, ghc-prim
, hashable
, mtl
, mtl-compat
, stdenv
, stm
, text
, transformers
, transformers-compat
}:
mkDerivation {
pname = "protolude";
version = "0.3.0";
sha256 = "4083385a9e03fab9201f63ce198b9ced3fbc1c50d6d42574db5e36c757bedcac";
isLibrary = true;
isExecutable = true;
libraryHaskellDepends = [
array
async
base
bytestring
containers
deepseq
ghc-prim
hashable
mtl
mtl-compat
stm
text
transformers
transformers-compat
];
homepage = "https://github.com/sdiehl/protolude";
description = "A small prelude";
license = stdenv.lib.licenses.mit;
}
+5
View File
@@ -0,0 +1,5 @@
self: super:
# Overlay that sets the default version of PostgreSQL.
{
postgresql = super.postgresql_12;
}
+1 -1
View File
@@ -16,5 +16,5 @@ self: super:
sha256 = tarballHash;
};
in
(import pinnedPkgs {}).pkgs.postgresql_9_4;
(import pinnedPkgs { }).pkgs.postgresql_9_4;
}