Formatting

This commit is contained in:
Nox Sluijtman 2025-04-18 13:51:02 +02:00
parent 57d373b305
commit fc54843031
Signed by: Egg
SSH key fingerprint: SHA256:2sG9X3C7Xvq2svGumz1/k7cm8l4G9+qAtAeugqB4J9M
4 changed files with 139 additions and 104 deletions
haskell

View file

@ -1,38 +1,48 @@
{ description = "A basic Haskell flake";
# To be used in conjunction with cabal2nix
{
description = "A basic Haskell flake";
# To be used in conjunction with cabal2nix
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 = throw "add compiler version here";
in {
packages = {
default = pkgs.haskell.packages.${compiler}.mkDerivation rec {
pname = throw "insert haskell package name here\nderived from the .cabal file";
version = "0.1.0.0";
src = ./.;
isLibrary = false;
isExecutable = true;
executableHaskellDepends = with pkgs.haskellPackages; [
base
];
license = pkgs.lib.licenses.agpl3Only;
mainProgram = pname;
};
};
outputs =
{
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs { inherit system; };
compiler = throw "add compiler version here";
in
{
packages = {
default = pkgs.haskell.packages.${compiler}.mkDerivation rec {
pname = throw "insert haskell package name here\nderived from the .cabal file";
version = "0.1.0.0";
src = ./.;
isLibrary = false;
isExecutable = true;
executableHaskellDepends = with pkgs.haskellPackages; [
base
];
license = pkgs.lib.licenses.agpl3Only;
mainProgram = pname;
};
};
devShells.default = pkgs.mkShell {
buildInputs = with pkgs.haskellPackages; [
base
cabal-install
ghc
haskell-language-server
cabal2nix
];
};
devShells.default = pkgs.mkShell {
buildInputs = with pkgs.haskellPackages; [
base
cabal-install
ghc
haskell-language-server
cabal2nix
];
};
});
}
);
}