From 97cd73c6b89afe86a44f33e6f984614055917d7c Mon Sep 17 00:00:00 2001 From: Raoul Hidalgo Charman Date: Sat, 16 Dec 2023 22:04:24 +0800 Subject: [PATCH] WIP Changes to upgrade to 9.6.x Adds nix CI back in. --- .github/workflows/nix-check.yml | 9 +- flake.lock | 408 +++++++++++++++++++++-------- flake.nix | 22 +- flora.cabal | 4 +- nix/hspkgs.nix | 3 + nix/shell-config.nix | 6 +- src/jobs-worker/FloraJobs/Types.hs | 2 +- 7 files changed, 335 insertions(+), 119 deletions(-) diff --git a/.github/workflows/nix-check.yml b/.github/workflows/nix-check.yml index 3d95664f..8a8477e9 100644 --- a/.github/workflows/nix-check.yml +++ b/.github/workflows/nix-check.yml @@ -1,4 +1,8 @@ -name: "Flora nix check" +name: Flora nix check +on: + pull_request: + push: + branches: ["main", "development"] jobs: tests: runs-on: ubuntu-latest @@ -7,8 +11,9 @@ jobs: - uses: cachix/install-nix-action@v25 with: github_access_token: ${{ secrets.GITHUB_TOKEN }} + nix_path: nixpkgs=channel:nixos-23.11 - uses: cachix/cachix-action@v14 with: name: flora-pm authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - - run: nix flake check .# -Lv --allow-import-from-derivation --fallback + - run: nix flake check .# -Lv --accept-flake-config --fallback diff --git a/flake.lock b/flake.lock index adc96ef1..87871239 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,22 @@ { "nodes": { + "base64": { + "flake": false, + "locked": { + "lastModified": 1705012403, + "narHash": "sha256-yIf0BeWQXrbHchf9faM+7dme6BVXklUdkxGBzWDBQsc=", + "owner": "emilypi", + "repo": "base64", + "rev": "e67505b35084040c91c833bae6a9e6592863fd04", + "type": "github" + }, + "original": { + "owner": "emilypi", + "ref": "master", + "repo": "base64", + "type": "github" + } + }, "flake-compat": { "flake": false, "locked": { @@ -21,11 +38,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1683560683, - "narHash": "sha256-XAygPMN5Xnk/W2c1aW0jyEa6lfMDZWlQgiNtmHXytPc=", + "lastModified": 1701473968, + "narHash": "sha256-YcVE5emp1qQ8ieHUnxt1wCZCC3ZfAS+SRRWZ2TMda7E=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "006c75898cf814ef9497252b022e91c946ba8e17", + "rev": "34fed993f1674c8d06d58b37ce1e0fe5eebcb9f5", "type": "github" }, "original": { @@ -39,11 +56,47 @@ "nixpkgs-lib": "nixpkgs-lib_2" }, "locked": { - "lastModified": 1679737941, - "narHash": "sha256-srSD9CwsVPnUMsIZ7Kt/UegkKUEBcTyU1Rev7mO45S0=", + "lastModified": 1698882062, + "narHash": "sha256-HkhafUayIqxXyHH1X8d9RDl1M2CkFgZLjKD3MzabiEo=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "8c9fa2545007b49a5db5f650ae91f227672c3877", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_3": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_3" + }, + "locked": { + "lastModified": 1706830856, + "narHash": "sha256-a0NYyp+h9hlb7ddVz4LUn1vT/PLwqfrWYcHMvFB1xYg=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "3502ee99d6dade045bdeaf7b0cd8ec703484c25c", + "rev": "b253292d9c0a5ead9bc98c4e9a26c6312e27d69f", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_4": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_4" + }, + "locked": { + "lastModified": 1706830856, + "narHash": "sha256-a0NYyp+h9hlb7ddVz4LUn1vT/PLwqfrWYcHMvFB1xYg=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "b253292d9c0a5ead9bc98c4e9a26c6312e27d69f", "type": "github" }, "original": { @@ -57,11 +110,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1687709756, - "narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=", + "lastModified": 1701680307, + "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", "owner": "numtide", "repo": "flake-utils", - "rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7", + "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", "type": "github" }, "original": { @@ -100,33 +153,21 @@ "type": "github" } }, - "get-flake": { - "locked": { - "lastModified": 1673819588, - "narHash": "sha256-gRtwKAlu4htvS6dxyZnW3n+vMS1acqnMGVHqxUdETeY=", - "owner": "ursi", - "repo": "get-flake", - "rev": "e0917b6f564aa5acefb1484b5baf76da21746c3c", - "type": "github" + "flake-utils_4": { + "inputs": { + "systems": "systems_2" }, - "original": { - "owner": "ursi", - "repo": "get-flake", - "type": "github" - } - }, - "get-flake_2": { "locked": { - "lastModified": 1673819588, - "narHash": "sha256-gRtwKAlu4htvS6dxyZnW3n+vMS1acqnMGVHqxUdETeY=", - "owner": "ursi", - "repo": "get-flake", - "rev": "e0917b6f564aa5acefb1484b5baf76da21746c3c", + "lastModified": 1705309234, + "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", "type": "github" }, "original": { - "owner": "ursi", - "repo": "get-flake", + "owner": "numtide", + "repo": "flake-utils", "type": "github" } }, @@ -151,100 +192,138 @@ "type": "github" } }, + "horizon-advance": { + "inputs": { + "flake-utils": "flake-utils_4", + "horizon-core": "horizon-core_2", + "nixpkgs": "nixpkgs_6" + }, + "locked": { + "lastModified": 1708781115, + "narHash": "sha256-faeJOYHrFvVL21RDsDplmX8XTK6nEH9Co3Bv06TlEms=", + "ref": "lts/ghc-9.6.x", + "rev": "c99e5f0f4635f5ab087f821775d018cce82c21b5", + "revCount": 165, + "type": "git", + "url": "https://gitlab.horizon-haskell.net/package-sets/horizon-advance" + }, + "original": { + "ref": "lts/ghc-9.6.x", + "type": "git", + "url": "https://gitlab.horizon-haskell.net/package-sets/horizon-advance" + } + }, "horizon-core": { "inputs": { "flake-parts": "flake-parts_2", - "get-flake": "get-flake_2", - "horizon-gen-nix-flake-source": "horizon-gen-nix-flake-source", - "horizon-shell-flake-source": "horizon-shell-flake-source", "lint-utils": "lint-utils", "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1685784924, - "narHash": "sha256-iVFRMo2if7tzoegkQCZ2kgm+cTBzz0+gMQZWKwtVwXU=", - "ref": "sts-945", - "rev": "7212a4f77094ec87f4a561197c252abcd3141f6d", - "revCount": 1061, + "lastModified": 1699713412, + "narHash": "sha256-7lhsgR7AkaEboecmhX50aq5e3MIe8Knh2NhMnQuta/8=", + "ref": "lts/ghc-9.6.x", + "rev": "ab95cdb440adfe19e8016bfbffc9c3e4c818b220", + "revCount": 1178, "type": "git", "url": "https://gitlab.horizon-haskell.net/package-sets/horizon-core" }, "original": { - "ref": "sts-945", + "ref": "lts/ghc-9.6.x", "type": "git", "url": "https://gitlab.horizon-haskell.net/package-sets/horizon-core" } }, - "horizon-gen-nix-flake-source": { - "flake": false, + "horizon-core_2": { + "inputs": { + "flake-parts": "flake-parts_4", + "nixpkgs": "nixpkgs_5" + }, "locked": { - "lastModified": 1679489082, - "narHash": "sha256-c8n6EjjSx+qK8k85n/xLHXmGMf2IZHaXOU1bFmuZAp4=", - "ref": "refs/heads/master", - "rev": "89cec6756dbdcac614713d5700e31f110d61d003", - "revCount": 159, + "lastModified": 1708779769, + "narHash": "sha256-qYkXoIgBr9YdSEFqzeyVU4y3jexGta7PSdp61/V+AQo=", + "ref": "lts/ghc-9.6.x", + "rev": "db1bd7ea51f239cad5dd7fa68c98e1ef4791c87f", + "revCount": 1255, "type": "git", - "url": "https://gitlab.horizon-haskell.net/haskell/horizon-gen-nix" + "url": "https://gitlab.horizon-haskell.net/package-sets/horizon-core" }, "original": { + "ref": "lts/ghc-9.6.x", "type": "git", - "url": "https://gitlab.horizon-haskell.net/haskell/horizon-gen-nix" + "url": "https://gitlab.horizon-haskell.net/package-sets/horizon-core" } }, - "horizon-platform": { + "horizon-devtools": { "inputs": { "flake-parts": "flake-parts", - "get-flake": "get-flake", "horizon-core": "horizon-core", - "horizon-shell-flake": "horizon-shell-flake", + "horizon-hoogle": "horizon-hoogle", "lint-utils": "lint-utils_2", "nixpkgs": "nixpkgs_4" }, "locked": { - "lastModified": 1696069899, - "narHash": "sha256-ZLIgeaIjmzlICtCg88xiaJsM7u03F3WGxoDCAknCfvE=", + "lastModified": 1701535438, + "narHash": "sha256-LMAjWgGi1TKyGSdoEplyLw1NE5GQhHtjTlFjRKF5LFw=", "ref": "refs/heads/master", - "rev": "a863ad211af049462319295cb74f0261c88532ca", - "revCount": 1130, + "rev": "4048e8005457439a3c5f41d28d4a0fd7ac4d4f7e", + "revCount": 1170, "type": "git", - "url": "https://gitlab.horizon-haskell.net/package-sets/horizon-platform" + "url": "https://gitlab.horizon-haskell.net/package-sets/horizon-devtools" }, "original": { "type": "git", - "url": "https://gitlab.horizon-haskell.net/package-sets/horizon-platform" + "url": "https://gitlab.horizon-haskell.net/package-sets/horizon-devtools" } }, - "horizon-shell-flake": { - "flake": false, + "horizon-hoogle": { "locked": { - "lastModified": 1679524452, - "narHash": "sha256-xzNxvLVa3o0F/z4CnBDORv2Y6PfxjlGv7b7LybIyCSg=", - "ref": "refs/tags/0.0.8", - "rev": "21b8913803cefeb287bb244c7ee335638233db7f", - "revCount": 21, + "lastModified": 1701521742, + "narHash": "sha256-huf/95jYL7mY0AHSziJYXx4m/sP+G+YAbJb+Q5Ph/Jg=", + "ref": "refs/heads/master", + "rev": "ddf3b08c6458c1a9e0d881f968c050bc828b9b8e", + "revCount": 2, "type": "git", - "url": "https://gitlab.horizon-haskell.net/shells/horizon-shell" + "url": "https://gitlab.horizon-haskell.net/nix/horizon-hoogle" }, "original": { - "ref": "refs/tags/0.0.8", "type": "git", - "url": "https://gitlab.horizon-haskell.net/shells/horizon-shell" + "url": "https://gitlab.horizon-haskell.net/nix/horizon-hoogle" } }, - "horizon-shell-flake-source": { - "flake": false, + "horizon-hoogle_2": { "locked": { - "lastModified": 1680363750, - "narHash": "sha256-Zq48TEVKRqAEZGlseIPEjoor2Joph5avo0AeoRZhNj4=", + "lastModified": 1701521742, + "narHash": "sha256-huf/95jYL7mY0AHSziJYXx4m/sP+G+YAbJb+Q5Ph/Jg=", "ref": "refs/heads/master", - "rev": "c7ebda22e47ac1dbb7f273f8063069749fbb67e7", - "revCount": 25, + "rev": "ddf3b08c6458c1a9e0d881f968c050bc828b9b8e", + "revCount": 2, + "type": "git", + "url": "https://gitlab.horizon-haskell.net/nix/horizon-hoogle" + }, + "original": { + "type": "git", + "url": "https://gitlab.horizon-haskell.net/nix/horizon-hoogle" + } + }, + "horizon-platform": { + "inputs": { + "flake-parts": "flake-parts_3", + "horizon-advance": "horizon-advance", + "horizon-hoogle": "horizon-hoogle_2", + "nixpkgs": "nixpkgs_7" + }, + "locked": { + "dirtyRev": "b141e389a5501294f053ef17206d387d87a9a2ee-dirty", + "dirtyShortRev": "b141e38-dirty", + "lastModified": 1709053061, + "narHash": "sha256-dC9MVyg0nP2zVu25DPpFoZTLDj5vzWyuY1mGVoL00ZY=", "type": "git", - "url": "https://gitlab.horizon-haskell.net/shells/horizon-shell" + "url": "file:///home/rhidalgochar/horizon/horizon-platform" }, "original": { "type": "git", - "url": "https://gitlab.horizon-haskell.net/shells/horizon-shell" + "url": "file:///home/rhidalgochar/horizon/horizon-platform" } }, "lint-utils": { @@ -253,11 +332,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1681737193, - "narHash": "sha256-c+0eLyF/VWZWGeB1DA88aDUZ3BjO6+jnsJpVW4wxs4w=", + "lastModified": 1699441004, + "narHash": "sha256-7v7CH8ZiB2RClPtpgDLfQxeR+14KXoFl2qTdXd27sL0=", "ref": "refs/heads/master", - "rev": "efaf89d12a6811f0e00034444904b8d169f0fa34", - "revCount": 48, + "rev": "226003d10c2d192b088f7c3c9ee7ca549c421a9c", + "revCount": 52, "type": "git", "url": "https://gitlab.nixica.dev/nix/lint-utils" }, @@ -272,11 +351,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1681737193, - "narHash": "sha256-c+0eLyF/VWZWGeB1DA88aDUZ3BjO6+jnsJpVW4wxs4w=", + "lastModified": 1699441004, + "narHash": "sha256-7v7CH8ZiB2RClPtpgDLfQxeR+14KXoFl2qTdXd27sL0=", "ref": "refs/heads/master", - "rev": "efaf89d12a6811f0e00034444904b8d169f0fa34", - "revCount": 48, + "rev": "226003d10c2d192b088f7c3c9ee7ca549c421a9c", + "revCount": 52, "type": "git", "url": "https://gitlab.nixica.dev/nix/lint-utils" }, @@ -304,11 +383,11 @@ "nixpkgs-lib": { "locked": { "dir": "lib", - "lastModified": 1682879489, - "narHash": "sha256-sASwo8gBt7JDnOOstnps90K1wxmVfyhsTPPNTGBPjjg=", + "lastModified": 1701253981, + "narHash": "sha256-ztaDIyZ7HrTAfEEUt9AtTDNoCYxUdSd6NrRHaYOIxtk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "da45bf6ec7bbcc5d1e14d3795c025199f28e0de0", + "rev": "e92039b55bcd58469325ded85d4f58dd5a4eaf58", "type": "github" }, "original": { @@ -322,11 +401,47 @@ "nixpkgs-lib_2": { "locked": { "dir": "lib", - "lastModified": 1678375444, - "narHash": "sha256-XIgHfGvjFvZQ8hrkfocanCDxMefc/77rXeHvYdzBMc8=", + "lastModified": 1698611440, + "narHash": "sha256-jPjHjrerhYDy3q9+s5EAsuhyhuknNfowY6yt6pjn9pc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "130fa0baaa2b93ec45523fdcde942f6844ee9f6e", + "rev": "0cbe9f69c234a7700596e943bfae7ef27a31b735", + "type": "github" + }, + "original": { + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib_3": { + "locked": { + "dir": "lib", + "lastModified": 1706550542, + "narHash": "sha256-UcsnCG6wx++23yeER4Hg18CXWbgNpqNXcHIo5/1Y+hc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "97b17f32362e475016f942bbdfda4a4a72a8a652", + "type": "github" + }, + "original": { + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib_4": { + "locked": { + "dir": "lib", + "lastModified": 1706550542, + "narHash": "sha256-UcsnCG6wx++23yeER4Hg18CXWbgNpqNXcHIo5/1Y+hc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "97b17f32362e475016f942bbdfda4a4a72a8a652", "type": "github" }, "original": { @@ -371,16 +486,16 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1684800755, - "narHash": "sha256-3EpUSWUPTWNhdC6j/IR6qsxXJLCHdB/+xTo8T9DVc10=", + "lastModified": 1699099776, + "narHash": "sha256-X09iKJ27mGsGambGfkKzqvw5esP1L/Rf8H3u3fCqIiU=", "owner": "nixos", "repo": "nixpkgs", - "rev": "5fcbc12a299b88f68b0362ffc20be802f4678693", + "rev": "85f1ba3e51676fa8cc604a3d863d729026a6b8eb", "type": "github" }, "original": { "owner": "nixos", - "ref": "haskell-updates", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } @@ -403,11 +518,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1683968890, - "narHash": "sha256-FuNtjMvT07cJydY5NRyRhIni/dEwkSkijmFEdsmqdkA=", + "lastModified": 1701336116, + "narHash": "sha256-kEmpezCR/FpITc6yMbAh4WrOCiT2zg5pSjnKrq51h5Y=", "owner": "nixos", "repo": "nixpkgs", - "rev": "ea11a3977f4cba013d8680667616be827c967ac0", + "rev": "f5c27c6136db4d76c30e533c20517df6864c46ee", "type": "github" }, "original": { @@ -419,11 +534,59 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1687793116, - "narHash": "sha256-6xRgZ2E9r/BNam87vMkHJ/0EPTTKzeNwhw3abKilEE4=", + "lastModified": 1707956935, + "narHash": "sha256-ZL2TrjVsiFNKOYwYQozpbvQSwvtV/3Me7Zwhmdsfyu4=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "a4d4fe8c5002202493e87ec8dbc91335ff55552c", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_6": { + "locked": { + "lastModified": 1707546158, + "narHash": "sha256-nYYJTpzfPMDxI8mzhQsYjIUX+grorqjKEU9Np6Xwy/0=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "d934204a0f8d9198e1e4515dd6fec76a139c87f0", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_7": { + "locked": { + "lastModified": 1708093448, + "narHash": "sha256-gohEm3/NVyu7WINFhRf83yJH8UM2ie/KY9Iw3VN6fiE=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "c7763249f02b7786b4ca36e13a4d7365cfba162f", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_8": { + "locked": { + "lastModified": 1702539185, + "narHash": "sha256-KnIRG5NMdLIpEkZTnN5zovNYc0hhXjAgv6pfd5Z4c7U=", "owner": "nixos", "repo": "nixpkgs", - "rev": "9e4e0807d2142d17f463b26a8b796b3fe20a3011", + "rev": "aa9d4729cbc99dabacb50e3994dcefb3ea0f7447", "type": "github" }, "original": { @@ -463,11 +626,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1687779420, - "narHash": "sha256-noueZE/Z5qx6NF/grg46qlpZ/1nuPpc92RvqgCmRaLI=", + "lastModified": 1702456155, + "narHash": "sha256-I2XhXGAecdGlqi6hPWYT83AQtMgL+aa3ulA85RAEgOk=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "1fa438eee82f35bdd4bc30a9aacd7648d757b388", + "rev": "007a45d064c1c32d04e1b8a0de5ef00984c419bc", "type": "github" }, "original": { @@ -478,12 +641,32 @@ }, "root": { "inputs": { + "base64": "base64", "flake-utils": "flake-utils", + "horizon-devtools": "horizon-devtools", "horizon-platform": "horizon-platform", - "nixpkgs": "nixpkgs_5", + "nixpkgs": "nixpkgs_8", "nixpkgs-souffle": "nixpkgs-souffle", "poolboy": "poolboy", - "pre-commit-hooks": "pre-commit-hooks" + "pre-commit-hooks": "pre-commit-hooks", + "streamly": "streamly" + } + }, + "streamly": { + "flake": false, + "locked": { + "lastModified": 1701217151, + "narHash": "sha256-iRDCTBPz4YEXpWREzwbj/0B6xuqxdaG8P4X5490ebYs=", + "owner": "composewell", + "repo": "streamly", + "rev": "d5342f62d71cded9d8bb6afeef3b61704a3fb5b1", + "type": "github" + }, + "original": { + "owner": "composewell", + "ref": "streamly-0.10.0", + "repo": "streamly", + "type": "github" } }, "systems": { @@ -500,6 +683,21 @@ "repo": "default", "type": "github" } + }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index bae704ec..65c745e2 100644 --- a/flake.nix +++ b/flake.nix @@ -18,17 +18,26 @@ # souffle > 2.3 nixpkgs-souffle.url = "github:nixos/nixpkgs/a74a4a2f324fb54637a9e2597ef1fdca6ad869c8"; flake-utils.url = "github:numtide/flake-utils"; + horizon-devtools.url = + "git+https://gitlab.horizon-haskell.net/package-sets/horizon-devtools"; horizon-platform.url = - "git+https://gitlab.horizon-haskell.net/package-sets/horizon-platform"; - pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix"; - pre-commit-hooks.inputs.flake-utils.follows = "flake-utils"; - pre-commit-hooks.inputs.nixpkgs.follows = "nixpkgs"; + "git+https://gitlab.horizon-haskell.net/package-sets/horizon-platform?ref=lts/ghc-9.6.x"; + pre-commit-hooks = { + url = "github:cachix/pre-commit-hooks.nix"; + inputs.flake-utils.follows = "flake-utils"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + streamly.url = "github:composewell/streamly/streamly-0.10.0"; + streamly.flake = false; + base64.url = "github:emilypi/base64/master"; + base64.flake = false; # non-nix dependencies poolboy.url = "github:blackheaven/poolboy/v0.2.1.0"; poolboy.flake = false; }; - outputs = inputs@{ self, flake-utils, horizon-platform, nixpkgs, pre-commit-hooks, ... }: + outputs = inputs@{ self, flake-utils, horizon-platform, horizon-devtools, nixpkgs, pre-commit-hooks, ... }: flake-utils.lib.eachSystem [ "x86_64-linux" ] (system: let pkgs = nixpkgs.legacyPackages.${system}.appendOverlays [ @@ -40,7 +49,8 @@ hsPkgs = horizon-platform.legacyPackages.${system}.extend ( import ./nix/hspkgs.nix { inherit src pkgs inputs; } ); - floraShell = import ./nix/shell-config.nix { inherit src pkgs hsPkgs pre-commit-check; }; + hsDev = horizon-devtools.legacyPackages.${system}; + floraShell = import ./nix/shell-config.nix { inherit src pkgs hsPkgs hsDev pre-commit-check; }; in { apps = rec { diff --git a/flora.cabal b/flora.cabal index d2873cae..936d6b34 100644 --- a/flora.cabal +++ b/flora.cabal @@ -139,7 +139,7 @@ library build-depends: , aeson - , base ^>=4.18.2 + , base ^>=4.18 , base16-bytestring , base64 , blaze-builder @@ -276,7 +276,7 @@ library flora-web build-depends: , aeson , async - , base ^>=4.18.2 + , base ^>=4.18 , base32 , bytestring , Cabal-syntax diff --git a/nix/hspkgs.nix b/nix/hspkgs.nix index fdd84057..8c715047 100644 --- a/nix/hspkgs.nix +++ b/nix/hspkgs.nix @@ -47,4 +47,7 @@ poolboy = dontCheck (hfinal.callCabal2nix "poolboy" inputs.poolboy { }); resource-pool = hfinal.callHackage "resource-pool" "0.4.0.0" { }; + streamly-core = hfinal.callCabal2nix "streamly-core" "${inputs.streamly}/core/" { }; + streamly = hfinal.callCabal2nix "streamly" inputs.streamly { }; + base64 = hfinal.callCabal2nix "base64" inputs.base64 { }; }) diff --git a/nix/shell-config.nix b/nix/shell-config.nix index 2d2cb600..b1481b23 100644 --- a/nix/shell-config.nix +++ b/nix/shell-config.nix @@ -1,9 +1,9 @@ -{ src, pkgs, hsPkgs, pre-commit-check }: hsPkgs.shellFor { +{ src, pkgs, hsPkgs, hsDev, pre-commit-check }: hsPkgs.shellFor { packages = p: [ p.flora ]; nativeBuildInputs = [ - hsPkgs.haskell-language-server + hsDev.haskell-language-server + hsPkgs.cabal-install hsPkgs.postgresql-migration - pkgs.cabal-install pkgs.ghcid pkgs.postgresql_14 pkgs.souffle diff --git a/src/jobs-worker/FloraJobs/Types.hs b/src/jobs-worker/FloraJobs/Types.hs index 60ed1590..c884bd65 100644 --- a/src/jobs-worker/FloraJobs/Types.hs +++ b/src/jobs-worker/FloraJobs/Types.hs @@ -92,7 +92,7 @@ makeConfig -> Config makeConfig runnerEnv floraEnv logger pool runnerContinuation = mkConfig - (\level event -> structuredLogging (floraEnv.config) logger level event) + (\level event -> structuredLogging floraEnv.config logger level event) jobTableName pool (MaxConcurrentJobs 100)