1
1
mirror of https://github.com/nmattia/niv.git synced 2024-11-07 22:36:53 +03:00

Udpate build code

This commit is contained in:
Nicolas Mattia 2019-01-30 18:42:14 +01:00
parent a22310c12b
commit a522f49a90
3 changed files with 15 additions and 10 deletions

View File

@ -57,6 +57,7 @@ newtype VersionsSpec = VersionsSpec
getVersionsSpec :: IO VersionsSpec
getVersionsSpec = do
-- TODO: if doesn't exist: run niv init
putStrLn $ "Reading versions file"
decodeFileStrict pathNixVersionsJson >>= \case
Just (Aeson.Object obj) ->

View File

@ -1,12 +1,3 @@
with { fetch = import ./fetch.nix; };
import fetch.nixpkgs
{ overlays =
[ (self: super:
{
snack-exe = (import fetch.snack).snack-exe;
snack-lib = (import fetch.snack).snack-lib;
}
)
] ;
config = { } ;
}
{ overlays = import ./overlay.nix { sources = fetch; } ; config = {}; }

13
nix/overlay.nix Normal file
View File

@ -0,0 +1,13 @@
{ sources ? import ./fetch.nix }:
[
(self: super:
{
snack-exe = (import sources.snack).snack-exe;
snack-lib = (import sources.snack).snack-lib;
}
)
(self: super:
{ niv = super.snack-lib.inferHPackBuild ../package.yaml ; }
)
]