Add unicode-data and unicode-data-names to Nix
This commit is contained in:
parent
765dde817e
commit
c09ae680ba
@ -1,2 +1,4 @@
|
|||||||
haskellPackages: with haskellPackages; [
|
haskellPackages: with haskellPackages; [
|
||||||
|
unicode-data
|
||||||
|
unicode-data-names
|
||||||
]
|
]
|
18
nix/pkgs.nix
18
nix/pkgs.nix
@ -1,5 +1,21 @@
|
|||||||
{ overlays ? [] }:
|
{ overlays ? [] }:
|
||||||
let
|
let
|
||||||
sources = import ./sources.nix;
|
sources = import ./sources.nix;
|
||||||
|
settings = import ./settings.nix;
|
||||||
|
|
||||||
|
overlay = final: prev: {
|
||||||
|
haskell = prev.haskell // {
|
||||||
|
packages = prev.haskell.packages // {
|
||||||
|
"${settings.ghc}" = prev.haskell.packages."${settings.ghc}".override {
|
||||||
|
overrides = haskellOverlay prev;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
haskellOverlay = pkgs: final: prev: {
|
||||||
|
unicode-data = prev.unicode-data_0_4_0_1;
|
||||||
|
unicode-data-names = pkgs.haskell.lib.markUnbroken prev.unicode-data-names;
|
||||||
|
};
|
||||||
in
|
in
|
||||||
import sources.nixpkgs { inherit overlays; }
|
import sources.nixpkgs { overlays = overlays ++ [overlay]; }
|
||||||
|
5
nix/settings.nix
Normal file
5
nix/settings.nix
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
# GHC version to use with Nix.
|
||||||
|
# Should match the one in stack.yaml.
|
||||||
|
ghc = "ghc943";
|
||||||
|
}
|
@ -13,6 +13,7 @@ extra-source-files:
|
|||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
- base >= 4.7 && < 5
|
- base >= 4.7 && < 5
|
||||||
|
- unicode-data-names
|
||||||
|
|
||||||
ghc-options:
|
ghc-options:
|
||||||
- -Wall
|
- -Wall
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
{ pkgs ? import ./nix/pkgs.nix {} }:
|
{ pkgs ? import ./nix/pkgs.nix {} }:
|
||||||
let
|
let
|
||||||
|
haskellDeps = import ./nix/haskell-deps.nix;
|
||||||
|
settings = import ./nix/settings.nix;
|
||||||
|
|
||||||
tools = with pkgs; [
|
tools = with pkgs; [
|
||||||
# nix tools
|
# nix tools
|
||||||
niv
|
niv
|
||||||
@ -8,6 +11,7 @@ let
|
|||||||
# haskell tools
|
# haskell tools
|
||||||
stack
|
stack
|
||||||
haskell-language-server
|
haskell-language-server
|
||||||
|
(pkgs.haskell.packages."${settings.ghc}".ghcWithPackages haskellDeps)
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
pkgs.mkShellNoCC {
|
pkgs.mkShellNoCC {
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
{}:
|
{}:
|
||||||
let
|
let
|
||||||
pkgs = import ./nix/pkgs.nix {};
|
pkgs = import ./nix/pkgs.nix {};
|
||||||
|
settings = import ./nix/settings.nix;
|
||||||
haskellDeps = import ./nix/haskell-deps.nix;
|
haskellDeps = import ./nix/haskell-deps.nix;
|
||||||
in
|
in
|
||||||
pkgs.haskell.lib.buildStackProject {
|
pkgs.haskell.lib.buildStackProject {
|
||||||
name = "utoy";
|
name = "utoy";
|
||||||
ghc = pkgs.haskell.packages.ghc943.ghcWithPackages haskellDeps;
|
ghc = pkgs.haskell.packages."${settings.ghc}".ghcWithPackages haskellDeps;
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,7 @@ library
|
|||||||
ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-export-lists -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints
|
ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-export-lists -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints
|
||||||
build-depends:
|
build-depends:
|
||||||
base >=4.7 && <5
|
base >=4.7 && <5
|
||||||
|
, unicode-data-names
|
||||||
default-language: Haskell2010
|
default-language: Haskell2010
|
||||||
|
|
||||||
executable utoy-exe
|
executable utoy-exe
|
||||||
@ -36,6 +37,7 @@ executable utoy-exe
|
|||||||
ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-export-lists -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints -threaded -rtsopts -with-rtsopts=-N
|
ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-export-lists -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints -threaded -rtsopts -with-rtsopts=-N
|
||||||
build-depends:
|
build-depends:
|
||||||
base >=4.7 && <5
|
base >=4.7 && <5
|
||||||
|
, unicode-data-names
|
||||||
, utoy
|
, utoy
|
||||||
default-language: Haskell2010
|
default-language: Haskell2010
|
||||||
|
|
||||||
@ -49,5 +51,6 @@ test-suite utoy-test
|
|||||||
ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-export-lists -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints -threaded -rtsopts -with-rtsopts=-N
|
ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-export-lists -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints -threaded -rtsopts -with-rtsopts=-N
|
||||||
build-depends:
|
build-depends:
|
||||||
base >=4.7 && <5
|
base >=4.7 && <5
|
||||||
|
, unicode-data-names
|
||||||
, utoy
|
, utoy
|
||||||
default-language: Haskell2010
|
default-language: Haskell2010
|
||||||
|
Loading…
x
Reference in New Issue
Block a user