diff --git a/flake.lock b/flake.lock index 46cc4557..5c9ecf6a 100644 --- a/flake.lock +++ b/flake.lock @@ -18,21 +18,6 @@ "type": "github" } }, - "mkAgdaDerivation": { - "locked": { - "lastModified": 1711465038, - "narHash": "sha256-rJFQI7/IcwSnUAdxaQkJOvzBy0BCMWCb6N0OC27LlRk=", - "owner": "liesnikov", - "repo": "mkAgdaDerivation", - "rev": "393785b798a8938063fff14ad681d7ef95356215", - "type": "github" - }, - "original": { - "owner": "liesnikov", - "repo": "mkAgdaDerivation", - "type": "github" - } - }, "nixpkgs": { "locked": { "lastModified": 1711555030, @@ -51,7 +36,6 @@ "root": { "inputs": { "flake-utils": "flake-utils", - "mkAgdaDerivation": "mkAgdaDerivation", "nixpkgs": "nixpkgs" } }, diff --git a/flake.nix b/flake.nix index a381952b..2c35db9e 100644 --- a/flake.nix +++ b/flake.nix @@ -3,28 +3,30 @@ inputs.nixpkgs.url = github:NixOS/nixpkgs; inputs.flake-utils.url = github:numtide/flake-utils; - inputs.mkAgdaDerivation.url = github:liesnikov/mkAgdaDerivation; - outputs = {self, nixpkgs, flake-utils, mkAgdaDerivation}: + outputs = {self, nixpkgs, flake-utils}: flake-utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs {inherit system;}; - agdaDerivation = - pkgs.callPackage mkAgdaDerivation.lib.mkAgdaDerivation {}; - agda2hs-lib = agdaDerivation + agda2hs-lib = pkgs.agdaPackages.mkDerivation { pname = "agda2hs"; meta = {}; version = "1.3"; - tcDir = "lib"; + preBuild = '' + echo "{-# OPTIONS --sized-types #-}" > Everything.agda + echo "module Everything where" >> Everything.agda + find lib -name '*.agda' | sed -e 's/lib\///;s/\//./g;s/\.agda$//;s/^/import /' >> Everything.agda + ''; src = ./.; }; agda2hs-pkg = options: pkgs.haskellPackages.haskellSrc2nix { name = "agda2hs"; src = ./.; - extraCabal2nixOptions = options; + extraCabal2nixOptions = options; #"--jailbreak" }; + # jailbreaking here because otherwise aeson has to be overridden and that triggers recompilation of a lot of dependencies agda2hs-hs = pkgs.haskellPackages.callPackage (agda2hs-pkg "--jailbreak") {}; agda2hs-expr = import ./agda2hs.nix; agda2hs = pkgs.callPackage agda2hs-expr {