Skip to content

Commit 56b2a0c

Browse files
authored
Full plan support (#31)
Fixes #26
1 parent 15c3158 commit 56b2a0c

18 files changed

+1273
-445
lines changed

.gitattributes

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# GitHub Linguist annotations.
2+
# Hide nix/.stack.nix/*.nix
3+
# Hide nix/.plan.nix/*.nix
4+
# That is stuff that is generated by nix-tools stack-to-nix
5+
6+
nix/.stack.nix/*.nix linguist-generated=true
7+
nix/.plan.nix/*.nix linguist-generated=true
8+
.stack-to-nix.cache linguist-generated=true
9+
nix/.stack-pkgs.nix linguist-generated=true
10+
nix/.plan-pkgs.nix linguist-generated=true

.stack-to-nix.cache

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cabal.project

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
packages: .
22

3+
-- Needs https://github.com/input-output-hk/iohk-nix/commit/6a8c29117eff36ce975e02e01efc8b25d93fcb90#diff-6fb0c6517b547a8baf082d5d2d604842
4+
-- to work with the data-dir issues when building components.
5+
6+
constraints: haskell-src-exts < 1.21
7+
, pretty-show < 1.9
8+
39
source-repository-package
410
type: git
511
location: https://github.com/ElvishJerricco/hackage-db.git

default.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ in
1414
, haskell ? import (overrideWith "haskell"
1515
(pkgs.fetchFromGitHub { owner = "input-output-hk";
1616
repo = "haskell.nix";
17-
rev = "7446d044a0db6acdd3d13c1d933ec1ed6da9a606";
18-
sha256 = "11zsf22r98xxr0wj38mm9ig9gsgk5c3wf0xcsxfbf7xxyg4v22iv";
17+
rev = "3584345a9ab001d1867e972a1a20b4406cbffd68";
18+
sha256 = "08pzfvspfl5nvn5szy7bv3rbwymjgmbdm1ac571c64fzhrwf5ghw";
1919
name = "haskell-lib-source"; }))
2020
{ inherit pkgs; }
2121
}:

nix-tools.cabal

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ library
3333
, bytestring
3434
, cryptohash-sha256
3535
, base16-bytestring
36+
, hpack
3637
hs-source-dirs: lib
3738
default-language: Haskell2010
3839

@@ -72,15 +73,29 @@ executable hashes-to-nix
7273
executable plan-to-nix
7374
ghc-options: -Wall
7475
main-is: Main.hs
76+
other-modules: Plan2Nix
77+
, Plan2Nix.Cache
78+
, Plan2Nix.CLI
79+
, Plan2Nix.Project
80+
, Plan2Nix.Plan
7581
build-depends: base >=4.11 && <4.13
7682
, nix-tools
7783
, hnix >= 0.5.0
84+
, Cabal >= 2.4
7885
, text
86+
, hpack
7987
, unordered-containers
8088
, vector
8189
, aeson
8290
, microlens
8391
, microlens-aeson
92+
, optparse-applicative
93+
, prettyprinter
94+
, filepath
95+
, directory
96+
, bytestring
97+
, transformers
98+
, extra
8499
hs-source-dirs: plan2nix
85100
default-language: Haskell2010
86101

nix/.plan-pkgs.nix

Lines changed: 381 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nix/.plan.nix/hackage-db.nix

Lines changed: 67 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nix/.plan.nix/haskell-src-meta.nix

Lines changed: 50 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nix/.plan.nix/hnix.nix

Lines changed: 197 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)