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

Update deps

This commit is contained in:
Nicolas Mattia 2019-01-30 18:50:09 +01:00
parent a522f49a90
commit 7de683e33b
4 changed files with 10 additions and 8 deletions

12
Main.hs
View File

@ -17,7 +17,7 @@ import Data.Aeson (FromJSON, FromJSONKey, ToJSON, ToJSONKey)
import Data.Char (toUpper)
import Data.Hashable (Hashable)
import Data.Maybe (mapMaybe, fromMaybe)
import Data.Semigroup ((<>))
import Data.Semigroup
import Data.String.QQ (s)
import GHC.Exts (toList)
import System.Exit (exitFailure)
@ -81,7 +81,7 @@ parsePackageName = PackageName <$>
Opts.argument Opts.str (Opts.metavar "PACKAGE")
newtype PackageSpec = PackageSpec { unPackageSpec :: Aeson.Object }
deriving newtype (FromJSON, ToJSON, Show)
deriving newtype (FromJSON, ToJSON, Show, Semigroup, Monoid)
parsePackageSpec :: Opts.Parser PackageSpec
parsePackageSpec =
@ -390,9 +390,11 @@ cmdUpdate = \case
packageSpec' <- case HMap.lookup packageName versionsSpec of
Just packageSpec' -> do
updatePackageSpec $ PackageSpec $ HMap.union
(unPackageSpec packageSpec)
(unPackageSpec packageSpec')
-- TODO: something fishy happening here
pkgSpec <- completePackageSpec $ packageSpec <> packageSpec'
updatePackageSpec $ pkgSpec
Nothing -> abortCannotUpdateNoSuchPackage packageName
setVersionsSpec $ VersionsSpec $

View File

@ -1,2 +1,2 @@
with { pkgs = import ./nix; };
pkgs.snack-lib.inferHPackBuild ./package.yaml
pkgs.niv

View File

@ -8,6 +8,6 @@
)
(self: super:
{ niv = super.snack-lib.inferHPackBuild ../package.yaml ; }
{ niv = super.snack-lib.executable ../package.yaml ; }
)
]

View File

@ -1 +1 @@
{"nixpkgs":{"url":"https://github.com/NixOS/nixpkgs-channels/archive/138f2cc707d7ee13d93c86db3285460e244c402c.tar.gz","owner":"NixOS","branch":"nixos-18.03","url_template":"https://github.com/<owner>/<repo>/archive/<rev>.tar.gz","repo":"nixpkgs-channels","sha256":"0h49j1cbnccqx996x80z7na9p7slnj9liz646s73s55am8wc9q8q","description":"Nixpkgs/NixOS branches that track the Nixpkgs/NixOS channels","rev":"138f2cc707d7ee13d93c86db3285460e244c402c"},"snack":{"url":"https://github.com/nmattia/snack/archive/88f6a410291b4332d65481fcca593a5555a605e7.tar.gz","owner":"nmattia","branch":"master","url_template":"https://github.com/<owner>/<repo>/archive/<rev>.tar.gz","repo":"snack","sha256":"1z6dph28372ffwwp2xhrkhg4gjx27h0my3cs5gy3p5qgkh682cb7","description":"Nix-based incremental build tool for Haskell projects","rev":"88f6a410291b4332d65481fcca593a5555a605e7"}}
{"nixpkgs":{"url":"https://github.com/NixOS/nixpkgs-channels/archive/138f2cc707d7ee13d93c86db3285460e244c402c.tar.gz","owner":"NixOS","branch":"nixos-18.03","url_template":"https://github.com/<owner>/<repo>/archive/<rev>.tar.gz","repo":"nixpkgs-channels","sha256":"0h49j1cbnccqx996x80z7na9p7slnj9liz646s73s55am8wc9q8q","description":"Nixpkgs/NixOS branches that track the Nixpkgs/NixOS channels","rev":"138f2cc707d7ee13d93c86db3285460e244c402c"},"snack":{"url":"https://github.com/nmattia/snack/archive/2f85b336564fb6871609f366e1ab6962bd2969a6.tar.gz","owner":"nmattia","branch":"master","url_template":"https://github.com/<owner>/<repo>/archive/<rev>.tar.gz","repo":"snack","sha256":"1p26zgkj210qsm7hymx101xv3hnanib4sy9207pj6wl1gwqim6fx","description":"Nix-based incremental build tool for Haskell projects","rev":"2f85b336564fb6871609f366e1ab6962bd2969a6"}}