Files
p2p-rendering-computation/nix/templates/haskell/flake.nix

59 lines
1.2 KiB
Nix

{
description = "Start of Haskell P2PRC flake";
inputs =
{
nixpkgs = {
url = "github:NixOS/nixpkgs/nixos-unstable";
};
flake-utils = {
url = "github:numtide/flake-utils";
};
p2prc-flake = {
url = "github:xecarlox94/p2p-rendering-computation?ref=nix";
};
};
outputs = { nixpkgs, p2prc-flake, flake-utils, ... }:
(flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [
p2prc-flake.overlays.default
p2prc-flake.overlays.bindings
];
};
in {
packages = {
default = pkgs.haskellPackages.callPackage ./cabal.nix { };
};
devShells.default = pkgs.haskellPackages.shellFor {
packages = p: [
(p.callPackage ./cabal.nix { })
];
buildInputs = with pkgs; [
p2prc-flake.packages.${system}.default
ghc
cabal2nix
cabal-install
];
# TODO: add cabal2nix shell command
shellHook = ''
cabal2nix . > ./cabal.nix
'';
};
}
));
}