]> Git — Sourcephile - haskell/symantic-base.git/blob - flake.nix
build: update nix input `nixpkgs`
[haskell/symantic-base.git] / flake.nix
1 {
2 inputs.nixpkgs.url = "flake:nixpkgs";
3 outputs = inputs: let
4 pkg = "symantic-base";
5 lib = inputs.nixpkgs.lib;
6 forAllSystems = f: lib.genAttrs lib.systems.supported.hydra (system: f rec {
7 inherit system;
8 pkgs = inputs.nixpkgs.legacyPackages.${system};
9 haskellPackages = pkgs.haskellPackages.extend (with pkgs.haskell.lib; hfinal: hsuper: {
10 ${pkg} = buildFromSdist (hfinal.callCabal2nix pkg ./. {});
11 });
12 });
13 in {
14 # nix -L build
15 defaultPackage = forAllSystems ({haskellPackages, ...}: haskellPackages.${pkg});
16 # nix -L develop
17 devShell = forAllSystems ({pkgs, haskellPackages, ...}:
18 haskellPackages.shellFor {
19 packages = ps: [ ps.${pkg} ];
20 nativeBuildInputs = [
21 haskellPackages.cabal-install
22 haskellPackages.ghcid
23 haskellPackages.haskell-language-server
24 haskellPackages.hlint
25 pkgs.git-chglog
26 pkgs.reuse
27 ];
28 withHoogle = false;
29 });
30 };
31 }