readme: mention 'nix run'
This commit is contained in:
parent
0866cd1c25
commit
c082385a7f
2 changed files with 5 additions and 3 deletions
|
@ -44,6 +44,7 @@ git add . && git commit -m rename
|
|||
- Run `nix flake update` to update all flake inputs.
|
||||
- Run `treefmt` in nix shell to autoformat the project. This uses [treefmt](https://github.com/numtide/treefmt), which uses `./treefmt.toml` (where fourmolu and nixpkgs-fmt are specified).
|
||||
- Run `bin/hoogle` to start Hoogle with packages in your cabal file.
|
||||
- Run the application without installing: `nix run github:srid/haskell-template` (or `nix run .` from checkout)
|
||||
|
||||
## Alternatives
|
||||
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
inputs.flake-utils.lib.eachDefaultSystem
|
||||
(system:
|
||||
let
|
||||
name = "haskell-template";
|
||||
|
||||
# Because: https://zimbatm.com/notes/1000-instances-of-nixpkgs
|
||||
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
||||
inherit (pkgs.lib.lists) optionals;
|
||||
|
@ -46,8 +48,7 @@
|
|||
, withHoogle ? false
|
||||
}:
|
||||
hp.developPackage {
|
||||
inherit returnShellEnv withHoogle;
|
||||
name = "haskell-template";
|
||||
inherit returnShellEnv withHoogle name;
|
||||
root = ./.;
|
||||
overrides = self: super: with pkgs.haskell.lib; {
|
||||
# Use callCabal2nix to override Haskell dependencies here
|
||||
|
@ -74,7 +75,7 @@
|
|||
apps = {
|
||||
default = {
|
||||
type = "app";
|
||||
program = "${inputs.self.packages.${system}.default}/bin/haskell-template";
|
||||
program = "${inputs.self.packages.${system}.default}/bin/${name}";
|
||||
};
|
||||
};
|
||||
# Used by `nix develop ...`
|
||||
|
|
Loading…
Reference in a new issue