Skip to content
Snippets Groups Projects
Commit caedf89b authored by Akshay Mankar's avatar Akshay Mankar
Browse files

Override servant version in default.nix

Also remove shell.nix
parent 73b0c37d
No related branches found
No related tags found
No related merge requests found
{ mkDerivation, aeson, base, bytestring, directory, mtl let sources = import ./nix/sources.nix;
, optparse-applicative, optparse-generic, servant, servant-server in { pkgs ? import sources.nixpkgs {},
, shelly, stdenv, text, warp, zlib compiler ? "ghc8103"
}: }:
mkDerivation { let
pname = "terraform-http-backend-pass"; servantPkgs = import sources.servant {inherit pkgs compiler; };
version = "0.1.0.0"; overrides = self: super: {
src = ./.; terraform-http-backend-pass = self.callCabal2nix "terraform-http-backend-pass" ./. {};
isLibrary = true; servant = servantPkgs.servant;
isExecutable = true; servant-server = servantPkgs.servant-server;
libraryHaskellDepends = [ };
aeson base bytestring directory mtl optparse-applicative hPkgs = pkgs.haskell.packages.${compiler}.override { inherit overrides; };
optparse-generic servant servant-server shelly text warp in hPkgs.terraform-http-backend-pass
];
librarySystemDepends = [ zlib ];
executableHaskellDepends = [ base ];
license = "unknown";
hydraPlatforms = stdenv.lib.platforms.none;
}
...@@ -22,5 +22,17 @@ ...@@ -22,5 +22,17 @@
"type": "tarball", "type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/8542021fe7f9f777294649b1cdc853240806ff21.tar.gz", "url": "https://github.com/NixOS/nixpkgs/archive/8542021fe7f9f777294649b1cdc853240806ff21.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"servant": {
"branch": "master",
"description": "Main repository for the servant libraries -- DSL for describing, serving, querying, mocking, documenting web applications and more!",
"homepage": "https://docs.servant.dev/",
"owner": "haskell-servant",
"repo": "servant",
"rev": "27173c922311112dd153346cf3cd72b9fb0f3551",
"sha256": "08lar7s9fi49qzkgrq55z6nc0khx1z36914d2f086wprx0wyrk0a",
"type": "tarball",
"url": "https://github.com/haskell-servant/servant/archive/27173c922311112dd153346cf3cd72b9fb0f3551.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
} }
} }
{ nixpkgs ? import <nixpkgs> {}, compiler ? "default", doBenchmark ? false }:
let
inherit (nixpkgs) pkgs;
f = { mkDerivation, aeson, base, bytestring, directory, mtl
, optparse-applicative, optparse-generic, servant, servant-server
, shelly, stdenv, text, warp, zlib
}:
mkDerivation {
pname = "terraform-http-backend-pass";
version = "0.1.0.0";
src = ./.;
isLibrary = true;
isExecutable = true;
libraryHaskellDepends = [
aeson base bytestring directory mtl optparse-applicative
optparse-generic servant servant-server shelly text warp
];
librarySystemDepends = [ zlib ];
executableHaskellDepends = [ base ];
license = "unknown";
hydraPlatforms = stdenv.lib.platforms.none;
};
haskellPackages = if compiler == "default"
then pkgs.haskellPackages
else pkgs.haskell.packages.${compiler};
variant = if doBenchmark then pkgs.haskell.lib.doBenchmark else pkgs.lib.id;
drv = variant (haskellPackages.callPackage f {});
in
if pkgs.lib.inNixShell then drv.env else drv
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment