clean nix files a bit
This commit is contained in:
parent
169a76bd9c
commit
df8b17ec36
3 changed files with 13 additions and 16 deletions
5
default.nix
Normal file
5
default.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{ pkgs ? import <nixpkgs> {}, self ? ./., packageName ? "chaoszone" }:
|
||||
let
|
||||
gitignore = dir: pkgs.nix-gitignore.gitignoreSource [] dir;
|
||||
in
|
||||
pkgs.haskellPackages.callCabal2nix packageName (gitignore self) {}
|
15
flake.nix
15
flake.nix
|
@ -18,22 +18,11 @@
|
|||
|
||||
packageName = "chaoszone";
|
||||
in rec {
|
||||
packages.${packageName} = # (ref:haskell-package-def)
|
||||
haskellPackages.callCabal2nix packageName self rec {
|
||||
};
|
||||
packages.${packageName} = import ./default.nix {inherit pkgs self;};
|
||||
|
||||
defaultPackage = self.packages.${system}.${packageName};
|
||||
|
||||
devShell = haskellPackages.shellFor {
|
||||
packages = p: [ defaultPackage ];
|
||||
withHoogle = true;
|
||||
buildInputs = with haskellPackages; with pkgs; [
|
||||
vim
|
||||
haskell-language-server
|
||||
ghcid
|
||||
cabal-install
|
||||
];
|
||||
};
|
||||
devShell = import ./shell.nix {inherit pkgs; chaoszone = defaultPackage;};
|
||||
#devShell = pkgs.mkShell {
|
||||
# buildInputs = with haskellPackages; [
|
||||
# haskell-language-server
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
{ pkgs ? import <nixpkgs> {}}:
|
||||
{ pkgs ? import <nixpkgs> {}, chaoszone ? null}:
|
||||
|
||||
let
|
||||
chaoszone_cz =
|
||||
pkgs.haskellPackages.callCabal2nix "chaoszone" (gitignore ./.) {};
|
||||
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 {
|
||||
|
|
Loading…
Reference in a new issue