fastfood-hs/flake.nix
2024-03-11 23:42:49 +01:00

39 lines
973 B
Nix

{ description = "Extremely basic flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils}:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = import nixpkgs { inherit system; };
compiler = "ghc94";
in {
packages = {
default = pkgs.haskell.packages.${compiler}.mkDerivation {
pname = "fastfood";
version = "0.1.0.0";
src = ./.;
isLibrary = false;
isExecutable = true;
executableHaskellDepends = with pkgs.haskellPackages; [
base
random
];
license = pkgs.lib.licenses.agpl3Only;
mainProgram = "what-should-i-eat";
};
};
devShells.default = pkgs.mkShell {
buildInputs = with pkgs.haskellPackages; [
base
random
ghc
haskell-language-server
cabal-install
];
};
});
}