Skip to content

Commit

Permalink
Update nixpkgs and version bounds supporting up to GHC 9.2
Browse files Browse the repository at this point in the history
  • Loading branch information
infinisil committed Aug 5, 2022
1 parent af7a353 commit 3d88abf
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 59 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Expand Up @@ -25,7 +25,7 @@ jobs:
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'

- name: "Nix build"
run: nix-build -A webauthn -A server -A webauthn_aeson1
run: nix-build -A webauthn -A server

dev:
runs-on: ${{ matrix.os }}
Expand Down
3 changes: 3 additions & 0 deletions changelog.md
@@ -1,3 +1,6 @@
### Next version (0.4.1.1)
* [#153](https://github.com/tweag/webauthn/pull/153) Increase cabal bounds to support up to GHC 9.2

### 0.4.1.0

* [#148](https://github.com/tweag/webauthn/pull/148) Allow authentication on Safari even though it violates the specification with an empty user handle
Expand Down
46 changes: 2 additions & 44 deletions default.nix
Expand Up @@ -15,9 +15,9 @@ let
src = gitignoreSource ./.;

# Keep this in sync with the `tested-with` field in `webauthn.cabal`
expectedGhcVersion = "8.10.7";
expectedGhcVersion = "9.0.2";

hpkgs_aeson1 = pkgs.haskellPackages.extend
hpkgs = pkgs.haskellPackages.extend
(hself: hsuper: {
ghc =
if hsuper.ghc.version != expectedGhcVersion then
Expand All @@ -32,48 +32,7 @@ let
(hself.callCabal2nix "webauthn" src { });

server = hself.callCabal2nix "server" (src + "/server") { };

jose = hself.callHackage "jose" "0.8.5" { };

base64-bytestring = hself.base64-bytestring_1_2_1_0;

x509-validation = hself.callHackageDirect
{
pkg = "x509-validation";
ver = "1.6.12";
sha256 = "1jrsryn6hfdmr1b1alpj5zxvw26dw8y7kqpq555q2njm3kvwmxap";
}
{ };
});

hpkgs = hpkgs_aeson1.extend (hself: hsuper: {

jose = hself.jose_0_9;

aeson = hself.aeson_2_0_3_0;

OneTuple = hself.OneTuple_0_3_1;

hashable = hself.hashable_1_4_0_1;

quickcheck-instances = hself.quickcheck-instances_0_3_27;

text-short = pkgs.haskell.lib.dontCheck hself.text-short_0_1_5;

semialign = hself.semialign_1_2_0_1;

hspec-expectations-json = pkgs.haskell.lib.dontCheck hself.hspec-expectations-json_1_0_0_5;

attoparsec = hself.attoparsec_0_14_3;

time-compat = hself.time-compat_1_9_6_1;

# Needed for aeson 2.0
http2 = pkgs.haskell.lib.appendPatch hsuper.http2 (pkgs.fetchpatch {
url = "https://github.com/kazu-yamamoto/http2/commit/0a1f64cb7cd2042554cd2d4e96da850a8940f08d.patch";
sha256 = "0kbbd7dv49m6slcfw61kzy21v4d2ingnbygg4i3spn91v3dyh87y";
});
});

deploy = pkgs.writeShellScriptBin "deploy" ''
${pkgs.nixos-rebuild}/bin/nixos-rebuild switch --build-host localhost --target-host webauthn.dev.tweag.io \
Expand Down Expand Up @@ -108,7 +67,6 @@ let

in
if isShell then shell else {
webauthn_aeson1 = hpkgs_aeson1.webauthn;
inherit (hpkgs) webauthn server;
inherit pkgs hpkgs;
}
6 changes: 3 additions & 3 deletions nix/sources.json
Expand Up @@ -17,10 +17,10 @@
"homepage": "",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "f3d9d4bd898cca7d04af2ae4f6ef01f2219df3d6",
"sha256": "0kngzmn69izr8xcmjiqsyhs80iha00q4nbmj1vs49jrha5ncy8s1",
"rev": "5f9b871b72b24f066b1a1e189efd0669f2888c49",
"sha256": "1lldnr2ik3wwx1mqcq93bs83dp0g0fxvcrgbbjwg9p9brgdfx3sv",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/f3d9d4bd898cca7d04af2ae4f6ef01f2219df3d6.tar.gz",
"url": "https://github.com/NixOS/nixpkgs/archive/5f9b871b72b24f066b1a1e189efd0669f2888c49.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
}
}
8 changes: 4 additions & 4 deletions server/server.cabal
Expand Up @@ -30,9 +30,9 @@ executable server
TypeApplications

build-depends:
base >= 4.13.0 && < 4.15,
base >= 4.13.0 && < 4.17,
aeson >= 1.4.7 && < 2.1,
bytestring >= 0.10.10 && < 0.11,
bytestring >= 0.10.10 && < 0.12,
containers >= 0.6.2 && < 0.7,
binary >= 0.8.7 && < 0.9,
text >= 1.2.4 && < 1.3,
Expand All @@ -42,9 +42,9 @@ executable server
base64-bytestring >= 1.2.1 && < 1.3,
clock >= 0.8 && < 0.9,
cookie >= 0.4.5 && < 0.5,
cryptonite >= 0.27 && < 0.30,
cryptonite >= 0.27 && < 0.31,
hourglass >= 0.2.12 && < 0.3,
http-client >= 0.6.4 && < 0.7,
http-client >= 0.6.4 && < 0.8,
stm >= 2.5.0 && < 2.6,
http-types >= 0.12.3 && < 0.13,
http-client-tls >= 0.3.5 && < 0.4,
Expand Down
14 changes: 7 additions & 7 deletions webauthn.cabal
Expand Up @@ -73,30 +73,30 @@ library
import: sanity
hs-source-dirs: src
build-depends:
base >= 4.13.0 && < 4.15,
base >= 4.13.0 && < 4.17,
aeson >= 1.4.7 && < 2.1,
asn1-encoding >= 0.9.6 && < 0.10,
asn1-parse >= 0.9.5 && < 0.10,
asn1-types >= 0.3.4 && < 0.4,
base16-bytestring >= 1.0.0 && < 1.1,
base64-bytestring >= 1.2.1 && < 1.3,
binary >= 0.8.7 && < 0.9,
bytestring >= 0.10.10 && < 0.11,
bytestring >= 0.10.10 && < 0.12,
cborg >= 0.2.4 && < 0.3,
containers >= 0.6.2 && < 0.7,
cryptonite >= 0.27 && < 0.30,
cryptonite >= 0.27 && < 0.31,
file-embed >= 0.0.11 && < 0.1,
hashable >= 1.3.0 && < 1.5,
hourglass >= 0.2.12 && < 0.3,
jose >= 0.8.5 && < 0.10,
lens >= 4.18.1 && < 4.20,
memory >= 0.15.0 && < 0.16,
lens >= 4.18.1 && < 5.2,
memory >= 0.15.0 && < 0.18,
monad-time >= 0.3.1 && < 0.4,
mtl >= 2.2.2 && < 2.3,
serialise >= 0.2.3 && < 0.3,
singletons >= 2.6 && < 2.8,
singletons >= 2.6 && < 3.2,
text >= 1.2.4 && < 1.3,
time >= 1.9.3 && < 1.10,
time >= 1.9.3 && < 1.12,
unordered-containers >= 0.2.11 && < 0.3,
uuid >= 1.3.13 && < 1.4,
validation >= 1.1 && < 1.2,
Expand Down

0 comments on commit 3d88abf

Please sign in to comment.