tracer/flake.nix

40 lines
1.1 KiB
Nix
Raw Normal View History

2022-09-14 17:03:04 +00:00
{
description = "A game stub written in Haskell";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
2022-09-14 17:49:03 +00:00
affection-src.url = "git+https://gitea.nek0.eu/nek0/affection";
2022-09-14 17:03:04 +00:00
};
2022-09-14 17:49:03 +00:00
outputs = { self, nixpkgs, flake-utils, affection-src }:
2022-09-14 17:03:04 +00:00
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
haskellPackages = pkgs.haskellPackages;
jailbreakUnbreak = pkg:
pkgs.haskell.lib.doJailbreak (pkg.overrideAttrs (_: { meta = { }; }));
packageName = "tracer-game";
in {
packages.${packageName} = # (ref:haskell-package-def)
haskellPackages.callCabal2nix packageName self rec {
2022-09-14 17:49:03 +00:00
affection = affection-src.defaultPackage.${system};
2022-09-14 17:03:04 +00:00
};
defaultPackage = self.packages.${system}.${packageName};
devShell = pkgs.mkShell {
buildInputs = with haskellPackages; [
haskell-language-server
ghcid
cabal-install
];
inputsFrom = builtins.attrValues self.packages.${system};
};
});
}