git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Nix build (#51)

* Upgrade purescript to 0.13.6 * Support nix build

commitf7e8d1c29c20659035d5079de306bb24a836b87f authorHideaki Kawai <kayhide@gmail.com> dateThu 17 Sep 2020, 11:46 (6 years ago) parentc7a87ca
4 files changed+39−66
.gitignore+1 default.nix+23 stack.nix+1−1 stack.yaml+14−65
.gitignore+1
@@ -22,3 +22,4 @@ examples/docs/docs/
2222core-tests/full-core-docs.md
2323.psc-ide-port
2424.vscode/
25+result
default.nixnew file+23
@@ -0,0 +1,23 @@
1+let
2+ haskellNix = import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz) {};
3+ nixpkgsSrc = haskellNix.sources.nixpkgs-1903; # has hsc2hs-0.68.4
4+
5+ hsc2hsOverlay = self: super: {
6+ buildPackages = super.buildPackages // {
7+ hsc2hs = super.haskellPackages.hsc2hs;
8+ };
9+ };
10+
11+ nixpkgsArgs = haskellNix.nixpkgsArgs // {
12+ overlays = haskellNix.nixpkgsArgs.overlays ++ [ hsc2hsOverlay ];
13+ };
14+in
15+{ pkgs ? import nixpkgsSrc nixpkgsArgs
16+}:
17+
18+pkgs.haskell-nix.stackProject {
19+ src = pkgs.haskell-nix.haskellLib.cleanGit {
20+ name = "purescript-native";
21+ src = ./.;
22+ };
23+}
stack.nix+1−1
@@ -17,7 +17,7 @@
1717
1818pkgs.haskell.lib.buildStackProject {
1919 name = "default-stack-shell";
20− ghc = pkgs.haskell.compiler.ghc864;
20+ ghc = pkgs.haskell.compiler.ghc865;
2121 buildInputs = with pkgs; [git git-lfs gmp ncurses zlib];
2222 LANG = "en_US.UTF-8";
2323}
stack.yaml+14−65
@@ -1,74 +1,23 @@
1−# This file was automatically generated by 'stack init'
2−#
3−# Some commonly used options have been documented as comments in this file.
4−# For advanced use and comprehensive documentation of the format, please see:
5−# https://docs.haskellstack.org/en/stable/yaml_configuration/
1+resolver: lts-13.26
62
7−# Resolver to choose a 'specific' stackage snapshot or a compiler version.
8−# A snapshot resolver dictates the compiler version and the set of packages
9−# to be used for project dependencies. For example:
10−#
11−# resolver: lts-3.5
12−# resolver: nightly-2015-09-21
13−# resolver: ghc-7.10.2
14−# resolver: ghcjs-0.1.0_ghc-7.10.2
15−# resolver:
16−# name: custom-snapshot
17−# location: "./custom-snapshot.yaml"
18−resolver: lts-13.12
19−
20−# User packages to be built.
21−# Various formats can be used as shown in the example below.
22−#
23−# packages:
24−# - some-directory
25−# - https://example.com/foo/bar/baz-0.0.2.tar.gz
26−# - location:
27−# git: https://github.com/commercialhaskell/stack.git
28−# commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a
29−# - location: https://github.com/commercialhaskell/stack/commit/e7b331f14bcffb8367cd58fbfc8b40ec7642100a
30−# extra-dep: true
31−# subdirs:
32−# - auto-update
33−# - wai
34−#
35−# A package marked 'extra-dep: true' will only be built if demanded by a
36−# non-dependency (i.e. a user package), and its test suites and benchmarks
37−# will not be run. This is useful for tweaking upstream packages.
383packages:
394- .
40−# Dependency packages to be pulled from upstream that are not in the resolver
41−# (e.g., acme-missiles-0.3)
5+
426extra-deps:
43−- git: https://github.com/purescript/purescript
44− commit: 738aaa2f21097c7f18aa8100b16ae52316addb04
7+- git: https://github.com/purescript/purescript
8+ commit: 4dd32c48a372bb8a5250140d19af8aa18a6358d7
9+- happy-1.19.9
10+- language-javascript-0.7.0.0
4511- network-3.0.1.1
46−- pipes-http-1.0.5
47−
48−# Override default flag values for local packages and extra-deps
49−# flags: {}
50−
51−# Extra package databases containing global packages
52−# extra-package-dbs: []
53−
54−# Control whether we use the GHC we find on the path
55−# system-ghc: true
56−#
57−# Require a specific version of stack, using version ranges
58−# require-stack-version: -any # Default
59−# require-stack-version: ">=1.6"
60−#
61−# Override the architecture used by stack, especially useful on Windows
62−# arch: i386
63−# arch: x86_64
64−#
65−# Extra directories used by stack for building
66−# extra-include-dirs: [/path/to/dir]
67−# extra-lib-dirs: [/path/to/dir]
68−#
69−# Allow a newer minor version of GHC than the snapshot specifies
70−# compiler-check: newer-minor
12+- these-1.0.1
13+- semialign-1
7114
7215nix:
7316 shell-file: stack.nix
7417
18+flags:
19+ aeson-pretty:
20+ lib-only: true
21+ these:
22+ assoc: false
23+ quickcheck: false