diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0112934..454e5e9 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,17 +1,20 @@ +# Code generated by dhall-to-yaml. DO NOT EDIT. jobs: build: - "runs-on": "ubuntu-latest" + name: "GHC ${{ matrix.ghc }}, Cabal ${{ matrix.cabal }}, OS ${{ matrix.os }}" + "runs-on": "${{ matrix.os }}" steps: - - uses: "actions/checkout@v3" + - uses: "cachix/install-nix-action@v23" + with: + nix_path: "nixpkgs=channel:nixos-unstable" + - uses: "actions/checkout@v4" + with: + submodules: recursive - id: "setup-haskell-cabal" - uses: "haskell/actions/setup@v2" + uses: "haskell-actions/setup@v2" with: "cabal-version": "${{ matrix.cabal }}" - "enable-stack": false "ghc-version": "${{ matrix.ghc }}" - - uses: cachix/install-nix-action@v17 - with: - nix_path: nixpkgs=channel:nixos-unstable - name: Update Hackage repository run: cabal update - name: cabal.project.local.ci @@ -20,10 +23,10 @@ jobs: cp cabal.project.local.ci cabal.project.local fi - name: freeze - run: cabal freeze + run: "cabal freeze --enable-tests --enable-benchmarks" - uses: "actions/cache@v3" with: - key: "${{ runner.os }}-${{ matrix.ghc }}-cabal-${{ hashFiles('cabal.project.freeze') }}" + key: "${{ matrix.os }}-${{ matrix.ghc }}-${{ matrix.cabal}}-${{ hashFiles('cabal.project.freeze') }}" path: | ${{ steps.setup-haskell-cabal.outputs.cabal-store }} dist-newstyle @@ -33,24 +36,23 @@ jobs: run: "cabal build all --enable-tests --enable-benchmarks" - name: test all run: "cabal test all --enable-tests" + - name: haddock all + run: cabal haddock all + - name: Build with Nix + run: "nix-build --argstr compiler $(echo ghc${{ matrix.ghc }} | tr -d '.')" strategy: matrix: cabal: - - '3.4' + - '3.10' ghc: - - '9.4.4' - - '9.2.5' - - '9.0.2' - - '8.10.7' - build-nix: - "runs-on": "ubuntu-latest" - steps: - - uses: "actions/checkout@v3" - - uses: cachix/install-nix-action@v17 - with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} - - name: check it build with nix - run: nix build + - '9.6.3' + - '9.4.7' + - '9.2.8' + os: + - "ubuntu-latest" name: Haskell CI 'on': -- pull_request + pull_request: {} + push: {} + schedule: + - cron: "4 20 10 * *" diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b15546..7b0bede 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +1.0.20 + +* [Bump upper bounds](https://github.com/Gabriella439/nix-diff/pull/79) + * Allow `unix-2.8` and few more + 1.0.19 * [New Haskell API](https://github.com/Gabriella439/nix-diff/pull/60) diff --git a/README.md b/README.md index 97e7571..f74628f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ # `nix-diff` +[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/Gabriella439/nix-diff/ci.yaml?branch=main)](https://github.com/Gabriella439/nix-diff/actions/workflows/ci.yaml) +[![Hackage version](https://img.shields.io/hackage/v/nix-diff.svg?color=success)](https://hackage.haskell.org/package/nix-diff) +[![Dependencies](https://img.shields.io/hackage-deps/v/nix-diff?label=Dependencies)](https://packdeps.haskellers.com/feed?needle=nix-diff) + This package provides a `nix-diff` executable which explains why two Nix derivations differ. The most common use cases for this are: @@ -91,8 +95,6 @@ You need to have nix installed in your PC. ## Development status -[![Build Status](https://travis-ci.org/Gabriella439/nix-diff.png)](https://travis-ci.org/Gabriella439/nix-diff) - I don't currently plan to add any new features, but I do welcome feature requests. Just open an issue on the issue tracker if you would like to request an improvement. diff --git a/ci.dhall b/ci.dhall new file mode 100644 index 0000000..b988d79 --- /dev/null +++ b/ci.dhall @@ -0,0 +1,7 @@ +let haskellCi = + https://raw.githubusercontent.com/sorki/github-actions-dhall/main/haskell-ci.dhall + +in haskellCi.generalCi + (haskellCi.withNix haskellCi.defaultCabalSteps) + (haskellCi.DhallMatrix::{=} with ghc = haskellCi.defaultGHC3) + : haskellCi.CI.Type diff --git a/ci.sh b/ci.sh new file mode 100755 index 0000000..28ee2ee --- /dev/null +++ b/ci.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash +# Script by @fisx + +set -eo pipefail +cd "$( dirname "${BASH_SOURCE[0]}" )" + +echo "regenerating .github/workflows/ci.yaml" + +which dhall-to-yaml || cabal install dhall-yaml +dhall-to-yaml-ng --generated-comment --file ci.dhall > .github/workflows/ci.yaml diff --git a/default.nix b/default.nix index 7ac1a7e..423ae03 100644 --- a/default.nix +++ b/default.nix @@ -8,15 +8,26 @@ # # ... and then Nix will supply the correct Haskell development environment for # you +{ compiler ? null +}: let config = { }; overlay = pkgsNew: pkgsOld: { - haskellPackages = pkgsOld.haskellPackages.override (old: { + haskellPackages = + let + packageSet = + if compiler == null + then pkgsOld.haskellPackages + else pkgsOld.haskell.packages.${compiler}; + in packageSet.override (old: { overrides = let - sourceOverrides = pkgsNew.haskell.lib.packageSourceOverrides { - "nix-diff" = ./.; + fromCabal2nix = self: super: { + nix-diff = + # see a note in flake.nix + pkgsNew.haskell.lib.dontCheck + (self.callCabal2nix "nix-diff" ./. { }); }; fromDirectory = pkgsNew.haskell.lib.packagesFromDirectory { @@ -27,7 +38,7 @@ let in pkgsNew.lib.fold pkgsNew.lib.composeExtensions default [ - sourceOverrides + fromCabal2nix fromDirectory ]; diff --git a/flake.nix b/flake.nix index 0936b93..0df4f2e 100644 --- a/flake.nix +++ b/flake.nix @@ -47,12 +47,4 @@ devShells.default = pkgs.haskellPackages.nix-diff.env; } )); - - nixConfig = { - extra-substituters = [ "https://cache.garnix.io" ]; - - extra-trusted-public-keys = [ - "cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g=" - ]; - }; } diff --git a/nix-diff.cabal b/nix-diff.cabal index 38a0437..faeeb47 100644 --- a/nix-diff.cabal +++ b/nix-diff.cabal @@ -26,15 +26,15 @@ library build-depends: base >= 4.9 && < 5 , attoparsec >= 0.13 && < 0.15 , aeson - , bytestring >= 0.9 && < 0.12 - , containers >= 0.5 && < 0.7 + , bytestring >= 0.9 && < 0.13 + , containers >= 0.5 && < 0.8 , directory < 1.4 - , mtl >= 2.2 && < 2.3 + , mtl >= 2.2 && < 2.4 , nix-derivation >= 1.1 && < 1.2 - , optparse-applicative >= 0.14.0.0 && < 0.18 + , optparse-applicative >= 0.14.0.0 && < 0.19 , patience >= 0.3 && < 0.4 - , text >= 1.2 && < 2.1 - , vector >= 0.12 && < 0.13 + , text >= 1.2 && < 2.2 + , vector >= 0.12 && < 0.14 , process < 1.7 , filepath < 1.5 , QuickCheck < 2.15 @@ -54,7 +54,7 @@ executable nix-diff , bytestring , optparse-applicative >= 0.14.0.0 && < 0.18 , text - , unix < 2.8 + , unix < 2.9 , containers , mtl hs-source-dirs: app @@ -78,8 +78,8 @@ test-suite nix-diff-test , text , containers , mtl - , typed-process < 0.2.11 - , tasty < 1.5 + , typed-process < 0.2.12 + , tasty < 1.6 , tasty-quickcheck < 0.11 , tasty-silver < 3.4 diff --git a/nix/nix-derivation.nix b/nix/nix-derivation.nix index 3851f7e..82547f5 100644 --- a/nix/nix-derivation.nix +++ b/nix/nix-derivation.nix @@ -3,10 +3,8 @@ }: mkDerivation { pname = "nix-derivation"; - version = "1.1.1"; - sha256 = "2d69ca33daa5f92b3601b263b1360b230ff193e144db815b1b039b0ed8c18fc9"; - revision = "1"; - editedCabalFile = "1ink37s91kbrq8p0sqyi1i90xp2jimyg1cnzy9ydjh3iv21f7pi5"; + version = "1.1.3"; + sha256 = "11drhg3zjhwbvdw25k0icvbkcpqilx0m9qw60k7snfaz1iadfkdb"; isLibrary = true; isExecutable = true; libraryHaskellDepends = [