From 3b5340b93852cb0a547ca11cea0bd7b16bed370e Mon Sep 17 00:00:00 2001 From: mangoiv Date: Fri, 11 Oct 2024 11:20:54 +0200 Subject: [PATCH 1/3] [fix] fix the nix build --- flake.lock | 381 ++++++++++++++++++++-------------------- flake.nix | 7 +- nix/hspkgs.nix | 6 + nix/shell-config.nix | 2 +- nix/souffle/default.nix | 45 +++++ 5 files changed, 245 insertions(+), 196 deletions(-) create mode 100644 nix/souffle/default.nix diff --git a/flake.lock b/flake.lock index adc96ef1..019e4047 100644 --- a/flake.lock +++ b/flake.lock @@ -21,11 +21,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1683560683, - "narHash": "sha256-XAygPMN5Xnk/W2c1aW0jyEa6lfMDZWlQgiNtmHXytPc=", + "lastModified": 1719745305, + "narHash": "sha256-xwgjVUpqSviudEkpQnioeez1Uo2wzrsMaJKJClh+Bls=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "006c75898cf814ef9497252b022e91c946ba8e17", + "rev": "c3c5ecc05edc7dafba779c6c1a61cd08ac6583e9", "type": "github" }, "original": { @@ -39,11 +39,11 @@ "nixpkgs-lib": "nixpkgs-lib_2" }, "locked": { - "lastModified": 1679737941, - "narHash": "sha256-srSD9CwsVPnUMsIZ7Kt/UegkKUEBcTyU1Rev7mO45S0=", + "lastModified": 1717285511, + "narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "3502ee99d6dade045bdeaf7b0cd8ec703484c25c", + "rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8", "type": "github" }, "original": { @@ -52,46 +52,34 @@ "type": "github" } }, - "flake-utils": { + "flake-parts_3": { "inputs": { - "systems": "systems" + "nixpkgs-lib": "nixpkgs-lib_3" }, "locked": { - "lastModified": 1687709756, - "narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7", + "lastModified": 1717285511, + "narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8", "type": "github" }, "original": { - "owner": "numtide", - "repo": "flake-utils", + "owner": "hercules-ci", + "repo": "flake-parts", "type": "github" } }, - "flake-utils_2": { - "locked": { - "lastModified": 1644229661, - "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", - "type": "github" + "flake-utils": { + "inputs": { + "systems": "systems" }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_3": { "locked": { - "lastModified": 1644229661, - "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", + "lastModified": 1687709756, + "narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=", "owner": "numtide", "repo": "flake-utils", - "rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", + "rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7", "type": "github" }, "original": { @@ -100,36 +88,6 @@ "type": "github" } }, - "get-flake": { - "locked": { - "lastModified": 1673819588, - "narHash": "sha256-gRtwKAlu4htvS6dxyZnW3n+vMS1acqnMGVHqxUdETeY=", - "owner": "ursi", - "repo": "get-flake", - "rev": "e0917b6f564aa5acefb1484b5baf76da21746c3c", - "type": "github" - }, - "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", - "type": "github" - }, - "original": { - "owner": "ursi", - "repo": "get-flake", - "type": "github" - } - }, "gitignore": { "inputs": { "nixpkgs": [ @@ -151,206 +109,215 @@ "type": "github" } }, - "horizon-core": { + "horizon-advance": { "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" + "flake-parts": [ + "horizon-platform", + "horizon-advance", + "horizon-core", + "flake-parts" + ], + "horizon-core": "horizon-core", + "horizon-hoogle": "horizon-hoogle_2", + "nixpkgs": "nixpkgs_4" }, "locked": { - "lastModified": 1685784924, - "narHash": "sha256-iVFRMo2if7tzoegkQCZ2kgm+cTBzz0+gMQZWKwtVwXU=", - "ref": "sts-945", - "rev": "7212a4f77094ec87f4a561197c252abcd3141f6d", - "revCount": 1061, + "lastModified": 1718979420, + "narHash": "sha256-/fHKTygYsDl/jZlV2nMZzm/F0AowJjsCEWZzrTmWGR0=", + "ref": "refs/heads/master", + "rev": "03585d5899f9bc872b4172338f835ffd863fb1eb", + "revCount": 257, "type": "git", - "url": "https://gitlab.horizon-haskell.net/package-sets/horizon-core" + "url": "https://gitlab.horizon-haskell.net/package-sets/horizon-advance" }, "original": { - "ref": "sts-945", "type": "git", - "url": "https://gitlab.horizon-haskell.net/package-sets/horizon-core" + "url": "https://gitlab.horizon-haskell.net/package-sets/horizon-advance" } }, - "horizon-gen-nix-flake-source": { - "flake": false, + "horizon-build-packages": { + "inputs": { + "flake-parts": [ + "horizon-platform", + "horizon-advance", + "horizon-core", + "horizon-build-packages", + "horizon-ghc", + "flake-parts" + ], + "horizon-ghc": "horizon-ghc", + "nixpkgs": "nixpkgs_2" + }, "locked": { - "lastModified": 1679489082, - "narHash": "sha256-c8n6EjjSx+qK8k85n/xLHXmGMf2IZHaXOU1bFmuZAp4=", + "lastModified": 1718969469, + "narHash": "sha256-0Q8v/yNwcLZy0znegLXx/SQmbfd2d/4TBSrFYh7g7+0=", "ref": "refs/heads/master", - "rev": "89cec6756dbdcac614713d5700e31f110d61d003", - "revCount": 159, + "rev": "23fa82740dc197706a3737c8830b724ccabafac4", + "revCount": 96, "type": "git", - "url": "https://gitlab.horizon-haskell.net/haskell/horizon-gen-nix" + "url": "https://gitlab.horizon-haskell.net/package-sets/horizon-build-packages" }, "original": { "type": "git", - "url": "https://gitlab.horizon-haskell.net/haskell/horizon-gen-nix" + "url": "https://gitlab.horizon-haskell.net/package-sets/horizon-build-packages" } }, - "horizon-platform": { + "horizon-core": { "inputs": { - "flake-parts": "flake-parts", - "get-flake": "get-flake", - "horizon-core": "horizon-core", - "horizon-shell-flake": "horizon-shell-flake", - "lint-utils": "lint-utils_2", - "nixpkgs": "nixpkgs_4" + "flake-parts": "flake-parts_2", + "horizon-build-packages": "horizon-build-packages", + "horizon-hoogle": "horizon-hoogle", + "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1696069899, - "narHash": "sha256-ZLIgeaIjmzlICtCg88xiaJsM7u03F3WGxoDCAknCfvE=", + "lastModified": 1718977916, + "narHash": "sha256-sssWF/XjZga4asgwvovPLAbg8E2EyLDQOYSFgUbKg6c=", "ref": "refs/heads/master", - "rev": "a863ad211af049462319295cb74f0261c88532ca", - "revCount": 1130, + "rev": "81674e75e63548341ebe0cb94127044255affb55", + "revCount": 1375, "type": "git", - "url": "https://gitlab.horizon-haskell.net/package-sets/horizon-platform" + "url": "https://gitlab.horizon-haskell.net/package-sets/horizon-core" }, "original": { "type": "git", - "url": "https://gitlab.horizon-haskell.net/package-sets/horizon-platform" + "url": "https://gitlab.horizon-haskell.net/package-sets/horizon-core" } }, - "horizon-shell-flake": { - "flake": false, + "horizon-ghc": { + "inputs": { + "flake-parts": "flake-parts_3", + "nixpkgs": "nixpkgs" + }, "locked": { - "lastModified": 1679524452, - "narHash": "sha256-xzNxvLVa3o0F/z4CnBDORv2Y6PfxjlGv7b7LybIyCSg=", - "ref": "refs/tags/0.0.8", - "rev": "21b8913803cefeb287bb244c7ee335638233db7f", - "revCount": 21, + "lastModified": 1718969245, + "narHash": "sha256-eeMsOK3Hmm23SH45GdbuWRtpEcMWZPC/JCYvKL2LOos=", + "ref": "refs/heads/master", + "rev": "0bcfe994903359aef81338915706bf6b2f38aaa4", + "revCount": 109, "type": "git", - "url": "https://gitlab.horizon-haskell.net/shells/horizon-shell" + "url": "https://gitlab.horizon-haskell.net/ghc/horizon-ghc" }, "original": { - "ref": "refs/tags/0.0.8", "type": "git", - "url": "https://gitlab.horizon-haskell.net/shells/horizon-shell" + "url": "https://gitlab.horizon-haskell.net/ghc/horizon-ghc" } }, - "horizon-shell-flake-source": { - "flake": false, + "horizon-hoogle": { "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/shells/horizon-shell" + "url": "https://gitlab.horizon-haskell.net/nix/horizon-hoogle" }, "original": { "type": "git", - "url": "https://gitlab.horizon-haskell.net/shells/horizon-shell" + "url": "https://gitlab.horizon-haskell.net/nix/horizon-hoogle" } }, - "lint-utils": { - "inputs": { - "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs" + "horizon-hoogle_2": { + "locked": { + "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/nix/horizon-hoogle" }, + "original": { + "type": "git", + "url": "https://gitlab.horizon-haskell.net/nix/horizon-hoogle" + } + }, + "horizon-hoogle_3": { "locked": { - "lastModified": 1681737193, - "narHash": "sha256-c+0eLyF/VWZWGeB1DA88aDUZ3BjO6+jnsJpVW4wxs4w=", + "lastModified": 1701521742, + "narHash": "sha256-huf/95jYL7mY0AHSziJYXx4m/sP+G+YAbJb+Q5Ph/Jg=", "ref": "refs/heads/master", - "rev": "efaf89d12a6811f0e00034444904b8d169f0fa34", - "revCount": 48, + "rev": "ddf3b08c6458c1a9e0d881f968c050bc828b9b8e", + "revCount": 2, "type": "git", - "url": "https://gitlab.nixica.dev/nix/lint-utils" + "url": "https://gitlab.horizon-haskell.net/nix/horizon-hoogle" }, "original": { "type": "git", - "url": "https://gitlab.nixica.dev/nix/lint-utils" + "url": "https://gitlab.horizon-haskell.net/nix/horizon-hoogle" } }, - "lint-utils_2": { + "horizon-platform": { "inputs": { - "flake-utils": "flake-utils_3", - "nixpkgs": "nixpkgs_3" + "flake-parts": "flake-parts", + "horizon-advance": "horizon-advance", + "horizon-hoogle": "horizon-hoogle_3", + "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1681737193, - "narHash": "sha256-c+0eLyF/VWZWGeB1DA88aDUZ3BjO6+jnsJpVW4wxs4w=", + "lastModified": 1719748453, + "narHash": "sha256-scUW09J11XbI+DzOr4APadB/yzImWJMWvJOfLQQPFgc=", "ref": "refs/heads/master", - "rev": "efaf89d12a6811f0e00034444904b8d169f0fa34", - "revCount": 48, + "rev": "7367975783cc1fc2c271d82595d902b2cba26851", + "revCount": 1346, "type": "git", - "url": "https://gitlab.nixica.dev/nix/lint-utils" + "url": "https://gitlab.horizon-haskell.net/package-sets/horizon-platform" }, "original": { "type": "git", - "url": "https://gitlab.nixica.dev/nix/lint-utils" + "url": "https://gitlab.horizon-haskell.net/package-sets/horizon-platform" } }, "nixpkgs": { "locked": { - "lastModified": 1644525281, - "narHash": "sha256-D3VuWLdnLmAXIkooWAtbTGSQI9Fc1lkvAr94wTxhnTU=", + "lastModified": 1718928808, + "narHash": "sha256-MjVGflb3qXOrJRTJ5siQZHYuMCsRHaqYgTSKSik+/sE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "48d63e924a2666baf37f4f14a18f19347fbd54a2", + "rev": "564000ae34c6af8549f3729051bbae33403e298c", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-unstable", + "ref": "haskell-updates", "repo": "nixpkgs", "type": "github" } }, "nixpkgs-lib": { "locked": { - "dir": "lib", - "lastModified": 1682879489, - "narHash": "sha256-sASwo8gBt7JDnOOstnps90K1wxmVfyhsTPPNTGBPjjg=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "da45bf6ec7bbcc5d1e14d3795c025199f28e0de0", - "type": "github" + "lastModified": 1717284937, + "narHash": "sha256-lIbdfCsf8LMFloheeE6N31+BMIeixqyQWbSr2vk79EQ=", + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz" }, "original": { - "dir": "lib", - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz" } }, "nixpkgs-lib_2": { "locked": { - "dir": "lib", - "lastModified": 1678375444, - "narHash": "sha256-XIgHfGvjFvZQ8hrkfocanCDxMefc/77rXeHvYdzBMc8=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "130fa0baaa2b93ec45523fdcde942f6844ee9f6e", - "type": "github" + "lastModified": 1717284937, + "narHash": "sha256-lIbdfCsf8LMFloheeE6N31+BMIeixqyQWbSr2vk79EQ=", + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz" }, "original": { - "dir": "lib", - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz" } }, - "nixpkgs-souffle": { + "nixpkgs-lib_3": { "locked": { - "lastModified": 1684687439, - "narHash": "sha256-csHkwrf0pnbHoVBsVDVNf2TyHOEVKRAvLkPDOTTguIM=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "a74a4a2f324fb54637a9e2597ef1fdca6ad869c8", - "type": "github" + "lastModified": 1717284937, + "narHash": "sha256-lIbdfCsf8LMFloheeE6N31+BMIeixqyQWbSr2vk79EQ=", + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz" }, "original": { - "owner": "nixos", - "repo": "nixpkgs", - "rev": "a74a4a2f324fb54637a9e2597ef1fdca6ad869c8", - "type": "github" + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz" } }, "nixpkgs-stable": { @@ -371,15 +338,15 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1684800755, - "narHash": "sha256-3EpUSWUPTWNhdC6j/IR6qsxXJLCHdB/+xTo8T9DVc10=", - "owner": "nixos", + "lastModified": 1718928808, + "narHash": "sha256-MjVGflb3qXOrJRTJ5siQZHYuMCsRHaqYgTSKSik+/sE=", + "owner": "NixOS", "repo": "nixpkgs", - "rev": "5fcbc12a299b88f68b0362ffc20be802f4678693", + "rev": "564000ae34c6af8549f3729051bbae33403e298c", "type": "github" }, "original": { - "owner": "nixos", + "owner": "NixOS", "ref": "haskell-updates", "repo": "nixpkgs", "type": "github" @@ -387,27 +354,43 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1644525281, - "narHash": "sha256-D3VuWLdnLmAXIkooWAtbTGSQI9Fc1lkvAr94wTxhnTU=", + "lastModified": 1718928808, + "narHash": "sha256-MjVGflb3qXOrJRTJ5siQZHYuMCsRHaqYgTSKSik+/sE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "48d63e924a2666baf37f4f14a18f19347fbd54a2", + "rev": "564000ae34c6af8549f3729051bbae33403e298c", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-unstable", + "ref": "haskell-updates", "repo": "nixpkgs", "type": "github" } }, "nixpkgs_4": { "locked": { - "lastModified": 1683968890, - "narHash": "sha256-FuNtjMvT07cJydY5NRyRhIni/dEwkSkijmFEdsmqdkA=", + "lastModified": 1718928808, + "narHash": "sha256-MjVGflb3qXOrJRTJ5siQZHYuMCsRHaqYgTSKSik+/sE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "564000ae34c6af8549f3729051bbae33403e298c", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "haskell-updates", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_5": { + "locked": { + "lastModified": 1719468428, + "narHash": "sha256-vN5xJAZ4UGREEglh3lfbbkIj+MPEYMuqewMn4atZFaQ=", "owner": "nixos", "repo": "nixpkgs", - "rev": "ea11a3977f4cba013d8680667616be827c967ac0", + "rev": "1e3deb3d8a86a870d925760db1a5adecc64d329d", "type": "github" }, "original": { @@ -417,7 +400,7 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_6": { "locked": { "lastModified": 1687793116, "narHash": "sha256-6xRgZ2E9r/BNam87vMkHJ/0EPTTKzeNwhw3abKilEE4=", @@ -480,10 +463,10 @@ "inputs": { "flake-utils": "flake-utils", "horizon-platform": "horizon-platform", - "nixpkgs": "nixpkgs_5", - "nixpkgs-souffle": "nixpkgs-souffle", + "nixpkgs": "nixpkgs_6", "poolboy": "poolboy", - "pre-commit-hooks": "pre-commit-hooks" + "pre-commit-hooks": "pre-commit-hooks", + "tracing": "tracing" } }, "systems": { @@ -500,6 +483,22 @@ "repo": "default", "type": "github" } + }, + "tracing": { + "flake": false, + "locked": { + "lastModified": 1725530418, + "narHash": "sha256-VvfSQ0nghREsNft6qTZ5TrtFv7Gh/eGycdAenamX1uU=", + "owner": "scrive", + "repo": "tracing", + "rev": "9c2baa154dbd0ef2c145ee65660261977323c2d8", + "type": "github" + }, + "original": { + "owner": "scrive", + "repo": "tracing", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index bae704ec..6426515a 100644 --- a/flake.nix +++ b/flake.nix @@ -14,9 +14,6 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; - # we need souffle 2.3, only change this if you're sure, that flora should compile with - # souffle > 2.3 - nixpkgs-souffle.url = "github:nixos/nixpkgs/a74a4a2f324fb54637a9e2597ef1fdca6ad869c8"; flake-utils.url = "github:numtide/flake-utils"; horizon-platform.url = "git+https://gitlab.horizon-haskell.net/package-sets/horizon-platform"; @@ -27,12 +24,14 @@ # non-nix dependencies poolboy.url = "github:blackheaven/poolboy/v0.2.1.0"; poolboy.flake = false; + tracing.url = "github:scrive/tracing"; + tracing.flake = false; }; outputs = inputs@{ self, flake-utils, horizon-platform, nixpkgs, pre-commit-hooks, ... }: flake-utils.lib.eachSystem [ "x86_64-linux" ] (system: let pkgs = nixpkgs.legacyPackages.${system}.appendOverlays [ - (_self: _super: { inherit (inputs.nixpkgs-souffle.legacyPackages.${system}) souffle; }) + (self: _super: { souffle = self.callPackage ./nix/souffle {}; }) ]; src = ./.; pre-commit-check = pre-commit-hooks.lib.${system}.run diff --git a/nix/hspkgs.nix b/nix/hspkgs.nix index fdd84057..5276b039 100644 --- a/nix/hspkgs.nix +++ b/nix/hspkgs.nix @@ -46,5 +46,11 @@ }); poolboy = dontCheck (hfinal.callCabal2nix "poolboy" inputs.poolboy { }); + tracing = hfinal.callCabal2nix "tracing" inputs.tracing { }; + tracing-effectful = hfinal.callCabal2nix "tracing-effectful" "${inputs.tracing}/tracing-effectful" { }; + dani-servant-lucid2 = hfinal.callHackage "dani-servant-lucid2" "0.1.0.0" {}; + lucid2 = doJailbreak (hfinal.callHackage "lucid2" "0.0.20240424" {}); + htmx = hfinal.callHackageDirect { pkg = "htmx"; ver = "0.1.0.2"; sha256 = "sha256-eCdYwjwtduzct5JFV7AifZdzYZZGPIMs6k/GBPvSivw="; } {}; + htmx-lucid = hfinal.callHackageDirect {pkg = "htmx-lucid"; ver = "0.2.0.1"; sha256 = "sha256-an5Ju+PrOuSZT0dQuqV+LrsjR+AA5I3RyPQ4U5jel5Y=";} {}; resource-pool = hfinal.callHackage "resource-pool" "0.4.0.0" { }; }) diff --git a/nix/shell-config.nix b/nix/shell-config.nix index 2d2cb600..9b4c13ae 100644 --- a/nix/shell-config.nix +++ b/nix/shell-config.nix @@ -1,7 +1,7 @@ { src, pkgs, hsPkgs, pre-commit-check }: hsPkgs.shellFor { packages = p: [ p.flora ]; nativeBuildInputs = [ - hsPkgs.haskell-language-server + pkgs.haskell-language-server hsPkgs.postgresql-migration pkgs.cabal-install pkgs.ghcid diff --git a/nix/souffle/default.nix b/nix/souffle/default.nix new file mode 100644 index 00000000..e97f9a05 --- /dev/null +++ b/nix/souffle/default.nix @@ -0,0 +1,45 @@ +{ lib, stdenv, fetchFromGitHub +, bash-completion, perl, ncurses, zlib, sqlite, libffi +, mcpp, cmake, bison, flex, doxygen, graphviz +, makeWrapper +}: + + +let + toolsPath = lib.makeBinPath [ mcpp ]; +in +stdenv.mkDerivation rec { + pname = "souffle"; + version = "2.2"; + + src = fetchFromGitHub { + owner = "souffle-lang"; + repo = "souffle"; + rev = version; + sha256 = "sha256-whvC+DL9XbQLc4wf2kFxUKXSyJnGkYq0/0uLCLbliJU="; + }; + + nativeBuildInputs = [ bison cmake flex mcpp doxygen graphviz makeWrapper perl ]; + buildInputs = [ bash-completion ncurses zlib sqlite libffi ]; + # these propagated inputs are needed for the compiled Souffle mode to work, + # since generated compiler code uses them. TODO: maybe write a g++ wrapper + # that adds these so we can keep the propagated inputs clean? + propagatedBuildInputs = [ ncurses zlib sqlite libffi ]; + + cmakeFlags = [ "-DSOUFFLE_GIT=OFF" "-DCMAKE_CXX_FLAGS=-Wno-deprecated-declarations" ]; + + postInstall = '' + wrapProgram "$out/bin/souffle" --prefix PATH : "${toolsPath}" + ''; + + outputs = [ "out" ]; + + meta = with lib; { + broken = stdenv.isDarwin; + description = "A translator of declarative Datalog programs into the C++ language"; + homepage = "https://souffle-lang.github.io/"; + platforms = platforms.unix; + maintainers = with maintainers; [ thoughtpolice copumpkin wchresta ]; + license = licenses.upl; + }; +} From e76c347f9be5d80ae42d0a8360b1a4f5feffdbf0 Mon Sep 17 00:00:00 2001 From: mangoiv Date: Fri, 11 Oct 2024 11:23:52 +0200 Subject: [PATCH 2/3] [feat] allow more systems in flake.nix --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 6426515a..5bd039b2 100644 --- a/flake.nix +++ b/flake.nix @@ -28,7 +28,7 @@ tracing.flake = false; }; outputs = inputs@{ self, flake-utils, horizon-platform, nixpkgs, pre-commit-hooks, ... }: - flake-utils.lib.eachSystem [ "x86_64-linux" ] (system: + flake-utils.lib.eachSystem [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ] (system: let pkgs = nixpkgs.legacyPackages.${system}.appendOverlays [ (self: _super: { souffle = self.callPackage ./nix/souffle {}; }) From 84a3e11c354bf4bcbe657409175e86b2bb7ceb39 Mon Sep 17 00:00:00 2001 From: mangoiv Date: Fri, 11 Oct 2024 11:49:10 +0200 Subject: [PATCH 3/3] [chore] add ghcid to shell deps --- nix/shell-config.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nix/shell-config.nix b/nix/shell-config.nix index 9b4c13ae..22f412b3 100644 --- a/nix/shell-config.nix +++ b/nix/shell-config.nix @@ -3,6 +3,7 @@ nativeBuildInputs = [ pkgs.haskell-language-server hsPkgs.postgresql-migration + pkgs.ghcid pkgs.cabal-install pkgs.ghcid pkgs.postgresql_14