Skip to content

Commit a056181

Browse files
authored
Merge pull request #236 from sorki/srk/deinternalize
Removal of Internal namespace
2 parents 3b06982 + 472f0bd commit a056181

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1571
-1239
lines changed

.github/workflows/ci.dhall

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ in haskellCi.generalCi
1111
defSteps.extraSteps.pre
1212
# [ haskellCi.installCachixStep "hnix-store"
1313
, haskellCi.BuildStep.NameIf
14-
{ name =
15-
"Install libsodium"
14+
{ name = "Install libsodium"
1615
, run = "sudo apt install libsodium-dev"
1716
, `if` = "matrix.os == 'ubuntu-latest'"
1817
}
@@ -21,7 +20,12 @@ in haskellCi.generalCi
2120
)
2221
haskellCi.DhallMatrix::{
2322
, ghc =
24-
[ haskellCi.GHC.GHC963, haskellCi.GHC.GHC947, haskellCi.GHC.GHC902 ]
23+
[ haskellCi.GHC.GHC963
24+
, haskellCi.GHC.GHC947
25+
, haskellCi.GHC.GHC928
26+
, haskellCi.GHC.GHC902
27+
, haskellCi.GHC.GHC8107
28+
]
2529
, os = [ haskellCi.OS.Ubuntu, haskellCi.OS.MacOS ]
2630
}
2731
: haskellCi.CI.Type

.github/workflows/ci.dhall.frozen

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
let haskellCi =
2+
https://raw.githubusercontent.com/sorki/github-actions-dhall/main/haskell-ci.dhall
3+
sha256:9e49c0d57a38ab766825b3d2de6656d998b15eec873982db97d590ef58298601
4+
5+
let defSteps = haskellCi.defaultCabalSteps
6+
7+
in haskellCi.generalCi
8+
( haskellCi.withNix
9+
( defSteps
10+
with extraSteps.pre
11+
=
12+
defSteps.extraSteps.pre
13+
# [ haskellCi.installCachixStep "hnix-store"
14+
, haskellCi.BuildStep.NameIf
15+
{ name = "Install libsodium"
16+
, run = "sudo apt install libsodium-dev"
17+
, `if` = "matrix.os == 'ubuntu-latest'"
18+
}
19+
]
20+
)
21+
)
22+
haskellCi.DhallMatrix::{
23+
, ghc =
24+
[ haskellCi.GHC.GHC963
25+
, haskellCi.GHC.GHC947
26+
, haskellCi.GHC.GHC928
27+
, haskellCi.GHC.GHC902
28+
, haskellCi.GHC.GHC8107
29+
]
30+
, os = [ haskellCi.OS.Ubuntu, haskellCi.OS.MacOS ]
31+
}
32+
: haskellCi.CI.Type

.github/workflows/ci.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
set -eo pipefail
55
cd "$( dirname "${BASH_SOURCE[0]}" )"
66

7+
which dhall || cabal install dhall
78
which dhall-to-yaml || cabal install dhall-yaml
9+
10+
echo "cp haskellCi.dhall -> ci.dhall.frozen"
11+
cp ci.dhall ci.dhall.frozen
12+
echo "dhall freez-ing ci.dhall.frozen"
13+
dhall freeze ci.dhall.frozen
814
echo "regenerating ci.yaml"
915
dhall-to-yaml-ng --generated-comment --file ci.dhall > ci.yaml

.github/workflows/ci.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,17 @@ jobs:
4646
- name: haddock all
4747
run: cabal haddock all
4848
- name: Build with Nix
49-
run: "nix-build"
49+
run: "nix-build --argstr compiler $(echo ghc${{ matrix.ghc }} | tr -d '.')"
5050
strategy:
5151
matrix:
5252
cabal:
5353
- '3.10'
5454
ghc:
5555
- '9.6.3'
5656
- '9.4.7'
57+
- '9.2.8'
5758
- '9.0.2'
59+
- '8.10.7'
5860
os:
5961
- "ubuntu-latest"
6062
- "macos-latest"

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
dist
22
dist-newstyle
33
.ghc.environment*
4+
.direnv
5+
cabal.project.local~
6+
cabal.project.local
7+
attic
8+
TAGS
9+
tags
10+
result
11+
result-*

cabal.project

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ packages:
22
./hnix-store-core/hnix-store-core.cabal
33
./hnix-store-remote/hnix-store-remote.cabal
44

5+
-- till https://github.com/obsidiansystems/dependent-sum/pull/80
6+
allow-newer:
7+
dependent-sum:some
8+
59
package hnix-store-remote
610
flags: +build-readme +io-testsuite
7-

cabal.project.local.ci

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
tests: True
22

33
package hnix-store-core
4-
ghc-options: -Wunused-packages -Wall
4+
ghc-options: -Wunused-packages -Wall -Werror
55

66
package hnix-store-remote
7-
ghc-options: -Wunused-packages -Wall
7+
ghc-options: -Wunused-packages -Wall -Werror

default.nix

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,27 @@
11
{ pkgs ? import <nixpkgs> {}
2+
, compiler ? null
23
}:
34
let
4-
overlay = import ./overlay.nix pkgs pkgs.haskell.lib;
5+
lib = pkgs.lib;
6+
overlay = import ./overlay.nix pkgs compiler;
57
overrideHaskellPackages = orig: {
68
buildHaskellPackages =
79
orig.buildHaskellPackages.override overrideHaskellPackages;
810
overrides = if orig ? overrides
911
then pkgs.lib.composeExtensions orig.overrides overlay
1012
else overlay;
1113
};
12-
haskellPackages =
13-
pkgs.haskellPackages.override overrideHaskellPackages;
14+
15+
packageSet =
16+
if compiler == null
17+
then pkgs.haskellPackages
18+
else pkgs.haskell.packages.${compiler};
19+
20+
haskellPackages = packageSet.override overrideHaskellPackages;
1421
in {
15-
inherit (haskellPackages) hnix-store-core hnix-store-remote;
16-
inherit haskellPackages;
17-
inherit pkgs;
22+
inherit (haskellPackages)
23+
hnix-store-core
24+
hnix-store-remote;
25+
haskellPackages = lib.dontRecurseIntoAttrs haskellPackages;
26+
pkgs = lib.dontRecurseIntoAttrs pkgs;
1827
}

hnix-store-core/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
# Next
22

33
* Changes:
4+
* `System.Nix.Internal` namespaces was removed [#236](https://github.com/haskell-nix/hnix-store/pull/236)
45
* `StorePathMetadata` converted to `Metadata a` [#231](https://github.com/haskell-nix/hnix-store/pull/231)
6+
* Moved to `System.Nix.StorePath.Metadata` [#236](https://github.com/haskell-nix/hnix-store/pull/236)
57
* Constructors of `StorePathName` and `StorePathHashPart` are no longer
68
exported. Use respective `mkStorePath..` functions. [#230](https://github.com/haskell-nix/hnix-store/pull/230)
79
* `StorePathSet` type alias is no more, use `HashSet StorePath` [#230](https://github.com/haskell-nix/hnix-store/pull/230)
810
* `makeStorePath` and `parsePath` now returns `Either InvalidPathError StorePath` [#231](https://github.com/haskell-nix/hnix-store/pull/231)
911
* `BuildResult`s `timesBuild` field changes type from `Integer` to `Int` [#231](https://github.com/haskell-nix/hnix-store/pull/231)
1012

1113
* Additions:
14+
* `System.Nix.StorePath.parsePathFromText` [#236](https://github.com/haskell-nix/hnix-store/pull/236)
1215
* `Default StoreDir` instance [#231](https://github.com/haskell-nix/hnix-store/pull/231)
1316
* `System.Nix.StorePath.storePathHashPartToText` [#231](https://github.com/haskell-nix/hnix-store/pull/231)
1417
* Added `Generic` and `Show` instances for

hnix-store-core/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
Core effects for interacting with the Nix store.
44

5-
See `NarEffects` in [System.Nix.Internal.Nar.Effects] and the [System.Nix.StorePath] for the available operations
5+
See `NarEffects` in [System.Nix.Nar.Effects] and the [System.Nix.StorePath] for the available operations
66
on the store.
77

8-
[System.Nix.Internal.Nar.Effects]: ./src/System/Nix/Internal/Nar/Effects.hs
8+
[System.Nix.Nar.Effects]: ./src/System/Nix/Nar/Effects.hs
99
[System.Nix.StorePath]: ./src/System/Nix/StorePath.hs
1010

1111

0 commit comments

Comments
 (0)