Skip to content

Commit

Permalink
Add hs-brolti and wai-middleware-brotli nix config
Browse files Browse the repository at this point in the history
  • Loading branch information
s0kil committed Sep 6, 2022
1 parent 63b9a6b commit 771c702
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 11 deletions.
30 changes: 30 additions & 0 deletions NixSupport/haskell-packages/hs-brotli.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{ mkDerivation
, base
, bytestring
, fetchgit
, ghc-prim
, lib
}:
let
nixpkgs = import <nixpkgs> { };
in
mkDerivation {
pname = "hs-brotli";
version = "0.1.0.0";
src = fetchgit {
url = "https://github.com/s0kil/hs-brotli";
sha256 = "0xwp0zj28njl6f8x47rwbsngkbg6r9a05bhrdxhkls2gnbvx8dac";
rev = "9f27b1f443d21d177100cd7d0906ad68020d9331";
fetchSubmodules = true;
};
postUnpack = "sourceRoot+=/brotli; echo source root reset to $sourceRoot";
libraryHaskellDepends = [ base bytestring ghc-prim ];
librarySystemDepends = [ nixpkgs.brotli ];
libraryToolDepends = [ nixpkgs.pkg-config ];
libraryPkgconfigDepends = [ nixpkgs.brotli ];
doHaddock = false;
doCheck = false;
homepage = "https://github.com/s0kil/hs-brotli#readme";
description = "Compression and decompression in the brotli format";
license = lib.licenses.bsd3;
}
28 changes: 17 additions & 11 deletions NixSupport/haskell-packages/wai-middleware-brotli.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,33 @@
, hs-brotli
, http-types
, lib
, mtl
, tasty
, tasty-hspec
, tasty-hunit
, unix
, wai
, wai-extra
}:
mkDerivation {
pname = "wai-middleware-brotli";
version = "0.1.0.0";
src = fetchgit {
url = "https://github.com/iand675/hs-brotli";
sha256 = "1i4qaqn79m4jcg16pdm222xy6x97r5fv8ikyykf1nl79hs0dajrh";
rev = "d7bce54b265883fb30a14d39d00cbf1c1308b2b1";
url = "https://github.com/s0kil/hs-brotli";
sha256 = "0xwp0zj28njl6f8x47rwbsngkbg6r9a05bhrdxhkls2gnbvx8dac";
rev = "9f27b1f443d21d177100cd7d0906ad68020d9331";
fetchSubmodules = true;
};
postUnpack = "sourceRoot+=/wai-middleware-brotli; echo source root reset to $sourceRoot";
libraryHaskellDepends = [ base binary bytestring directory filepath hs-brotli http-types unix wai ];
testHaskellDepends = [ base bytestring hs-brotli http-types mtl tasty tasty-hspec tasty-hunit wai wai-extra ];
homepage = "https://github.com/iand675/hs-brotli#readme";
libraryHaskellDepends = [
base
binary
bytestring
directory
filepath
hs-brotli
http-types
unix
wai
];
doHaddock = false;
doCheck = false;
homepage = "https://github.com/s0kil/hs-brotli#readme";
description = "WAI middleware for brotli compression";
license = lib.licenses.bsd3;
}

0 comments on commit 771c702

Please sign in to comment.