oauth2-mock-server/flake.nix
2023-12-19 21:07:37 +01:00

39 lines
1.0 KiB
Nix

{
description = "Insecure mock server for OAuth2";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
};
outputs = { self, nixpkgs }:
let
system = "x86_64-linux";
name = "oauth2-mock-server";
pkgs = import nixpkgs { inherit system; };
stackWrapper = pkgs.symlinkJoin {
name = "stack";
paths = [ pkgs.stack ];
buildInputs = with pkgs; [ makeWrapper ];
postBuild = ''
wrapProgram $out/bin/stack \
--add-flags "--no-install-ghc"
'';
};
buildInputs = [ stackWrapper ] ++ (
with pkgs; [ reuse zlib ] ++ (
with haskell.packages."ghc927"; [ ghc haskell-language-server ]
)
);
in {
packages.${system}.${name} = nixpkgs.legacyPackages.${system}.${name};
packages.${system}.default = self.packages.${system}.${name};
devShells.${system}.default = pkgs.mkShell {
buildInputs = buildInputs;
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs;
};
};
}