From c25580859548c67a748432af572028a996226549 Mon Sep 17 00:00:00 2001 From: nek0 Date: Sat, 16 Dec 2023 06:42:53 +0100 Subject: [PATCH] more cleanup --- default.nix | 4 +++- shell.nix | 32 +++++++++++++------------------- 2 files changed, 16 insertions(+), 20 deletions(-) diff --git a/default.nix b/default.nix index ed67ffe..d319586 100644 --- a/default.nix +++ b/default.nix @@ -1,4 +1,6 @@ -{ pkgs ? import {}, self ? ./., packageName ? "chaoszone" }: +{ pkgs ? import {} +, self ? ./., packageName ? "chaoszone" +}: let gitignore = dir: pkgs.nix-gitignore.gitignoreSource [] dir; in diff --git a/shell.nix b/shell.nix index 29d4cd6..95a0af0 100644 --- a/shell.nix +++ b/shell.nix @@ -1,20 +1,14 @@ -{ pkgs ? import {}, chaoszone ? null}: +{ pkgs ? import {} +, chaoszone ? import ./default.nix { inherit pkgs; packageName = "chaoszone"; } +}: -let - chaoszone_cz = if isNull chaoszone - then - (import ./default.nix {inherit pkgs; packageName = "chaoszone";}) - else - chaoszone; - gitignore = dir: pkgs.nix-gitignore.gitignoreSource [] dir; -in - pkgs.haskellPackages.shellFor { - packages = p: [ chaoszone_cz ]; - withHoogle = true; - buildInputs = with pkgs.haskellPackages; with pkgs; [ - haskell-language-server - ghcid - cabal-install - vim - ]; - } +pkgs.haskellPackages.shellFor { + packages = p: [ chaoszone ]; + withHoogle = true; + buildInputs = with pkgs.haskellPackages; with pkgs; [ + haskell-language-server + ghcid + cabal-install + vim + ]; +}