-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot run pandoc via flake.nix on NixOS #8818
Comments
Yes, I know. This has been true for some time and I don't know enough about NiX to fix it. Help welcome! |
I've also tried
So I guess hslua-repl is broken, but I don't know why or how to fix that. |
@peti you have submitted issues before about pandoc and NiX - can you offer any illumination about why hslua-repl is broken and how it can be repaired? It has been broken for a long time. |
We don't need the workarounds any more. We no longer include pandoc-cli, pandoc-server, or pandoc-lua-engine in the packages. Instead, add some of the heavier dependencies to the list of build inputs. This is at least a temporary solution to #8818.
Bug reports or fixes are welcome: https://github.com/hslua/hslua |
hslua-repl only support lua >= 2.3 and hslua-core >= 2.3; while Stackage LTS 20 pins them both to 2.2.*, hence the failure. This can be worked around for specific packages (as pandoc) by manually upgrading lua and hslua-core etc. From reading through the attempts in NixOS/nixpkgs#221165, I'd expect pandoc to quite a big overlay, since it seems to rely on newer version of quite a few packages that are tracked in Stackage. Things will likely get easier when Stackage LTS 21 gets released and nixpkgs switches to it. |
After the last change to
|
This has happened now, but pandoc was thrown out of Stackage Nightly because it uses Not sure whether Nightly affects Nix at all... Might be able to get pandoc-3.1 working with stack2nix once it gets into Nightly? |
There is a working pandoc-3.1 on the haskell-updates branch of nixpkgs right now. The easiest solution would be to wait until that has been merged into master, bump nixpkgs in this flake and potential add overrides accordingly, which should be easy because you can just take copy them out of nixpkgs. |
@jgm I'm happy to create a working |
@srid thanks - I have NO idea what I'm doing with nix. |
workaround: use a binary build of pandoc, see my pandoc-bin.nix |
@srid Any progress? The bit you said you were waiting on is merged now. I know just enough Nix to be dangerous and not enough Haskell to get me out of trouble here, but I have a use case for the Pandoc Flake to be working again and would be happy to help if I can. |
@alerque does the following work for your use case? main...stephen-huan:pandoc:fix-flake, corresponding to the diff diff --git a/flake.lock b/flake.lock
index cb4c63efa..0ca54945b 100644
--- a/flake.lock
+++ b/flake.lock
@@ -5,11 +5,11 @@
"systems": "systems"
},
"locked": {
- "lastModified": 1681202837,
- "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
+ "lastModified": 1710146030,
+ "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
- "rev": "cfacdce06f30d2b68473a46042957675eebb3401",
+ "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
@@ -20,11 +20,11 @@
},
"nixpkgs": {
"locked": {
- "lastModified": 1683594133,
- "narHash": "sha256-iUhLhEAgOCnexSGDsYT2ouydis09uDoNzM7UC685XGE=",
+ "lastModified": 1719468428,
+ "narHash": "sha256-vN5xJAZ4UGREEglh3lfbbkIj+MPEYMuqewMn4atZFaQ=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "8d447c5626cfefb9b129d5b30103344377fe09bc",
+ "rev": "1e3deb3d8a86a870d925760db1a5adecc64d329d",
"type": "github"
},
"original": {
diff --git a/flake.nix b/flake.nix
index 9e7908765..c8f61d34a 100644
--- a/flake.nix
+++ b/flake.nix
@@ -7,18 +7,6 @@
outputs = inputs:
let
overlay = final: prev: {
- haskell = prev.haskell // {
- packageOverrides = hfinal: hprev:
- prev.haskell.packageOverrides hfinal hprev // {
- crypton-connection = final.fetchFromGitHub {
- owner = "kazu-yamamoto";
- repo = "crypton-connection";
- rev = "5c064b911e7327a4d399fd9dd057663d0d0fb256";
- sha256 = "00j1nf9glbz0cnzd84vp08j9ybzjbm3b6gcamlqxxcjb31kllz4b";
- };
- pandoc = hfinal.callCabal2nix "pandoc" ./. { };
- };
- };
pandoc = final.haskell.lib.compose.justStaticExecutables final.haskellPackages.pandoc;
};
perSystem = system: Currently I get the error
and indeed To get the environment that pandoc is built in, one can also just run |
Thanks @srid. I've been off on other yak shaves for a while, but I did see this ping and am excited to try it out now that I have a chance to work on books. |
Explain the problem.
Trying to run pandoc with
nix develop
onflake.nix
which is available in the root of the repo and get the following error:There was a similar (maybe not?) issue from 2019 which is now closed, but I'm lacking expertise to say if it is related/helpful/has a solution in it: #5298
Pandoc version?
Master branch of pandoc.
This is on NixOS, with the following configuration:
The text was updated successfully, but these errors were encountered: