nix: Use getExe

This commit is contained in:
Sridhar Ratnakumar 2022-05-27 15:30:21 -04:00
parent 8ac592271b
commit a2f0e945e0

View file

@ -18,8 +18,6 @@
# versions, but with 'system' already applied. # versions, but with 'system' already applied.
perSystem = { self', inputs', pkgs, system, ... }: perSystem = { self', inputs', pkgs, system, ... }:
let let
name = "haskell-template";
inherit (pkgs.lib.lists) optionals; inherit (pkgs.lib.lists) optionals;
# Specify GHC version here. To get the appropriate value, run: # Specify GHC version here. To get the appropriate value, run:
@ -43,7 +41,8 @@
, withHoogle ? false , withHoogle ? false
}: }:
hp.developPackage { hp.developPackage {
inherit returnShellEnv withHoogle name; inherit returnShellEnv withHoogle;
name = "haskell-template";
root = ./.; root = ./.;
overrides = self: super: with pkgs.haskell.lib; { overrides = self: super: with pkgs.haskell.lib; {
# Use callCabal2nix to override Haskell dependencies here # Use callCabal2nix to override Haskell dependencies here
@ -70,7 +69,7 @@
apps = { apps = {
default = { default = {
type = "app"; type = "app";
program = "${self'.packages.default}/bin/${name}"; program = pkgs.lib.getExe self'.packages.default;
}; };
}; };
# Used by `nix develop ...` # Used by `nix develop ...`